From: yamaoka Date: Thu, 20 Oct 2005 01:30:52 +0000 (+0000) Subject: Synch to No Gnus 200510200130. X-Git-Tag: t-gnus-6_17_4-quimby-~292 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1999c8706c1743611e0eb71e84255b6e633cb8c8;p=elisp%2Fgnus.git- Synch to No Gnus 200510200130. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dc6b2e7..900cdc3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-10-20 Katsumi Yamaoka + + * rfc2047.el (rfc2047-decode-encoded-words): Fix the handling of + errors. + 2005-10-19 Reiner Steib * mm-bodies.el (mm-decode-string): Call diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 3ce10e5..3822c8a 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -834,7 +834,7 @@ ENCODED-WORD)." ((char-equal ?Q (nth 1 word)) (setq text (quoted-printable-decode-string (mm-subst-char-in-string - ?_ ? (nth 2 word) t))))) + ?_ ? (nth 2 word) t))))) (error (message "%s" (error-message-string code)) nil))) @@ -845,7 +845,7 @@ ENCODED-WORD)." (push (cons cs text) rest)) ;; Don't decode encoded-word. (push (cons nil (nth 3 word)) rest))) - (setq words "") + (setq words nil) (while rest (setq words (concat (or (and (setq cs (caar rest)) @@ -856,7 +856,9 @@ ENCODED-WORD)." nil))) (concat (when (cdr rest) " ") (cdar rest) - (unless (string-equal words "") " "))) + (when (and words + (not (eq (string-to-char words) ? ))) + " "))) words) rest (cdr rest))) words))