From f520c358f26a62ddd93b304ccdbfa4d15525f12e Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Mon, 4 Sep 2006 05:49:54 +0000 Subject: [PATCH] (article-decode-encoded-words): Don't infloop in XEmacs. --- lisp/ChangeLog | 2 ++ lisp/gnus-art.el | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 99ce4d9e2..ed8bbd3b3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2006-09-04 Katsumi Yamaoka + * gnus-art.el (article-decode-encoded-words): Don't infloop in XEmacs. + * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\' in quoted string into `\'. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index bb529a079..be3d0b2d4 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2524,17 +2524,21 @@ If PROMPT (the prefix), prompt for a coding system to use." (article-narrow-to-head) (while (not (eobp)) (setq start (point)) - (if (prog1 - (looking-at "\ + (while (progn + (forward-line) + (if (eobp) + nil + (memq (char-after) '(?\t ? ))))) + (save-restriction + (narrow-to-region start (point)) + (if (looking-at "\ \\(?:Resent-\\)?\\(?:From\\|Cc\\|To\\|Bcc\\|\\(?:In-\\)?Reply-To\\|Sender\ \\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\):") - (while (progn - (forward-line) - (if (eobp) - nil - (memq (char-after) '(?\t ? )))))) - (funcall gnus-decode-address-function start (point)) - (funcall gnus-decode-header-function start (point))))))) + (funcall gnus-decode-address-function start (point)) + (funcall gnus-decode-header-function start (point))) + ;; `gnus-decode-*-function' uses `decode-coding-region' which + ;; moves the point to `start' in XEmacs. + (goto-char (point-max))))))) (defun article-decode-group-name () "Decode group names in `Newsgroups:'." -- 2.25.1