Subject: bug#30792: closed (Re: bug#30792: 26.0.91; improve docstring of with-help-window)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 20 Mar 2018 12:29:02 +0000

Your bug report

#30792: 26.0.91; improve docstring of with-help-window

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
30792: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30792
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#30792: 26.0.91; improve docstring of with-help-window
From: Eli Zaretskii <[email-masked]>
To: Nick Helm <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Tue, 20 Mar 2018 14:28:00 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Nick Helm <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, martin rudalics <[email-masked]>
> Date: Mon, 19 Mar 2018 00:19:03 +1300
> 
> Two patches attached.

Thanks, I pushed them to the emacs-26 branch.

Note that they needed "some work", please try to make sure these minor
nits are taken care of in your future contributions:

  . always mention the bug number in the commit log message
  . make sure the lines in the commit log message are shorter than 67
    characters, so that they don't overflow a line when converted to a
    ChangeLog file
  . be sure to read the docs after renaming variables, because
    frequently additional changes are needed to make the result clear
    and/or palatable
  . it's better not to break a changeset into separate parts, unless
    really necessary, so that the result is a single commit on the
    mainline

Keeping those rules will allow us to use "git am" instead of
committing manually.

Subject: 26.0.91; improve docstring of with-help-window
From: Nick Helm <[email-masked]>
To: [email-masked]
Date: Tue, 13 Mar 2018 22:39:27 +1300
List-Id: <debbugs-submit.debbugs.gnu.org>

I find the docstring of `with-help-window' a little hard to follow, so I
had a go at improving it. This also renames the var BUFFER-NAME to
BUFFER-OR-NAME to match `with-temp-buffer-window' and others.

--- a/lisp/help.el	2018-03-13 19:52:32.000000000 +1300
+++ b/lisp/help.el	2018-03-13 21:54:07.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."
   (declare (indent 1) (debug t))
   `(progn
      ;; Make `help-window-point-marker' point nowhere.  The only place