From: Lars Ingebrigtsen Date: Sat, 6 Feb 2021 10:40:00 +0000 (+0100) Subject: Fix problem when ~/.mailcap had several entries for a MIME type X-Git-Tag: emacs-28.0.90~3911^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=293264623235fdcf672eec3f8e88e4ec7e1182e4;p=emacs.git Fix problem when ~/.mailcap had several entries for a MIME type * lisp/net/mailcap.el (mailcap-mime-info): Use all the matching entries from ~/.mailcap, not just the first (bug#46318). --- diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index 455673b5e9f..b95cd0febcd 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -842,11 +842,11 @@ If NO-DECODE is non-nil, don't decode STRING." ;; ~/.mailcap file, then we filter out the system entries ;; and see whether we have anything left. (when mailcap-prefer-mailcap-viewers - (when-let ((user-entry - (seq-find (lambda (elem) - (eq (cdr (assq 'source elem)) 'user)) - passed))) - (setq passed (list user-entry)))) + (when-let ((user-entries + (seq-filter (lambda (elem) + (eq (cdr (assq 'source elem)) 'user)) + passed))) + (setq passed user-entries))) (setq viewer (car passed)))) (when (and (stringp (cdr (assq 'viewer viewer))) passed)