summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el19
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 0830dc5d3cf..90be45777b0 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1309,15 +1309,14 @@ Return VALUE."
;; (4) A marker (`help-window-point-marker') to move point in the help
;; window to an arbitrary buffer position.
-(defmacro with-help-window (buffer-name &rest body)
- "Display buffer named BUFFER-NAME in a help window.
-Evaluate the forms in BODY with standard output bound to a buffer
-called BUFFER-NAME (creating it if it does not exist), put that
-buffer in `help-mode', display the buffer in a window (see
-`with-temp-buffer-window' for details) and issue a message how to
-deal with that \"help\" window when it's no more needed. Select
-the help window if the current value of the user option
-`help-window-select' says so. Return last value in BODY."
+(defmacro with-help-window (buffer-or-name &rest body)
+ "Evaluate BODY, send output to BUFFER-OR-NAME and show in a help window.
+This construct is like `with-temp-buffer-window' but unlike that
+puts the buffer specified by BUFFER-OR-NAME in `help-mode' and
+displays a message about how to delete the help window when it's no
+longer needed. The help window will be selected if
+`help-window-select' is non-nil. See `help-window-setup' for
+more options."
(declare (indent 1) (debug t))
`(progn
;; Make `help-window-point-marker' point nowhere. The only place
@@ -1329,7 +1328,7 @@ the help window if the current value of the user option
(cons 'help-mode-finish temp-buffer-window-show-hook)))
(setq help-window-old-frame (selected-frame))
(with-temp-buffer-window
- ,buffer-name nil 'help-window-setup (progn ,@body)))))
+ ,buffer-or-name nil 'help-window-setup (progn ,@body)))))
;; Called from C, on encountering `help-char' when reading a char.
;; Don't print to *Help*; that would clobber Help history.