diff options
| author | Andreas Schwab | 2010-03-07 18:34:40 +0100 |
|---|---|---|
| committer | Andreas Schwab | 2010-03-07 18:34:40 +0100 |
| commit | b327c9751037d3d8abc7485c6a78ec96f4da1c1e (patch) | |
| tree | 6a5d065a4ea75c5cd192042b7dfc9ebcab669fee | |
| parent | 1c465a6a67c09f05045d2bdcd60f722f0ccc57e4 (diff) | |
| download | emacs-b327c9751037d3d8abc7485c6a78ec96f4da1c1e.tar.gz emacs-b327c9751037d3d8abc7485c6a78ec96f4da1c1e.zip | |
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)
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/mail/rfc822.el | 40 |
2 files changed, 25 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b6374989031..5a18f2876dd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-03-07 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * mail/rfc822.el (rfc822-addresses): Move catch clause down around | ||
| 4 | call to rfc822-bad-address. (Bug#5692) | ||
| 5 | |||
| 1 | 2010-03-07 Štěpán Němec <stepnem@gmail.com> (tiny change) | 6 | 2010-03-07 Štěpán Němec <stepnem@gmail.com> (tiny change) |
| 2 | 7 | ||
| 3 | * vc-git.el (vc-git-annotate-extract-revision-at-line): Use | 8 | * vc-git.el (vc-git-annotate-extract-revision-at-line): Use |
diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el index e1e6932a560..3048d56674b 100644 --- a/lisp/mail/rfc822.el +++ b/lisp/mail/rfc822.el | |||
| @@ -296,26 +296,26 @@ | |||
| 296 | ;; initial value to prevent rfc822-bad-address from | 296 | ;; initial value to prevent rfc822-bad-address from |
| 297 | ;; raising a wrong-type-argument error | 297 | ;; raising a wrong-type-argument error |
| 298 | (rfc822-address-start (point))) | 298 | (rfc822-address-start (point))) |
| 299 | (catch 'address ; this is for rfc822-bad-address | 299 | (rfc822-nuke-whitespace) |
| 300 | (rfc822-nuke-whitespace) | 300 | (while (not (eobp)) |
| 301 | (while (not (eobp)) | 301 | (setq rfc822-address-start (point)) |
| 302 | (setq rfc822-address-start (point)) | 302 | (setq tem |
| 303 | (setq tem | 303 | (cond ((rfc822-looking-at ?\,) |
| 304 | (cond ((rfc822-looking-at ?\,) | 304 | nil) |
| 305 | nil) | 305 | ((looking-at "[][\000-\037@;:\\.>)]") |
| 306 | ((looking-at "[][\000-\037@;:\\.>)]") | 306 | (forward-char) |
| 307 | (forward-char) | 307 | (catch 'address ; this is for rfc822-bad-address |
| 308 | (rfc822-bad-address | 308 | (rfc822-bad-address |
| 309 | (format "Strange character \\%c found" | 309 | (format "Strange character \\%c found" |
| 310 | (preceding-char)))) | 310 | (preceding-char))))) |
| 311 | (t | 311 | (t |
| 312 | (rfc822-addresses-1 t)))) | 312 | (rfc822-addresses-1 t)))) |
| 313 | (cond ((null tem)) | 313 | (cond ((null tem)) |
| 314 | ((stringp tem) | 314 | ((stringp tem) |
| 315 | (setq list (cons tem list))) | 315 | (setq list (cons tem list))) |
| 316 | (t | 316 | (t |
| 317 | (setq list (nconc (nreverse tem) list))))) | 317 | (setq list (nconc (nreverse tem) list))))) |
| 318 | (nreverse list)))) | 318 | (nreverse list))) |
| 319 | (and buf (kill-buffer buf)))))) | 319 | (and buf (kill-buffer buf)))))) |
| 320 | 320 | ||
| 321 | (provide 'rfc822) | 321 | (provide 'rfc822) |