mu4e: clear up mu4e~view-message

Remove duplicate definition of mu4e~view-message in mu4e-view-old

Set it earlier in mu4e-view-gnus (so it can be used in mode-hooks).
This commit is contained in:
Dirk-Jan C. Binnema 2021-03-15 22:56:30 +02:00
parent e4320147af
commit 931cfe5d86
2 changed files with 2 additions and 11 deletions

View File

@ -59,7 +59,8 @@
(mm-enable-multibyte)
(setq
gnus-summary-buffer (get-buffer-create " *appease-gnus*")
gnus-original-article-buffer (current-buffer))
gnus-original-article-buffer (current-buffer)
mu4e~view-message msg)
(let* ((ct (mail-fetch-field "Content-Type"))
(ct (and ct (mail-header-parse-content-type ct)))
(charset (mail-content-type-get ct 'charset))
@ -78,7 +79,6 @@
(mu4e-view-mode)
(gnus-article-prepare-display))
(setq mu4e~gnus-article-mime-handles gnus-article-mime-handles)
(setq mu4e~view-message msg)
;; `mu4e-view-mode' derive from `gnus-article-mode'.
(mu4e~view-make-urls-clickable)
(setq gnus-article-decoded-p gnus-article-decode-hook)

View File

@ -34,15 +34,6 @@
;;; Internal variables
;; It's useful to have the current view message available to
;; `mu4e-view-mode-hooks' functions, and we set up this variable
;; before calling `mu4e-view-mode'. However, changing the major mode
;; clobbers any local variables. Work around that by declaring the
;; variable permanent-local.
(defvar-local mu4e~view-message nil
"The message being viewed in view mode.")
(put 'mu4e~view-message 'permanent-local t)
(defvar mu4e-view-fill-headers t
"If non-nil, automatically fill the headers when viewing them.")