summaryrefslogtreecommitdiff
path: root/.emacs.d/init.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-05-07 09:03:41 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-05-07 09:03:41 -0700
commit6b2884ba80299876bb8d7584642327f9bd75aa17 (patch)
treecd9edea4e3f7d4eb0ea86a7d7459b43505d98b69 /.emacs.d/init.el
parentcabf9d22454ea57b194e98c863673a6292c503d2 (diff)
downloaddotfiles-6b2884ba80299876bb8d7584642327f9bd75aa17.tar.gz
move message-mode code out of (use-package notmuch) form
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r--.emacs.d/init.el27
1 files changed, 13 insertions, 14 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index f563915c..55cce3e4 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1251,20 +1251,6 @@ Two ways to read:
(setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-full)
- ;; TODO upstream?
- (defun message-newline-and-reformat--delete-superfluous-newlines (&rest ignore)
- "Have `message-newline-and-reformat' get rid of some more superflous blank quoted lines."
- (save-excursion
- (forward-line -2)
- (when (looking-at ">[[:space:]]*$")
- (kill-line 1)))
- (save-excursion
- (forward-line 2)
- (when (looking-at ">[[:space:]]*$")
- (kill-line 1))))
- (advice-add 'message-newline-and-reformat
- :after #'message-newline-and-reformat--delete-superfluous-newlines)
-
;; not available in `notmuch-search-mode' for now because we want to
;; apply spw::killed to only a single message, not a whole thread,
;; to minimise what gets committed to ~/lib/nmbug-spw
@@ -2207,6 +2193,19 @@ Used in my `message-mode' yasnippets."
(add-to-list 'message-hidden-headers "^User-Agent:")
:config
+ (defun message-newline-and-reformat--delete-superfluous-newlines (&rest ignore)
+ "Have `message-newline-and-reformat' get rid of some more superflous blank quoted lines."
+ (save-excursion
+ (forward-line -2)
+ (when (looking-at ">[[:space:]]*$")
+ (kill-line 1)))
+ (save-excursion
+ (forward-line 2)
+ (when (looking-at ">[[:space:]]*$")
+ (kill-line 1))))
+ (advice-add 'message-newline-and-reformat
+ :after #'message-newline-and-reformat--delete-superfluous-newlines)
+
;; code to automatically format a message
(make-variable-buffer-local