aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2017-02-09 00:41:19 +0000
committerKatsumi Yamaoka2017-02-09 00:41:19 +0000
commit41de25c1134e201235ac7f6e19ecb2925a7df635 (patch)
tree0af248938294c4cdaa2938cc06677d98e910944c
parent90f76eb3584ef1fda727bcd0dd74c5324a11a59d (diff)
downloademacs-41de25c1134e201235ac7f6e19ecb2925a7df635.tar.gz
emacs-41de25c1134e201235ac7f6e19ecb2925a7df635.zip
Make mm-shr use mail-parse-charset by default
* lisp/gnus/mm-decode.el (mm-shr): Use mail-parse-charset by default. This helps an html message with no charset spec to be decoded.
-rw-r--r--lisp/gnus/mm-decode.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 579222f0f65..989d4b8ea17 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1793,22 +1793,23 @@ If RECURSIVE, search recursively."
1793 (buffer-string)))))) 1793 (buffer-string))))))
1794 (shr-inhibit-images mm-html-inhibit-images) 1794 (shr-inhibit-images mm-html-inhibit-images)
1795 (shr-blocked-images mm-html-blocked-images) 1795 (shr-blocked-images mm-html-blocked-images)
1796 charset char) 1796 charset coding char)
1797 (unless handle 1797 (unless handle
1798 (setq handle (mm-dissect-buffer t))) 1798 (setq handle (mm-dissect-buffer t)))
1799 (setq charset (mail-content-type-get (mm-handle-type handle) 'charset)) 1799 (and (setq charset
1800 (or (mail-content-type-get (mm-handle-type handle) 'charset)
1801 mail-parse-charset))
1802 (setq coding (mm-charset-to-coding-system charset nil t))
1803 (eq coding 'ascii)
1804 (setq coding nil))
1800 (save-restriction 1805 (save-restriction
1801 (narrow-to-region (point) (point)) 1806 (narrow-to-region (point) (point))
1802 (shr-insert-document 1807 (shr-insert-document
1803 (mm-with-part handle 1808 (mm-with-part handle
1804 (insert (prog1 1809 (insert (prog1
1805 (if (and charset 1810 (if coding
1806 (setq charset 1811 (decode-coding-string (buffer-string) coding)
1807 (mm-charset-to-coding-system charset 1812 (buffer-string))
1808 nil t))
1809 (not (eq charset 'ascii)))
1810 (decode-coding-string (buffer-string) charset)
1811 (string-as-multibyte (buffer-string)))
1812 (erase-buffer) 1813 (erase-buffer)
1813 (mm-enable-multibyte))) 1814 (mm-enable-multibyte)))
1814 (goto-char (point-min)) 1815 (goto-char (point-min))