emacs-diffs
[Top][All Lists]
Advanced

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

master b42df36 2/2: Modernise a code example in os.texi


From: Lars Ingebrigtsen
Subject: master b42df36 2/2: Modernise a code example in os.texi
Date: Sat, 8 Aug 2020 09:17:45 -0400 (EDT)

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

    Modernise a code example in os.texi
    
    * doc/lispref/os.texi (Session Management): Use
    with-current-buffer in the example instead of save+switch (bug#40341).
---
 doc/lispref/os.texi | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index a7f3534..504f0df 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2688,9 +2688,8 @@ Emacs is restarted by the session manager.
 @group
 (defun save-yourself-test ()
   (insert
-   (format "%S" '(save-current-buffer
-                  (switch-to-buffer "*scratch*")
-                  (insert "I am restored"))))
+   (format "%S" '(with-current-buffer "*scratch*"
+                   (insert "I am restored"))))
   nil)
 @end group
 @end example



reply via email to

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