mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
Put signatures at the very end of the message
The existing code inserts the signature before inserting the message body (which it puts at the very end of the buffer - therefore AFTER the signature). This little snippet makes us search backwards and insert the message body before a signature, if it exists. This also fixes a small indentation issue in David's code. Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
This commit is contained in:
parent
da9304769f
commit
56cbff2988
1 changed files with 7 additions and 2 deletions
|
@ -98,11 +98,16 @@ list."
|
|||
collect header)))
|
||||
(message-sort-headers)
|
||||
(message-hide-headers)
|
||||
;; insert the message body - but put it in front of the signature
|
||||
;; if one is present
|
||||
(goto-char (point-max))
|
||||
(if (re-search-backward "-- " nil t)
|
||||
(forward-line -1)
|
||||
(goto-char (point-max)))
|
||||
(insert body))
|
||||
(set-buffer-modified-p nil)
|
||||
(set-buffer-modified-p nil)
|
||||
|
||||
(message-goto-body))
|
||||
(message-goto-body))
|
||||
|
||||
(defun notmuch-mua-forward-message ()
|
||||
(message-forward)
|
||||
|
|
Loading…
Reference in a new issue