summaryrefslogtreecommitdiff
path: root/lisp/mail/rfc822.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-09-24 17:56:13 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-09-24 17:56:13 +0000
commitc8145d5e956da6d50864e836d8179cb4fe792bf6 (patch)
tree88f9b45f6d46c6853fc80c079da7cdbd96a1223d /lisp/mail/rfc822.el
parent574297e3b9c978a845e92daade9671c7787c96f1 (diff)
downloademacs-c8145d5e956da6d50864e836d8179cb4fe792bf6.tar.gz
(rfc822-addresses): Prevent rfc822-bad-address from raising a
wrong-type-argument error.
Diffstat (limited to 'lisp/mail/rfc822.el')
-rw-r--r--lisp/mail/rfc822.el31
1 files changed, 17 insertions, 14 deletions
diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el
index 9a15072be6b..4e002296b1f 100644
--- a/lisp/mail/rfc822.el
+++ b/lisp/mail/rfc822.el
@@ -292,12 +292,15 @@
(goto-char (point-min))
(let ((list ())
tem
- rfc822-address-start); this is for rfc822-bad-address
- (rfc822-nuke-whitespace)
- (while (not (eobp))
- (setq rfc822-address-start (point))
- (setq tem
- (catch 'address ; this is for rfc822-bad-address
+ ;; This is for rfc822-bad-address. Give it a non-nil
+ ;; 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@;:\\.>)]")
@@ -306,14 +309,14 @@
(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))))))
+ (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)