[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40341: [PATCH] * doc/lispref/os.texi (Session Management): make exam
From: |
Lars Ingebrigtsen |
Subject: |
bug#40341: [PATCH] * doc/lispref/os.texi (Session Management): make example homoiconic |
Date: |
Sat, 08 Aug 2020 15:14:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
oitofelix@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
- bug#40341: [PATCH] * doc/lispref/os.texi (Session Management): make example homoiconic,
Lars Ingebrigtsen <=