diff options
Diffstat (limited to 'lisp/net/mailcap.el')
-rw-r--r-- | lisp/net/mailcap.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index b678df30bd4..aa0c1726553 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -1066,8 +1066,10 @@ If FORCE, re-parse even if already parsed." extns nil))))) (defun mailcap--regexp-quote-type (type) - (pcase-let ((`(,major ,minor) (split-string type "/"))) - (concat major "/" (regexp-quote minor)))) + (if (not (string-search "/" type)) + type + (pcase-let ((`(,major ,minor) (split-string type "/"))) + (concat major "/" (regexp-quote minor))))) (defun mailcap-extension-to-mime (extn) "Return the MIME content type of the file extensions EXTN." |