Sync
authoryamaoka <yamaoka>
Wed, 10 May 2000 23:44:52 +0000 (23:44 +0000)
committeryamaoka <yamaoka>
Wed, 10 May 2000 23:44:52 +0000 (23:44 +0000)
with `t-gnus-6_14'.

ChangeLog
lisp/gnus-bbdb.el

index c1cf35a..059e3f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-10   Daiki Ueno  <ueno@unixuser.org>
+
+       * lisp/gnus-bbdb.el (gnus-bbdb/pop-up-bbdb-buffer): Don't bind
+       `bbdb-use-pop-up' while executing `bbdb-pop-up-bbdb-buffer'.
+
 2000-05-10  Katsumi Yamaoka <yamaoka@jpl.org>
 
        * lisp/gnus-msg.el (gnus-debug): Break MIME tags from the snoopies.
index c00a253..119e3bf 100644 (file)
@@ -117,35 +117,31 @@ This buffer will be in bbdb-mode, with associated keybindings."
 (defun gnus-bbdb/pop-up-bbdb-buffer (&optional offer-to-create)
   "Make the *BBDB* buffer be displayed along with the GNUS windows,
 displaying the record corresponding to the sender of the current message."
-  (let ((bbdb-gag-messages t)
-       (bbdb-use-pop-up nil)
-       (bbdb-electric-p nil))
-    (let ((record (gnus-bbdb/update-record offer-to-create))
-         (bbdb-elided-display (bbdb-pop-up-elided-display))
-         (b (current-buffer)))
+  (let* ((bbdb-gag-messages t)
+        (bbdb-electric-p nil)
+        (record
+         (let (bbdb-use-pop-up)
+           (gnus-bbdb/update-record offer-to-create)))
+        (bbdb-elided-display (bbdb-pop-up-elided-display)))
+    (save-current-buffer
       ;; display the bbdb buffer iff there is a record for this article.
-      (cond (record
-            (bbdb-pop-up-bbdb-buffer
-             (function (lambda (w)
-                         (let ((b (current-buffer)))
-                           (set-buffer (window-buffer w))
-                           (prog1 (or (eq major-mode 'mime-veiw-mode)
-                                      (eq major-mode 'gnus-article-mode))
-                                  (set-buffer b))))))
-            (bbdb-display-records (list record)))
-           (t
-            (or bbdb-inside-electric-display
-                (not (get-buffer-window bbdb-buffer-name))
-                (let (w)
-                  (delete-other-windows)
-                  (if (assq 'article gnus-buffer-configuration)
-                      (gnus-configure-windows 'article)
-                    (gnus-configure-windows 'SelectArticle))
-                  (if (setq w (get-buffer-window gnus-summary-buffer))
-                      (select-window w))
-                  ))))
-      (set-buffer b)
-      record)))
+      (cond
+       (record
+       (bbdb-pop-up-bbdb-buffer
+        (function (lambda (w)
+                    (with-current-buffer (window-buffer w)
+                      (memq major-mode
+                            '(mime-view-mode gnus-article-mode))))))
+       (bbdb-display-records (list record)))
+       ((and (not bbdb-inside-electric-display)
+            (get-buffer-window bbdb-buffer-name))
+       (delete-other-windows)
+       (if (assq 'article gnus-buffer-configuration)
+           (gnus-configure-windows 'article)
+         (gnus-configure-windows 'SelectArticle))
+       (let ((w (get-buffer-window gnus-summary-buffer)))
+         (if w (select-window w))))))
+    record))
 
 ;;;###autoload
 (defun gnus-bbdb/split-mail (header-field bbdb-field