From: yamaoka Date: Sun, 16 Mar 2003 03:36:33 +0000 (+0000) Subject: Synch to Oort Gnus 200303152259. X-Git-Tag: t-gnus-6_15_17-00-quimby~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b57d8c30586c1a281b52d3dc10e99bbb849d298d;p=elisp%2Fgnus.git- Synch to Oort Gnus 200303152259. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6f6a52f..68fe11c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-03-15 Jesper Harder + + * mm-bodies.el (mm-decode-body): Add new optional parameter, + force, to use the supplied charset unconditionally. + + * gnus-art.el (article-decode-charset): Use it. + 2003-03-14 Jesper Harder * mm-bodies.el (mm-decode-coding-region-safely): New function. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index b184b90..d4b6777 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2221,7 +2221,7 @@ If PROMPT (the prefix), prompt for a coding system to use." (mm-decode-body charset (and cte (intern (downcase (gnus-strip-whitespace cte)))) - (car ctl))))))) + (car ctl) prompt)))))) (defun article-decode-encoded-words () "Remove encoded-word encoding from headers." diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index ec33d6d..b28c50c 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -243,9 +243,10 @@ If TYPE is `text/plain' CRLF->LF translation may occur." (while (search-forward "\r\n" nil t) (replace-match "\n" t t))))) -(defun mm-decode-body (charset &optional encoding type) +(defun mm-decode-body (charset &optional encoding type force) "Decode the current article that has been encoded with ENCODING. -The characters in CHARSET should then be decoded." +The characters in CHARSET should then be decoded. If FORCE is non-nil +use the supplied charset unconditionally." (if (stringp charset) (setq charset (intern (downcase charset)))) (if (or (not charset) @@ -271,8 +272,11 @@ The characters in CHARSET should then be decoded." (or (not (eq coding-system 'ascii)) (setq coding-system mail-parse-charset)) (not (eq coding-system 'gnus-decoded))) - (mm-decode-coding-region-safely (point-min) (point-max) - coding-system)))))) + (if force + (mm-decode-coding-region (point-min) (point-max) + coding-system) + (mm-decode-coding-region-safely (point-min) (point-max) + coding-system))))))) (defun mm-decode-coding-region-safely (start end coding-system) "Decode region between START and END with CODING-SYSTEM.