From xemacs-m  Sat Feb 15 14:37:30 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA07270
	for <xemacs-beta@xemacs.org>; Sat, 15 Feb 1997 14:37:28 -0600 (CST)
Received: by crystal.WonderWorks.COM 
	id QQcdaw15188; Sat, 15 Feb 1997 15:37:28 -0500 (EST)
Date: Sat, 15 Feb 1997 15:37:28 -0500 (EST)
Message-Id: <QQcdaw15188.199702152037@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org
Subject: [PATCH] 20.0: info switches buffer in wrong frame

If you invoke Info mode from the toolbar, typing `q' sometimes
switches buffers in another frame.  This is beecause
switch-to-buffer is called after the Info frame is deleted.
There is no need to call switch-to-buffer in that case.

Here's a patch.

*** 1.1 1997/02/15 20:02:40
--- lisp/packages/info.el       1997/02/15 20:06:52
***************
*** 1826,1836 ****
    (interactive)
    (if Info-standalone
        (save-buffers-kill-emacs)
!     (switch-to-buffer (prog1 (other-buffer (current-buffer))
!                       (bury-buffer (current-buffer))
!                       (if (featurep 'toolbar)
!                           (if (frame-live-p toolbar-info-frame)
!                               (delete-frame toolbar-info-frame)))))))
  
  (defun Info-undefined ()
    "Make command be undefined in Info."
--- 1826,1836 ----
    (interactive)
    (if Info-standalone
        (save-buffers-kill-emacs)
!     (bury-buffer (current-buffer))
!     (if (and (featurep 'toolbar)
!            (eq toolbar-info-frame (selected-frame)))
!       (delete-frame toolbar-info-frame)
!       (switch-to-buffer (other-buffer (current-buffer))))))
  
  (defun Info-undefined ()
    "Make command be undefined in Info."

