2006-11-14 Katsumi Yamaoka <yamaoka@jpl.org>
+ * gnus-util.el (gnus-extract-address-components): Work with address in
+ which the name portion contains @.
+
* lpath.el: Fbind custom-autoload.
2006-11-14 Reiner Steib <Reiner.Steib@gmx.de>
;; First find the address - the thing with the @ in it. This may
;; not be accurate in mail addresses, but does the trick most of
;; the time in news messages.
- (when (string-match "\\b[^@ \t<>]+[!@][^@ \t<>]+\\b" from)
- (setq address (substring from (match-beginning 0) (match-end 0))))
+ (cond (;; Special case: "foo@bar" <foo@bar>, i.e. one @ in the comment
+ ;; and one in the address.
+ (string-match "<\\([^@ \t<>]+[!@][^@ \t<>]+\\)>" from)
+ (setq address (substring from (match-beginning 1) (match-end 1))))
+ ((string-match "\\b[^@ \t<>]+[!@][^@ \t<>]+\\b" from)
+ (setq address (substring from (match-beginning 0) (match-end 0)))))
;; Then we check whether the "name <address>" format is used.
(and address
;; Linear white space is not required.