diff lisp/prim/help.el @ 165:5a88923fcbfe r20-3b9

Import from CVS: tag r20-3b9
author cvs
date Mon, 13 Aug 2007 09:44:42 +0200
parents 3bb7ccffb0c0
children 8eaf7971accc
line wrap: on
line diff
--- a/lisp/prim/help.el	Mon Aug 13 09:43:39 2007 +0200
+++ b/lisp/prim/help.el	Mon Aug 13 09:44:42 2007 +0200
@@ -188,16 +188,17 @@
 (define-key help-mode-map 'delete 'scroll-down)
 
 (defun help-mode-quit ()
-  "Exits from help mode, possibly restoring the previous window configuration."
+  "Exits from help mode, possibly restoring the previous window configuration.
+Bury the help buffer to the end of the buffer list."
   (interactive)
-  (cond ((frame-property (selected-frame) 'help-window-config)
+  (let ((buf (current-buffer)))
+    (cond ((frame-property (selected-frame) 'help-window-config)
 	   (set-window-configuration
 	    (frame-property (selected-frame) 'help-window-config))
 	   (set-frame-property  (selected-frame) 'help-window-config nil))
-        ((one-window-p)
-	 (bury-buffer))
-        (t
-         (delete-window))))
+	  ((not (one-window-p))
+	   (delete-window)))
+    (bury-buffer buf)))
 
 (defun help-quit ()
   (interactive)