* lisp/net/mailcap.el (mailcap-file-default-commands): If we have
no matching MIME types, don't iterate over (nil) (bug#27236).
This fixes things like:
(mailcap-file-default-commands '("grep --color=auto -nH --null '' "))
=> ("/usr/bin/emacs -nw")
(mailcap-parse-mimetypes)
(let* ((all-mime-type
;; All unique MIME types from file extensions
- (delete-dups
- (mapcar (lambda (file)
- (mailcap-extension-to-mime
- (file-name-extension file t)))
- files)))
+ (delq nil
+ (delete-dups
+ (mapcar (lambda (file)
+ (mailcap-extension-to-mime
+ (file-name-extension file t)))
+ files))))
(all-mime-info
;; All MIME info lists
(delete-dups