mu4e: fix some warnings on older emacsen

This commit is contained in:
Dirk-Jan C. Binnema 2024-04-04 19:12:54 +03:00
parent 7688a2b548
commit 7771a56026
4 changed files with 8 additions and 6 deletions

View File

@ -215,8 +215,11 @@ If MSG is nil, use `mu4e-message-at-point'."
(when-let ((msg (mu4e-message-at-point 'noerror)))
(when (buffer-live-p mu4e--sexp-buffer-name)
(kill-buffer mu4e--sexp-buffer-name))
(with-current-buffer-window (get-buffer-create mu4e--sexp-buffer-name) nil nil
(lisp-data-mode)
(with-current-buffer-window
(get-buffer-create mu4e--sexp-buffer-name) nil nil
(if (fboundp 'lisp-data-mode)
(lisp-data-mode)
(lisp-mode))
(insert (pp-to-string msg))
(font-lock-ensure)
;; add basic `quit-window' bindings

View File

@ -84,7 +84,7 @@ support."
;; "gnus/gnus.png"))
:actions '("Show" "Favorite bookmark"
"default" "Favorite bookmark")
:on-action (lambda (_ _) (mu4e-jump-to-favorite)))))
:on-action (lambda (_1 _2) (mu4e-jump-to-favorite)))))
;; ... TBI: other notifications ...
(t ;; last resort
(mu4e-message "%s: %s" title body)))))

View File

@ -392,7 +392,7 @@ status, STATUS."
((looking-back "mime:\\([a-zA-Z0-9/-]*\\)" nil)
(list (match-beginning 1)
(match-end 1)
(mailcap-mime-types)))
(when (fboundp 'mailcap-mime-types) (mailcap-mime-types))))
((looking-back "\\(from\\|to\\|cc\\|bcc\\|contact\\|recip\\):\\([a-zA-Z0-9/.@]*\\)" nil)
(list (match-beginning 2)
(match-end 2)

View File

@ -640,8 +640,7 @@ As a side-effect, a message that is being viewed loses its
;; problems later (#2260, #2508), so let's remove those
(article-remove-cr)
(setq-local mu4e--view-message msg)
(mu4e--view-render-buffer msg)
(setq-local mu4e--view-mime-part-cached nil))
(mu4e--view-render-buffer msg))
(mu4e-loading-mode 0)))
(unless (mu4e--view-detached-p gnus-article-buffer)
(with-current-buffer mu4e-linked-headers-buffer