Subject: [PATCH] * doc/lispref/os.texi (Session Management): make example homoiconic

From: [email-masked]
Date: Tue, 31 Mar 2020 04:09:22 -0300

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.

>From 5a707993cdee582dcbc423f990205798ae3c421e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bruno=20F=C3=A9lix=20Rezende=20Ribeiro?= <[email-masked]>
Date: Tue, 31 Mar 2020 03:55:35 -0300
Subject: [PATCH] * doc/lispref/os.texi (Session Management): make example
 homoiconic

---
 doc/lispref/os.texi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index e72858b..680d327 100644
--- 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)
 @end group
 @end example
 
-- 
2.7.4

-- 
Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
<http://oitofelix.freeshell.org/>