Use functions instead of lambdas in add-hook calls

This commit is contained in:
Thierry Volpiatto
2020-11-13 11:38:50 +01:00
parent 861194f9a1
commit 0109172ad4
7 changed files with 84 additions and 55 deletions

View File

@ -185,8 +185,7 @@ or org-mode (when in the body)."
((and (> (point) sepapoint) (eq major-mode 'mu4e-compose-mode))
(org-mode)
(add-hook 'before-save-hook
(lambda ()
(mu4e-error "Switch to mu4e-compose-mode (M-m) before saving"))
#'org~mu4e-error-before-save-hook-fn
nil t)
(org~mu4e-mime-decorate-headers)
(local-set-key (kbd "M-m")
@ -203,6 +202,9 @@ or org-mode (when in the body)."
;; and add the hook
(add-hook 'post-command-hook 'org~mu4e-mime-switch-headers-or-body t t))))
(defun org~mu4e-error-before-save-hook-fn ()
(mu4e-error "Switch to mu4e-compose-mode (M-m) before saving"))
(defun org-mu4e-compose-org-mode ()
"Defines a pseudo-minor mode for mu4e-compose-mode.
Edit the message body using org mode. DEPRECATED."