[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/gnus-select 06a984e 138/218: Improve documentation
From: |
Andrew G Cohen |
Subject: |
[Emacs-diffs] feature/gnus-select 06a984e 138/218: Improve documentation of 'with-help-window' |
Date: |
Fri, 14 Dec 2018 03:35:17 -0500 (EST) |
branch: feature/gnus-select
commit 06a984e14ec56784db957b2673c143a506101ba7
Author: Nick Helm <address@hidden>
Commit: Andrew G Cohen <address@hidden>
Improve documentation of 'with-help-window'
* doc/lispref/help.texi (Help Functions): Change variable name
to 'buffer-or-name'.
* lisp/help.el (with-help-window): Change variable name to
'buffer-or-name' and rewrite the doc string, adding reference
to 'help-window-setup'. (Bug#30792)
---
doc/lispref/help.texi | 19 ++++++++++---------
lisp/help.el | 19 +++++++++----------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 33cc2f0..6dd55d0 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -744,16 +744,17 @@ This function returns the name of the help buffer, which
is normally
@end defun
@vindex help-window-select
address@hidden with-help-window buffer-name address@hidden
address@hidden with-help-window buffer-or-name address@hidden
This macro evaluates @var{body} like @code{with-output-to-temp-buffer}
-(@pxref{Temporary Displays}), inserting any output produced by its forms
-into a buffer named @var{buffer-name}. (Usually, @var{buffer-name}
-should be the value returned by the function @code{help-buffer}.) It
-also puts the specified buffer into Help mode and displays a message
-telling the user how to quit and scroll the help window. It selects the
-help window if the current value of the user option
address@hidden has been set accordingly. It returns the last
-value in @var{body}.
+(@pxref{Temporary Displays}), inserting any output produced by its
+forms into a buffer specified by @var{buffer-or-name}, which can be a
+buffer or the name of a buffer. (Frequently, @var{buffer-or-name} is
+the value returned by the function @code{help-buffer}.) This macro
+puts the specified buffer into Help mode and displays a message
+telling the user how to quit and scroll the help window. It selects
+the help window if the current value of the user option
address@hidden has been set accordingly. It returns the
+last value in @var{body}.
@end defmac
@defun help-setup-xref item interactive-p
diff --git a/lisp/help.el b/lisp/help.el
index 0830dc5..90be457 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.
- [Emacs-diffs] feature/gnus-select 43af089 113/218: * lisp/url/url-handlers.el: No need for subr-x at run-time., (continued)
- [Emacs-diffs] feature/gnus-select 43af089 113/218: * lisp/url/url-handlers.el: No need for subr-x at run-time., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 9e3f6aa 104/218: Explicitly require cl-lib where needed, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 1d789ec 117/218: Allow 'browse-url-emacs' to fetch URL in the selected window, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 9c19d2d 116/218: Fix typo in the Emacs manual's VC chapter, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select d448a99 124/218: ; Spelling fix, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 31b6fa0 115/218: Various follow-ups for early init file changes, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select d5087f9 131/218: ; * test/lisp/info-xref-tests.el: Remove stray line from previous., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 44c15fe 133/218: ; Spelling fix, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 3b15508 136/218: * lisp/textmodes/bibtex.el (bibtex-mark-entry): activate mark, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 7387d26 144/218: Port to 32-bit sparc64, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 06a984e 138/218: Improve documentation of 'with-help-window',
Andrew G Cohen <=
- [Emacs-diffs] feature/gnus-select 4523701 147/218: * lisp/isearch.el (isearch-pre-command-hook): Replace cl-lib function., Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 751ecf3 135/218: Set gnus-newsgroup-selection in the summary buffer, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 16fc857 142/218: ; Rewrap doc string, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 118f691 103/218: cedet: remove obsolete name args to constructors, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select aa16566 168/218: Fix Bug#30904, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 8671f03 166/218: Adjust eieio persistence tests for expected failure, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 9d4baa3 165/218: Let eieio-persistent-read read what object-write has written, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select a1b7a1e 163/218: Add new tests for eieio persistence, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 267b827 170/218: Fix commit c24c5dc4a4, Andrew G Cohen, 2018/12/14
- [Emacs-diffs] feature/gnus-select 91bdd5a 157/218: Provide completion in vc-git-stash-* commands, Andrew G Cohen, 2018/12/14