GNU bug report logs - #40341
[PATCH] * doc/lispref/os.texi (Session Management): make example homoiconic

Previous Next

Package: emacs;

Reported by: oitofelix <at> gnu.org

Date: Tue, 31 Mar 2020 07:10:01 UTC

Severity: minor

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 40341 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: oitofelix <at> gnu.org
Cc: 40341 <at> debbugs.gnu.org
Subject: Re: bug#40341: [PATCH] * doc/lispref/os.texi (Session Management):
 make example homoiconic
Date: Tue, 14 Apr 2020 09:52:56 -0400
severity 40341 minor
quit

oitofelix <at> 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.)




This bug report was last modified 4 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.