changeset 70326:a379c5190e90

(help-mode): view-exit-action calls delete-window only when it is safe and possible.
author Richard M. Stallman <rms@gnu.org>
date Mon, 01 May 2006 20:18:31 +0000
parents c8e4a9156d18
children 968389514970
files lisp/help-mode.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help-mode.el	Mon May 01 20:17:24 2006 +0000
+++ b/lisp/help-mode.el	Mon May 01 20:18:31 2006 +0000
@@ -197,7 +197,10 @@
   (view-mode)
   (make-local-variable 'view-no-disable-on-exit)
   (setq view-no-disable-on-exit t)
-  (setq view-exit-action (lambda (buffer) (delete-window)))
+  (setq view-exit-action (lambda (buffer)
+			   (or (window-minibuffer-p (selected-window))
+			       (one-window-p t)
+			       (delete-window))))
   (run-mode-hooks 'help-mode-hook))
 
 ;;;###autoload