]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't end parsing rfc822 addresses prematurely (Bug#5692)
authorAndreas Schwab <schwab@linux-m68k.org>
Sun, 7 Mar 2010 17:34:40 +0000 (18:34 +0100)
committerAndreas Schwab <schwab@linux-m68k.org>
Sun, 7 Mar 2010 17:34:40 +0000 (18:34 +0100)
* mail/rfc822.el (rfc822-addresses): Move catch clause down around
call to rfc822-bad-address.  (Bug#5692)

lisp/ChangeLog
lisp/mail/rfc822.el

index b6374989031bcf42a77c72b341c81c1f0d787bdc..5a18f2876ddabb2ca5de4c792fb6513e407f13d5 100644 (file)
@@ -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
index e1e6932a5609ef7632fb25a6ed8e4878533db548..3048d56674bad0bd7b0db71f4bd7f55a891ac91f 100644 (file)
                   ;; 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)