summaryrefslogtreecommitdiff
path: root/doc/lispintro
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-05-16 17:17:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-05-16 18:24:07 -0700
commit6ac2326e5bc4796087910eb429e0cb4384e0e0cf (patch)
treec9a3a32445d1a7dff31829d4efc8f3ed8dcc0c09 /doc/lispintro
parentb4937f64cd97ff6bf93538987c014f8ea8ff9d34 (diff)
downloademacs-6ac2326e5bc4796087910eb429e0cb4384e0e0cf.tar.gz
Don’t use “constant” for values you shouldn’t change
Inspired by patch proposed by Dmitry Gutov (Bug#40671#393) and by further comments by him and by Michael Heerdegen in the same bug report. * doc/lispintro/emacs-lisp-intro.texi (setcar): Don’t push mutability here. * doc/lispref/eval.texi (Self-Evaluating Forms, Quoting) (Backquote): * doc/lispref/lists.texi (Modifying Lists): * doc/lispref/objects.texi (Lisp Data Types, Mutability): * doc/lispref/sequences.texi (Array Functions, Vectors): * doc/lispref/strings.texi (String Basics, Modifying Strings): Don’t use the word “constant” to describe all values that a program should not change. * doc/lispref/objects.texi (Mutability): Rename from “Constants and Mutability”. All uses changed. In a footnote, contrast the Emacs behavior with that of Common Lisp, Python, etc. for clarity, and say the goal is to be nicer.
Diffstat (limited to 'doc/lispintro')
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi5
1 files changed, 1 insertions, 4 deletions
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index ea16d9ef155..46462162ca0 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -7317,8 +7317,6 @@ which leave the original list as it was. One way to find out how this
works is to experiment. We will start with the @code{setcar} function.
@need 1200
-@cindex constant lists
-@cindex mutable lists
First, we can make a list and then set the value of a variable to the
list, using the @code{setq} special form. Because we intend to use
@code{setcar} to change the list, this @code{setq} should not use the
@@ -7327,8 +7325,7 @@ a list that is part of the program and bad things could happen if we
tried to change part of the program while running it. Generally
speaking an Emacs Lisp program's components should be constant (or
unchanged) while the program is running. So we instead construct an
-animal list that is @dfn{mutable} (or changeable) by using the
-@code{list} function, as follows:
+animal list by using the @code{list} function, as follows:
@smallexample
(setq animals (list 'antelope 'giraffe 'lion 'tiger))