changeset 107348:1cbedcbd728f

Don't end parsing rfc822 addresses prematurely (Bug#5692) * mail/rfc822.el (rfc822-addresses): Move catch clause down around call to rfc822-bad-address. (Bug#5692)
author Andreas Schwab <schwab@linux-m68k.org>
date Sun, 07 Mar 2010 18:34:40 +0100
parents ff09b16a7200
children 2c10bcb56f5b 7199654c719e
files lisp/ChangeLog lisp/mail/rfc822.el
diffstat 2 files changed, 25 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Mar 07 09:45:53 2010 -0500
+++ b/lisp/ChangeLog	Sun Mar 07 18:34:40 2010 +0100
@@ -1,3 +1,8 @@
+2010-03-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* mail/rfc822.el (rfc822-addresses): Move catch clause down around
+	call to rfc822-bad-address.  (Bug#5692)
+
 2010-03-07  Štěpán Němec  <stepnem@gmail.com>  (tiny change)
 
 	* vc-git.el (vc-git-annotate-extract-revision-at-line): Use
--- a/lisp/mail/rfc822.el	Sun Mar 07 09:45:53 2010 -0500
+++ b/lisp/mail/rfc822.el	Sun Mar 07 18:34:40 2010 +0100
@@ -296,26 +296,26 @@
                   ;; initial value to prevent rfc822-bad-address from
                   ;; raising a wrong-type-argument error
                   (rfc822-address-start (point)))
-              (catch 'address         ; this is for rfc822-bad-address
-                (rfc822-nuke-whitespace)
-                (while (not (eobp))
-                  (setq rfc822-address-start (point))
-                  (setq tem
-                        (cond ((rfc822-looking-at ?\,)
-                               nil)
-                              ((looking-at "[][\000-\037@;:\\.>)]")
-                               (forward-char)
-                               (rfc822-bad-address
-                                (format "Strange character \\%c found"
-                                        (preceding-char))))
-                              (t
-                               (rfc822-addresses-1 t))))
-                  (cond ((null tem))
-                        ((stringp tem)
-                         (setq list (cons tem list)))
-                        (t
-                         (setq list (nconc (nreverse tem) list)))))
-                (nreverse list))))
+	      (rfc822-nuke-whitespace)
+	      (while (not (eobp))
+		(setq rfc822-address-start (point))
+		(setq tem
+		      (cond ((rfc822-looking-at ?\,)
+			     nil)
+			    ((looking-at "[][\000-\037@;:\\.>)]")
+			     (forward-char)
+			     (catch 'address ; this is for rfc822-bad-address
+			       (rfc822-bad-address
+				(format "Strange character \\%c found"
+					(preceding-char)))))
+			    (t
+			     (rfc822-addresses-1 t))))
+		(cond ((null tem))
+		      ((stringp tem)
+		       (setq list (cons tem list)))
+		      (t
+		       (setq list (nconc (nreverse tem) list)))))
+	      (nreverse list)))
 	(and buf (kill-buffer buf))))))
 
 (provide 'rfc822)