Merge from gnus--rel--5.10
[gnus] / lisp / gnus-util.el
index 4f5d108..7e94d4e 100644 (file)
@@ -1,7 +1,7 @@
 ;;; gnus-util.el --- utility functions for Gnus
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -103,7 +103,7 @@ This is a compatibility function for different Emacsen."
 (put 'gnus-eval-in-buffer-window 'edebug-form-spec '(form body))
 
 (defmacro gnus-intern-safe (string hashtable)
-  "Set hash value.  Arguments are STRING, VALUE, and HASHTABLE."
+  "Get hash value.  Arguments are STRING and HASHTABLE."
   `(let ((symbol (intern ,string ,hashtable)))
      (or (boundp symbol)
         (set symbol nil))
@@ -173,8 +173,9 @@ is slower."
     ;; 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.
-    (cond (;; Special case: "foo@bar" <foo@bar>, i.e. one @ in the comment
-          ;; and one in the address.
+    (cond (;; Check ``<foo@bar>'' first in order to handle the quite common
+          ;; form ``"abc@xyz" <foo@bar>'' (i.e. ``@'' as part of a comment)
+          ;; correctly.
           (string-match "<\\([^@ \t<>]+[!@][^@ \t<>]+\\)>" from)
           (setq address (substring from (match-beginning 1) (match-end 1))))
          ((string-match "\\b[^@ \t<>]+[!@][^@ \t<>]+\\b" from)