From: Lars Ingebrigtsen Date: Fri, 14 Jan 2022 08:25:32 +0000 (+0100) Subject: Fix mailcap setup when no mailcap files exist X-Git-Tag: emacs-29.0.90~3067 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e3b43f6cd8a12926206c9a72baf156e5b5c90cef;p=emacs.git 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). --- 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