[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30792: 26.0.91; improve docstring of with-help-window
From: |
Eli Zaretskii |
Subject: |
bug#30792: 26.0.91; improve docstring of with-help-window |
Date: |
Tue, 13 Mar 2018 18:53:32 +0200 |
> From: Nick Helm <nick@tenpoint.co.nz>
> Date: Tue, 13 Mar 2018 23:31:01 +1300
> Cc: 30792@debbugs.gnu.org
>
> Sorry, got a little ahead of myself. Try this.
>
> --- a/lisp/help.el 2018-03-13 19:52:32.000000000 +1300
> +++ b/lisp/help.el 2018-03-13 23:23:52.000000000 +1300
> @@ -1370,15 +1370,20 @@
>
> ;; (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)
> + "Show buffer BUFFER-OR-NAME with output of BODY in a help window.
> +Make the buffer specified by BUFFER-OR-NAME empty (or create it
> +if it does not exist). Evaluate BODY with `standard-output' bound
> +to that buffer, so that output from `prin1' and similar functions
> +in BODY go into that buffer. The buffer is not made current while
> +BODY is evaluated. Finally, display the buffer in a window and
> +put it in `help-mode'. Return the value returned by BODY.
> +
> +The help window will be selected if `help-window-select' is
> +non-nil. However, if the help window displays on a different
> +frame, the window manager may automatically select that frame.
> +
> +See `with-temp-buffer-window' for more details."
Thanks.
It strikes me that instead of repeating most of what
with-temp-buffer-window's doc string says, it might be better to
simply refer to there. Like this:
Display the output produced by evaluating BODY, like
`with-temp-buffer-window' does, then put the window in
`help-mode' [...]
- bug#30792: 26.0.91; improve docstring of with-help-window, Nick Helm, 2018/03/13
- bug#30792: 26.0.91; improve docstring of with-help-window, martin rudalics, 2018/03/13
- bug#30792: 26.0.91; improve docstring of with-help-window, Nick Helm, 2018/03/13
- bug#30792: 26.0.91; improve docstring of with-help-window,
Eli Zaretskii <=
- bug#30792: 26.0.91; improve docstring of with-help-window, Nick Helm, 2018/03/13
- bug#30792: 26.0.91; improve docstring of with-help-window, martin rudalics, 2018/03/14
- bug#30792: 26.0.91; improve docstring of with-help-window, Eli Zaretskii, 2018/03/14
- bug#30792: 26.0.91; improve docstring of with-help-window, martin rudalics, 2018/03/14
- bug#30792: 26.0.91; improve docstring of with-help-window, Nick Helm, 2018/03/14
- bug#30792: 26.0.91; improve docstring of with-help-window, martin rudalics, 2018/03/15
- bug#30792: 26.0.91; improve docstring of with-help-window, Nick Helm, 2018/03/18
- bug#30792: 26.0.91; improve docstring of with-help-window, Eli Zaretskii, 2018/03/20
- bug#30792: 26.0.91; improve docstring of with-help-window, Eli Zaretskii, 2018/03/14