("vnd\\.ms-excel"
(viewer . "gnumeric %s")
(test . (getenv "DISPLAY"))
- (type . "application/vnd.ms-excel"))
+ (type . "application/vnd\\.ms-excel"))
("octet-stream"
(viewer . mailcap-save-binary-file)
(non-viewer . t)
(".vox" . "audio/basic")
(".vrml" . "x-world/x-vrml")
(".wav" . "audio/x-wav")
- (".xls" . "application/vnd.ms-excel")
+ (".xls" . "application/vnd\\.ms-excel")
(".wrl" . "x-world/x-vrml")
(".xbm" . "image/xbm")
(".xpm" . "image/xpm")
(setq save-pos (point))
(skip-chars-forward "^ \t\n")
(downcase-region save-pos (point))
- (setq type (buffer-substring save-pos (point)))
+ (setq type (mailcap--regexp-quote-type
+ (buffer-substring save-pos (point))))
(while (not (eolp))
(skip-chars-forward " \t")
(setq save-pos (point))
(setq mailcap-mime-extensions (append extns mailcap-mime-extensions)
extns nil)))))
+(defun mailcap--regexp-quote-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."
(mailcap-parse-mimetypes)