From: yamaoka Date: Sun, 30 Mar 2003 13:35:22 +0000 (+0000) Subject: Synch to Oort Gnus 200303301251. X-Git-Tag: t-gnus-6_15_18-00-quimby~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b3990fb30d16530a1e3e83be672428ac98b77729;p=elisp%2Fgnus.git- Synch to Oort Gnus 200303301251. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 588ca2b..ce09824 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-03-30 Simon Josefsson + + * message.el (message-idna-inside-rhs-p): Narrow to header before + searching. + + * gnus-art.el (article-decode-idna-rhs): More restrictive regexp. + 2003-03-30 Lars Magne Ingebrigtsen * gnus-registry.el (gnus-registry-translate-to-alist): Make a diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 63a1962..e14d2e6 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2301,7 +2301,7 @@ If PROMPT (the prefix), prompt for a coding system to use." buffer-read-only) (article-narrow-to-head) (goto-char (point-min)) - (while (re-search-forward "\\(xn--.*\\)[ \t\n\r,>]" nil t) + (while (re-search-forward "\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t) (let (ace unicode) (when (save-match-data (and (setq ace (match-string 1)) diff --git a/lisp/message.el b/lisp/message.el index f2756ca..9319ff0 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -5286,16 +5286,21 @@ string." "Return t iff point is inside a RHS (heuristically). Only works properly if header contains mailbox-list or address-list. I.e., calling it on a Subject: header is useless." - (if (re-search-backward - "[\\\n\r\t ]" (save-excursion (search-backward "@" nil t)) t) - ;; whitespace between @ and point - nil - (let ((dquote 1) (paren 1)) - (while (save-excursion (re-search-backward "[^\\]\"" nil t dquote)) - (incf dquote)) - (while (save-excursion (re-search-backward "[^\\]\(" nil t paren)) - (incf paren)) - (and (= (% dquote 2) 1) (= (% paren 2) 1))))) + (save-restriction + (narrow-to-region (save-excursion (or (re-search-backward "^[^ \t]" nil t) + (point-min))) + (save-excursion (or (re-search-forward "^[^ \t]" nil t) + (point-max)))) + (if (re-search-backward "[\\\n\r\t ]" + (save-excursion (search-backward "@" nil t)) t) + ;; whitespace between @ and point + nil + (let ((dquote 1) (paren 1)) + (while (save-excursion (re-search-backward "[^\\]\"" nil t dquote)) + (incf dquote)) + (while (save-excursion (re-search-backward "[^\\]\(" nil t paren)) + (incf paren)) + (and (= (% dquote 2) 1) (= (% paren 2) 1)))))) (autoload 'idna-to-ascii "idna")