emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 7651f044e2: Improve the with-output-to-temp-buffer doc string


From: Lars Ingebrigtsen
Subject: master 7651f044e2: Improve the with-output-to-temp-buffer doc string
Date: Sat, 15 Jan 2022 03:31:41 -0500 (EST)

branch: master
commit 7651f044e26d5139d7140e0c4fd052893ef422d7
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Improve the with-output-to-temp-buffer doc string
    
    * lisp/subr.el (with-output-to-temp-buffer): Clarify the point of
    the macro (bug#53265).
---
 lisp/subr.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index dd260dfe41..81c0233853 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -4294,11 +4294,13 @@ in which case `save-window-excursion' cannot help."
 (defmacro with-output-to-temp-buffer (bufname &rest body)
   "Bind `standard-output' to buffer BUFNAME, eval BODY, then show that buffer.
 
-This construct makes buffer BUFNAME empty before running BODY.
-It does not make the buffer current for BODY.
-Instead it binds `standard-output' to that buffer, so that output
-generated with `prin1' and similar functions in BODY goes into
-the buffer.
+This is a convenience macro meant for displaying help buffers and
+the like.  It empties the BUFNAME buffer before evaluating BODY
+and disables undo in that buffer.
+
+It does not make the buffer current for BODY.  Instead it binds
+`standard-output' to that buffer, so that output generated with
+`prin1' and similar functions in BODY goes into the buffer.
 
 At the end of BODY, this marks buffer BUFNAME unmodified and displays
 it in a window, but does not select it.  The normal way to do this is



reply via email to

[Prev in Thread] Current Thread [Next in Thread]