(gnus-eval-in-buffer-window): Select the last selected frame.
authoryamaoka <yamaoka>
Tue, 24 Aug 1999 13:28:11 +0000 (13:28 +0000)
committeryamaoka <yamaoka>
Tue, 24 Aug 1999 13:28:11 +0000 (13:28 +0000)
lisp/gnus-util.el

index 289f237..ee18c66 100644 (file)
   "Pop to BUFFER, evaluate FORMS, and then return to the original window."
   (let ((tempvar (make-symbol "GnusStartBufferWindow"))
         (w (make-symbol "w"))
-        (buf (make-symbol "buf")))
+        (buf (make-symbol "buf"))
+       (frame (make-symbol "frame")))
     `(let* ((,tempvar (selected-window))
             (,buf ,buffer)
-            (,w (get-buffer-window ,buf 'visible)))
+            (,w (get-buffer-window ,buf 'visible))
+           ,frame)
        (unwind-protect
            (progn
              (if ,w
@@ -64,7 +66,9 @@
                    (set-buffer (window-buffer ,w)))
                (pop-to-buffer ,buf))
              ,@forms)
-         (select-window ,tempvar)))))
+        (setq ,frame (selected-frame))
+         (select-window ,tempvar)
+        (select-frame ,frame)))))
 
 (put 'gnus-eval-in-buffer-window 'lisp-indent-function 1)
 (put 'gnus-eval-in-buffer-window 'edebug-form-spec '(form body))