[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f565e58: Reset mailcap entries only when mailcap files are read a
From: |
Lars Ingebrigtsen |
Subject: |
master f565e58: Reset mailcap entries only when mailcap files are read again |
Date: |
Thu, 4 Nov 2021 13:49:05 -0400 (EDT) |
branch: master
commit f565e581664e26679d726e317bae36d90e562784
Author: Gregory Heytings <gregory@heytings.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Reset mailcap entries only when mailcap files are read again
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Move the clear and
load defaults operations at their appropriate place. Fixes bug#51600.
---
lisp/net/mailcap.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index e40cf2a..df6bdd1 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -423,14 +423,6 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC
1524, plus
(interactive (list nil t))
(when (or (not mailcap-parsed-p)
force)
- ;; Clear out all old data.
- (setq mailcap--computed-mime-data nil)
- ;; Add the Emacs-distributed defaults (which will be used as
- ;; fallbacks). Do it this way instead of just copying the list,
- ;; since entries are destructively modified.
- (cl-loop for (major . minors) in mailcap-mime-data
- do (cl-loop for (minor . entry) in minors
- do (mailcap-add-mailcap-entry major minor entry)))
(cond
(path nil)
((getenv "MAILCAPS")
@@ -450,6 +442,14 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC
1524, plus
(when (seq-some (lambda (f)
(file-has-changed-p (car f) 'mail-parse-mailcaps))
path)
+ ;; Clear out all old data.
+ (setq mailcap--computed-mime-data nil)
+ ;; Add the Emacs-distributed defaults (which will be used as
+ ;; fallbacks). Do it this way instead of just copying the list,
+ ;; since entries are destructively modified.
+ (cl-loop for (major . minors) in mailcap-mime-data
+ do (cl-loop for (minor . entry) in minors
+ do (mailcap-add-mailcap-entry major minor entry)))
;; The ~/.mailcap entries will end up first in the resulting data.
(dolist (spec (reverse
(if (stringp path)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f565e58: Reset mailcap entries only when mailcap files are read again,
Lars Ingebrigtsen <=