mu4e-comnpose: avoid jumping to headers when saving
Wrap the before-save-hook function in a save-excursion. (HT: Joost Kremers)
This commit is contained in:
@ -303,10 +303,11 @@ Message-ID."
|
|||||||
(add-hook 'before-save-hook
|
(add-hook 'before-save-hook
|
||||||
(lambda()
|
(lambda()
|
||||||
;; replace the date
|
;; replace the date
|
||||||
(message-remove-header "Date")
|
(save-excursion
|
||||||
(message-generate-headers '(Date Message-ID))
|
(message-remove-header "Date")
|
||||||
(save-match-data
|
(message-generate-headers '(Date Message-ID))
|
||||||
(mu4e~draft-remove-mail-header-separator))) nil t)
|
(save-match-data
|
||||||
|
(mu4e~draft-remove-mail-header-separator)))) nil t)
|
||||||
(add-hook 'after-save-hook
|
(add-hook 'after-save-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(save-match-data
|
(save-match-data
|
||||||
|
|||||||
Reference in New Issue
Block a user