1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

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).
This commit is contained in:
Lars Ingebrigtsen 2020-08-08 15:17:33 +02:00
parent 527b8a8071
commit b42df36757

View 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