unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Ivan Andrus <darthandrus@gmail.com>
Cc: 40693@debbugs.gnu.org
Subject: bug#40693: 28.0.50; json-encode-alist changes alist
Date: Sun, 19 Apr 2020 13:35:25 -0700	[thread overview]
Message-ID: <7b043ea4-2633-45dc-8e7f-79f86ff00d95@cs.ucla.edu> (raw)
In-Reply-To: <ADEA1261-D966-479A-937A-97957CFF63DA@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

> I still find it surprising that a back-quoted list would behave that way

Me too. This should be documented better, and to try to do that I installed the 
attached patch into the emacs-27 branch (this should appear on the master branch 
after the next merge).

[-- Attachment #2: 0001-Document-that-quoting-yields-constants.patch --]
[-- Type: text/x-patch, Size: 1551 bytes --]

From 81e7d7f111872c9f2aaf8885db50a22ed746d7b5 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 19 Apr 2020 09:37:51 -0700
Subject: [PATCH] Document that quoting yields constants

* doc/lispref/eval.texi (Quoting, Backquote):
Mention that quoted expressions yield a constant (Bug#40693).
---
 doc/lispref/eval.texi | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index f6f36ed342..46cfab164b 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -558,6 +558,7 @@ and vectors.)
 
 @defspec quote object
 This special form returns @var{object}, without evaluating it.
+The returned value is a constant, and should not be modified.
 @end defspec
 
 @cindex @samp{'} for quoting
@@ -612,10 +613,12 @@ only part of a list, while computing and substituting other parts.
 
   @dfn{Backquote constructs} allow you to quote a list, but
 selectively evaluate elements of that list.  In the simplest case, it
-is identical to the special form @code{quote}
+is identical to the special form
 @iftex
+@code{quote}.
 @end iftex
 @ifnottex
+@code{quote}
 (described in the previous section; @pxref{Quoting}).
 @end ifnottex
 For example, these two forms yield identical results:
@@ -693,6 +696,9 @@ Here are some examples:
 @end group
 @end example
 
+If a subexpression of a backquote construct has no substitutions or
+splices, it acts like @code{quote} in that it yields a constant that
+should not be modified.
 
 @node Eval
 @section Eval
-- 
2.17.1


  parent reply	other threads:[~2020-04-19 20:35 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-18  2:59 bug#40693: 28.0.50; json-encode-alist changes alist Ivan Andrus
2020-04-18 17:29 ` Dmitry Gutov
2020-04-18 21:00   ` Ivan Andrus
2020-04-18 23:13   ` Michael Heerdegen
2020-04-19  0:10     ` Dmitry Gutov
2020-04-19  0:29       ` Michael Heerdegen
2020-04-19  0:33     ` Basil L. Contovounesios
2020-04-19  0:34   ` Basil L. Contovounesios
2020-04-29 10:11     ` Basil L. Contovounesios
2020-04-29 10:30       ` Eli Zaretskii
2020-04-29 12:08         ` Dmitry Gutov
2020-04-29 12:21           ` Eli Zaretskii
2020-04-29 14:28             ` Dmitry Gutov
2020-04-29 14:40               ` Eli Zaretskii
2020-04-29 15:02                 ` Dmitry Gutov
2020-04-29 15:07                   ` Eli Zaretskii
2020-04-29 14:41             ` Basil L. Contovounesios
2020-05-18  1:24               ` Basil L. Contovounesios
2020-05-18 14:27                 ` Eli Zaretskii
2020-05-18 22:50                 ` Dmitry Gutov
2020-05-18 23:50                 ` João Távora
2020-05-21 21:14                   ` Basil L. Contovounesios
2020-05-21 22:16                     ` João Távora
2020-05-22 14:54                       ` Basil L. Contovounesios
2020-05-22 20:14                         ` João Távora
2020-05-23 16:13                           ` Basil L. Contovounesios
2020-05-23 19:40                             ` João Távora
2020-05-23 22:41                               ` Basil L. Contovounesios
2020-05-23 22:45                                 ` João Távora
2020-04-19 20:35 ` Paul Eggert [this message]
2020-04-19 21:01   ` Drew Adams
2020-04-19 22:14     ` Paul Eggert
2020-04-19 22:29       ` Michael Heerdegen
2020-04-19 23:59         ` Paul Eggert
2020-04-20  0:25           ` Michael Heerdegen
2020-04-20  0:32             ` Paul Eggert
2020-04-20  0:57               ` Michael Heerdegen
2020-04-20  2:55                 ` Paul Eggert
2020-04-20 14:56                   ` Eli Zaretskii
2020-04-20  5:45                 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7b043ea4-2633-45dc-8e7f-79f86ff00d95@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=40693@debbugs.gnu.org \
    --cc=darthandrus@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).