[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 138060e: In Message, respect Content-Type provided
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 138060e: In Message, respect Content-Type provided by the user |
Date: |
Thu, 4 Jul 2019 10:08:40 -0400 (EDT) |
branch: master
commit 138060e3661470128a071d17a48671842f108343
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
In Message, respect Content-Type provided by the user
* lisp/gnus/mml.el (mml-parse-1): Respect any Content-Type
inserted by the user instead of insisting on text/plain.
---
lisp/gnus/mml.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index b664ebe..4a0d40a 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -295,6 +295,14 @@ part. This is for the internal use, you should never
modify the value.")
(t
(mm-find-mime-charset-region point (point)
mm-hack-charsets))))
+ ;; If the user has inserted a Content-Type header, then
+ ;; respect that instead of overwriting with "text/plain".
+ (save-restriction
+ (narrow-to-region point (point))
+ (let ((content-type (mail-fetch-field "content-type")))
+ (when (and content-type
+ (eq (car tag) 'part))
+ (setcdr (assq 'type tag) content-type))))
(when (and (not raw) (memq nil charsets))
(if (or (memq 'unknown-encoding mml-confirmation-set)
(message-options-get 'unknown-encoding)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 138060e: In Message, respect Content-Type provided by the user,
Lars Ingebrigtsen <=