[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 c46700deb0a 1/2: Add more text to clarify the behavior of 'with
From: |
Eli Zaretskii |
Subject: |
emacs-29 c46700deb0a 1/2: Add more text to clarify the behavior of 'with-current-buffer' |
Date: |
Wed, 29 Nov 2023 08:05:35 -0500 (EST) |
branch: emacs-29
commit c46700deb0aa8750f19e91d050e76c91fff8ce11
Author: Xiyue Deng <manphiz@gmail.com>
Commit: Eli Zaretskii <eliz@gnu.org>
Add more text to clarify the behavior of 'with-current-buffer'
* doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer): Expand
description of 'with-current-buffer'. (Bug#67521)
Copyright-paperwork-exempt: yes
---
doc/lispintro/emacs-lisp-intro.texi | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/doc/lispintro/emacs-lisp-intro.texi
b/doc/lispintro/emacs-lisp-intro.texi
index e4a0f585f69..ba93dfd3b91 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -5445,7 +5445,11 @@ That expression starts with @code{get-buffer-create
buffer}. The
function tells the computer to use the buffer with the name specified
as the one to which you are copying, or if such a buffer does not
exist, to create it. Then, the @code{with-current-buffer} function
-evaluates its body with that buffer temporarily current.
+evaluates its body with that buffer temporarily current, after which
+it will switch back to the buffer we are at now@footnote{It is like
+calling @code{(save-excursion (set-buffer ...) ...)} in one go, though
+it is defined slightly differently which interested reader can find
+out using @code{describe-function}}.
(This demonstrates another way to shift the computer's attention but
not the user's. The @code{append-to-buffer} function showed how to do