GNU bug report logs -
#40341
[PATCH] * doc/lispref/os.texi (Session Management): make example homoiconic
Previous Next
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
View this message in rfc822 format
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 341 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.