[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40341: [PATCH] * doc/lispref/os.texi (Session Management): make exam
From: |
Noam Postavsky |
Subject: |
bug#40341: [PATCH] * doc/lispref/os.texi (Session Management): make example homoiconic |
Date: |
Tue, 14 Apr 2020 09:52:56 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) |
severity 40341 minor
quit
oitofelix@gnu.org writes:
> --- a/doc/lispref/os.texi
> +++ b/doc/lispref/os.texi
> @@ -2675,10 +2675,10 @@ Emacs is restarted by the session manager.
>
> @group
> (defun save-yourself-test ()
> - (insert "(save-current-buffer
> - (switch-to-buffer \"*scratch*\")
> - (insert \"I am restored\"))")
> - nil)
> + (insert (format "%S" '(save-current-buffer
> + (switch-to-buffer "*scratch*")
> + (insert "I am restored"))))
> + nil)
Shouldn't this example also be using set-buffer instead of
switch-to-buffer? (Or rather, with-current-buffer instead of
save-current-buffer + switch-to-buffer.)
- bug#40341: [PATCH] * doc/lispref/os.texi (Session Management): make example homoiconic,
Noam Postavsky <=