From: yamaoka Date: Fri, 30 May 2003 11:28:04 +0000 (+0000) Subject: Synch to Gnus 200305301042. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=31ec508e4ea9645a1c7198da15918030096f7a5b;p=elisp%2Fgnus.git- Synch to Gnus 200305301042. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bade54c..dde1285 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2003-05-30 Dave Love + + * rfc2047.el (rfc2047-decode): Don't use + mm-with-unibyte-current-buffer. + + * qp.el (quoted-printable-decode-string): Use + mm-with-unibyte-buffer. + 2003-05-29 Teodor Zlatanov * gnus-registry.el (gnus-registry-save): allow forced saving even diff --git a/lisp/qp.el b/lisp/qp.el index 149d30a..b3dfdce 100644 --- a/lisp/qp.el +++ b/lisp/qp.el @@ -81,8 +81,10 @@ them into characters should be done separately." (defun quoted-printable-decode-string (string &optional coding-system) "Decode the quoted-printable encoded STRING and return the result. -If CODING-SYSTEM is non-nil, decode the region with coding-system." - (with-temp-buffer +If CODING-SYSTEM is non-nil, decode the region with coding-system. +Use of CODING-SYSTEM is deprecated; this function should deal with +raw bytes, and coding conversion should be done separately." + (mm-with-unibyte-buffer (insert string) (quoted-printable-decode-region (point-min) (point-max) coding-system) (buffer-string))) diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index afa9ebe..cdc918a 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -712,19 +712,16 @@ If your Emacs implementation can't decode CHARSET, return nil." (when (and (eq cs 'ascii) mail-parse-charset) (setq cs mail-parse-charset)) - ;; Fixme: What's this for? The following comment makes no sense. -- fx - (mm-with-unibyte-current-buffer - ;; In Emacs Mule 4, decoding UTF-8 should be in unibyte mode. - (mm-decode-coding-string - (cond - ((equal "B" encoding) - (base64-decode-string - (rfc2047-pad-base64 string))) - ((equal "Q" encoding) - (quoted-printable-decode-string - (mm-replace-chars-in-string string ?_ ? ))) - (t (error "Invalid encoding: %s" encoding))) - cs))))) + (mm-decode-coding-string + (cond + ((equal "B" encoding) + (base64-decode-string + (rfc2047-pad-base64 string))) + ((equal "Q" encoding) + (quoted-printable-decode-string + (mm-replace-chars-in-string string ?_ ? ))) + (t (error "Invalid encoding: %s" encoding))) + cs)))) (provide 'rfc2047)