Commit b42df367 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

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).
parent 527b8a80
Pipeline #6304 failed with stage
in 19 minutes and 48 seconds
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment