]> git.eshelyaron.com Git - emacs.git/commitdiff
Modernise a code example in os.texi
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 8 Aug 2020 13:17:33 +0000 (15:17 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 8 Aug 2020 13:17:38 +0000 (15:17 +0200)
* doc/lispref/os.texi (Session Management): Use
with-current-buffer in the example instead of save+switch (bug#40341).

doc/lispref/os.texi

index a7f353407ce90566821ad9add316470910507c38..504f0dfb23e94a181d763fe1c567e19bdd9b1b0e 100644 (file)
@@ -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