Update.
[elisp/gnus.git-] / lisp / gnus-bbdb.el
index 8019ef4..6caef29 100644 (file)
@@ -1,4 +1,4 @@
-;; gnus-bbdb.el --- Interface to Nana-gnus version 6.10.2.
+;; gnus-bbdb.el --- Interface to Semi-gnus
 
 ;; Copyright (c) 1991,1992,1993 Jamie Zawinski <jwz@netscape.com>.
 ;; Copyright (C) 1995,1996,1997 Shuhei KOBAYASHI
@@ -9,7 +9,7 @@
 ;; Author: Shuhei KOBAYASHI <shuhei-k@jaist.ac.jp>
 ;; Keywords: BBDB, MIME, multimedia, multilingual, mail, news
 
-;; This file is part of Nana-gnus.
+;; This file is part of Semi-gnus.
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as
@@ -64,9 +64,9 @@ the user confirms the creation."
          (when (setq from (mail-fetch-field "from"))
            (setq from (gnus-bbdb/extract-address-components
                        (gnus-bbdb/decode-field-body from 'From))))
-         (when (or (null from)
-                   (string-match (bbdb-user-mail-names)
-                                 (car (cdr from))))
+         (when (and (car (cdr from))
+                    (string-match (bbdb-user-mail-names)
+                                  (car (cdr from))))
            ;; if logged-in user sent this, use recipients.
            (let ((to (mail-fetch-field "to")))
              (when to
@@ -110,6 +110,8 @@ This buffer will be in bbdb-mode, with associated keybindings."
        (bbdb-display-records (list record))
        (error "unperson"))))
 
+;; Avoid byte-compile warning.
+(defvar bbdb-pop-up-elided-display)
 
 (defun gnus-bbdb/pop-up-bbdb-buffer (&optional offer-to-create)
   "Make the *BBDB* buffer be displayed along with the GNUS windows,
@@ -483,7 +485,8 @@ beginning of the message headers."
             methods (cdr methods)))
     (if (string= address "") (setq address nil))
     (if (string= phrase "") (setq phrase nil))
-    (list phrase address)
+    (when (or phrase address)
+      (list phrase address))
     ))
 
 ;;; @ full-name canonicalization methods