diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2016-01-18 17:47:40 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2016-01-18 17:47:40 -0700 |
commit | e26aaf0432396652c6b111e199557405f62b0add (patch) | |
tree | d6408545c3cf135c326332285367879cb6692069 | |
parent | a875dc186e26ad7f6c81423f2c97d62cee4ebee2 (diff) | |
download | dotfiles-e26aaf0432396652c6b111e199557405f62b0add.tar.gz |
even less typing of e-mails
-rw-r--r-- | .emacs.d/init.el | 4 | ||||
-rw-r--r-- | .emacs.d/snippets/message-mode/dear | 4 | ||||
-rw-r--r-- | .emacs.d/snippets/message-mode/hello | 2 | ||||
-rw-r--r-- | .emacs.d/snippets/message-mode/thanks | 4 | ||||
-rw-r--r-- | .signature | 3 |
5 files changed, 9 insertions, 8 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index bf60b455..4298026d 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2117,6 +2117,7 @@ Ensures the kill ring entry always ends with a newline." :mode ("/mutt-.*$" . message-mode) :init + ;; used in message-mode yasnippets (defun spw/recipient-first-name () (save-excursion (message-goto-to) @@ -2129,10 +2130,10 @@ Ensures the kill ring entry always ends with a newline." (end (progn (forward-word 1) (point)))) (filter-buffer-substring beg end)))) + ;; slightly modify C-c C-z behaviour (defun spw/message-newline (&rest ignore) (save-excursion (newline))) - (advice-add 'message-kill-to-signature :after #'spw/message-newline) (defun message-newline-and-reformat--delete-superflous-newlines (&rest ignore) @@ -2152,6 +2153,7 @@ superflous blank quoted lines." (auto-fill-mode) ;; (spw/set-from-address) (footnote-mode) + (message-insert-signature) (message-goto-body)))) (defun djcb/snip (b e summ) diff --git a/.emacs.d/snippets/message-mode/dear b/.emacs.d/snippets/message-mode/dear index 2d193b2e..05d678ea 100644 --- a/.emacs.d/snippets/message-mode/dear +++ b/.emacs.d/snippets/message-mode/dear @@ -1,3 +1,3 @@ -Dear ${1:`(progn (message-insert-signature) (spw/recipient-first-name))`}, +Dear ${1:`(spw/recipient-first-name)`}, -$0
\ No newline at end of file +$0 diff --git a/.emacs.d/snippets/message-mode/hello b/.emacs.d/snippets/message-mode/hello index 75739612..f3c90e57 100644 --- a/.emacs.d/snippets/message-mode/hello +++ b/.emacs.d/snippets/message-mode/hello @@ -1,3 +1,3 @@ Hello, -$0
\ No newline at end of file +$0 diff --git a/.emacs.d/snippets/message-mode/thanks b/.emacs.d/snippets/message-mode/thanks index ec852c2c..26e0702d 100644 --- a/.emacs.d/snippets/message-mode/thanks +++ b/.emacs.d/snippets/message-mode/thanks @@ -1,5 +1,5 @@ -Dear ${1:`(progn (message-insert-signature) (spw/recipient-first-name))`}, +Dear ${1:`(spw/recipient-first-name)`}, Thank you for your e-mail. -$0
\ No newline at end of file +$0 @@ -1,3 +1,2 @@ Regards, - -Sean Whitton + Sean Whitton |