# HG changeset patch # User root # Date 659659927 0 # Node ID 59aa7f7963b9a56cff0d579ce11714c8199215ef # Parent 27691d738b4f220765ad313468dc7743c026ca65 *** empty log message *** diff -r 27691d738b4f -r 59aa7f7963b9 lisp/mail/rfc822.el --- a/lisp/mail/rfc822.el Wed Nov 21 20:01:35 1990 +0000 +++ b/lisp/mail/rfc822.el Mon Nov 26 22:52:07 1990 +0000 @@ -239,19 +239,22 @@ ;; an addr-spec, since many broken mailers output ;; "Hern K. Herklemeyer III ;; " - (cond ((= n 0)) - ((> n 1) - (rfc822-bad-address "Missing route-spec")) - ((= (preceding-char) ?\ )) - (t (insert ?\ ))) - (rfc822-snarf-words) - (setq n (1+ n))) + (let ((again t)) + (while again + (or (= n 0) (bobp) (= (preceding-char) ?\ ) + (insert ?\ )) + (rfc822-snarf-word) + (setq n (1+ n)) + (setq again (or (rfc822-looking-at ?.) + (looking-at "[^][\000-\037\177-\377 ()<>@,;:\\.]")))))) ((= n 0) (throw 'address nil)) ((= n 1) ; allow "foo" (losing unix seems to do this) (throw 'address (buffer-substring address-start (point)))) - ((or (eobp) (looking-at ",")) + ((> n 1) + (rfc822-bad-address "Missing comma between addresses or badly-formatted address")) + ((or (eobp) (= (following-char) ?,)) (rfc822-bad-address "Missing comma or route-spec")) (t (rfc822-bad-address "Strange character or missing comma")))))))