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 #16 received at 40341 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
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: Sat, 08 Aug 2020 15:14:26 +0200
oitofelix <at> gnu.org writes:

> I think hardcoded strings with Lisp code in Lisp code is a bad practice,
> given that Lisp’s main distinguishing feature is its homocoinicity.  In
> my opinion the Lisp reference manual should encouraged homoiconic
> programming --- or, at least, not to promote the contrary.

[...]

>  @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)

Thanks; applied to Emacs 28.1.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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