]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix mailcap setup when no mailcap files exist
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 14 Jan 2022 08:25:32 +0000 (09:25 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 14 Jan 2022 08:26:06 +0000 (09:26 +0100)
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Ensure that we
populate mailcap--computed-mime-data even if none of the files
exist (bug#53009).

lisp/net/mailcap.el

index bf3c8edd1e3c051992cbed43180bfb4daacd637c..daa2d5a3fb393e861980efdecbcf16069f91a2ab 100644 (file)
@@ -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