diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-14 09:25:32 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-14 09:26:06 +0100 |
commit | e3b43f6cd8a12926206c9a72baf156e5b5c90cef (patch) | |
tree | c59a62348f7280790a51e0e95c433579132779ad | |
parent | 3c0e51e4e59f45d6f6268223fa4b91de0053b36a (diff) | |
download | emacs-e3b43f6cd8a12926206c9a72baf156e5b5c90cef.tar.gz emacs-e3b43f6cd8a12926206c9a72baf156e5b5c90cef.tar.bz2 emacs-e3b43f6cd8a12926206c9a72baf156e5b5c90cef.zip |
Fix mailcap setup when no mailcap files exist
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Ensure that we
populate mailcap--computed-mime-data even if none of the files
exist (bug#53009).
-rw-r--r-- | lisp/net/mailcap.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index bf3c8edd1e3..daa2d5a3fb3 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -439,9 +439,10 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus ("/usr/local/etc/mailcap" system))))) (when (stringp path) (setq path (mapcar #'list (split-string path path-separator t)))) - (when (seq-some (lambda (f) - (file-has-changed-p (car f) 'mail-parse-mailcaps)) - path) + (when (or (null mailcap--computed-mime-data) + (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 |