[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 7d6855c9ab6: Fix outgoing mime type regression (Bug#62815)
From: |
Andrew G Cohen |
Subject: |
emacs-29 7d6855c9ab6: Fix outgoing mime type regression (Bug#62815) |
Date: |
Sun, 7 May 2023 20:32:25 -0400 (EDT) |
branch: emacs-29
commit 7d6855c9ab6e0d5128d81b4bcb685799a3c316e9
Author: Andrew G Cohen <cohen@andy.bu.edu>
Commit: Andrew G Cohen <cohen@andy.bu.edu>
Fix outgoing mime type regression (Bug#62815)
* lisp/net/mailcap.el (mailcap-mime-extensions,
mailcap-parse-mimetype-file, mailcap-mime-types): Don't regexp-quote
mimetypes in a context where they should be strings.
(mailcap--regexp-quote-type): Remove.
(cherry picked from commit 605414d018da47f99dec5019142f584b6eb174c8)
---
lisp/net/mailcap.el | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index 722e98be2fc..be13272f3b0 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -979,7 +979,7 @@ If NO-DECODE is non-nil, don't decode STRING."
(".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")
@@ -1051,8 +1051,7 @@ If FORCE, re-parse even if already parsed."
(setq save-pos (point))
(skip-chars-forward "^ \t\n")
(downcase-region save-pos (point))
- (setq type (mailcap--regexp-quote-type
- (buffer-substring save-pos (point))))
+ (setq type (buffer-substring save-pos (point)))
(while (not (eolp))
(skip-chars-forward " \t")
(setq save-pos (point))
@@ -1065,12 +1064,6 @@ If FORCE, re-parse even if already parsed."
(setq mailcap-mime-extensions (append extns mailcap-mime-extensions)
extns nil)))))
-(defun mailcap--regexp-quote-type (type)
- (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."
(mailcap-parse-mimetypes)
@@ -1107,7 +1100,7 @@ For instance, `image/png' will result in `png'."
(dolist (info (cdr data))
(setq type (cdr (assq 'type (cdr info))))
(unless (string-search "*" type)
- (push type res))))
+ (push (string-replace "\\" "" type) res))))
(nreverse res)))))
;;;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 7d6855c9ab6: Fix outgoing mime type regression (Bug#62815),
Andrew G Cohen <=