summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2011-09-21 10:20:21 +0200
committerMartin Rudalics <rudalics@gmx.at>2011-09-21 10:20:21 +0200
commitcf4eacfdca9685473374498e17ace141d71c9ad9 (patch)
tree6b15976a360657769ca615a73be5eab2adf128a6 /lisp/help.el
parent3341db6299a2bb63a641210d72f73e93e2d1542e (diff)
downloademacs-cf4eacfdca9685473374498e17ace141d71c9ad9.tar.gz
Rewrite code quitting windows and restoring the previous buffer.
* window.el (set-window-buffer-start-and-point): Call set-window-start with NOFORCE argument t. Suggested by Thierry Volpiatto <thierry.volpiatto@gmail.com>. (quit-window): Reword doc-string. Handle new format of quit-restore parameter. Don't delete window if it has a previous buffer we can show instead of the present one. (display-buffer-record-window): Rewrite using a new format for the quit-restore window parameter (special-display-popup-frame, display-buffer-same-window) (display-buffer-reuse-window, display-buffer-pop-up-frame) (display-buffer-pop-up-window, display-buffer-use-some-window): Adapt symbol passed to display-buffer-record-window. * help.el (help-window-setup): Handle new format of quit-restore parameter.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 0c8d67106d3..f4338c28ffb 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1066,7 +1066,7 @@ HELP-WINDOW is the window used for displaying the help buffer."
(let* ((help-buffer (when (window-live-p help-window)
(window-buffer help-window)))
(help-setup (when (window-live-p help-window)
- (window-parameter help-window 'help-setup))))
+ (car (window-parameter help-window 'quit-restore)))))
(when help-buffer
;; Handle `help-window-point-marker'.
(when (eq (marker-buffer help-window-point-marker) help-buffer)
@@ -1077,7 +1077,7 @@ HELP-WINDOW is the window used for displaying the help buffer."
(cond
((or (eq help-window (selected-window))
(and (or (eq help-window-select t)
- (eq help-setup 'new-frame)
+ (eq help-setup 'frame)
(and (eq help-window-select 'other)
(eq (window-frame help-window) (selected-frame))
(> (length (window-list nil 'no-mini)) 2)))
@@ -1085,12 +1085,12 @@ HELP-WINDOW is the window used for displaying the help buffer."
;; The help window is or gets selected ...
(help-window-display-message
(cond
- ((eq help-setup 'new-window)
+ ((eq help-setup 'window)
;; ... and is new, ...
"Type \"q\" to delete help window")
- ((eq help-setup 'new-frame)
+ ((eq help-setup 'frame)
"Type \"q\" to delete help frame")
- ((eq help-setup 'reuse-other)
+ ((eq help-setup 'other)
;; ... or displayed some other buffer before.
"Type \"q\" to restore previous buffer"))
help-window t))
@@ -1100,19 +1100,19 @@ HELP-WINDOW is the window used for displaying the help buffer."
;; other one is the selected one.
(help-window-display-message
(cond
- ((eq help-setup 'new-window)
+ ((eq help-setup 'window)
"Type \\[delete-other-windows] to delete the help window")
- ((eq help-setup 'reuse-other)
+ ((eq help-setup 'other)
"Type \"q\" in help window to restore its previous buffer"))
help-window 'other))
(t
;; The help window is not selected ...
(help-window-display-message
(cond
- ((eq help-setup 'new-window)
+ ((eq help-setup 'window)
;; ... and is new, ...
"Type \"q\" in help window to delete it")
- ((eq help-setup 'reuse-other)
+ ((eq help-setup 'other)
;; ... or displayed some other buffer before.
"Type \"q\" in help window to restore previous buffer"))
help-window))))))