From: Lars Ingebrigtsen Date: Sat, 8 Aug 2020 13:17:33 +0000 (+0200) Subject: Modernise a code example in os.texi X-Git-Tag: emacs-28.0.90~6746 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b42df36757e7c86f33730090a8a0789e957f8fba;p=emacs.git 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). --- diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index a7f353407ce..504f0dfb23e 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