aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBasil L. Contovounesios2018-07-10 19:51:28 -0700
committerPaul Eggert2018-07-10 19:54:31 -0700
commitdb3874b16192142f473d53e3b80213ad74d19eff (patch)
tree24fb2f5e7fd700b7c2550512284bf4fa25f9d4ff /doc
parent35e0305dc2a57cea6fcb515db9e0b0f938daf53a (diff)
downloademacs-db3874b16192142f473d53e3b80213ad74d19eff.tar.gz
emacs-db3874b16192142f473d53e3b80213ad74d19eff.zip
Refer to "proper lists" instead of "true lists"
* doc/lispref/lists.texi (Cons Cells, Building Lists): * doc/lispref/sequences.texi (Vector Functions): Use the more popular term "proper", rather than "true", to qualify nil-terminated lists. For discussion, see the following emacs-devel subthreads: https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00112.html https://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00138.html
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/lists.texi23
-rw-r--r--doc/lispref/sequences.texi2
2 files changed, 14 insertions, 11 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 431f5fbbab2..e05633a881d 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -50,16 +50,19 @@ convention; at the level of cons cells, the @sc{car} and @sc{cdr}
50slots have similar properties). Hence, the @sc{cdr} slot of each cons 50slots have similar properties). Hence, the @sc{cdr} slot of each cons
51cell in a list refers to the following cons cell. 51cell in a list refers to the following cons cell.
52 52
53@cindex proper list
53@cindex true list 54@cindex true list
54 Also by convention, the @sc{cdr} of the last cons cell in a list is 55 Also by convention, the @sc{cdr} of the last cons cell in a list is
55@code{nil}. We call such a @code{nil}-terminated structure a 56@code{nil}. We call such a @code{nil}-terminated structure a
56@dfn{true list}. In Emacs Lisp, the symbol @code{nil} is both a 57@dfn{proper list}@footnote{It is sometimes also referred to as a
57symbol and a list with no elements. For convenience, the symbol 58@dfn{true list}, but we generally do not use this terminology in this
58@code{nil} is considered to have @code{nil} as its @sc{cdr} (and also 59manual.}. In Emacs Lisp, the symbol @code{nil} is both a symbol and a
59as its @sc{car}). 60list with no elements. For convenience, the symbol @code{nil} is
60 61considered to have @code{nil} as its @sc{cdr} (and also as its
61 Hence, the @sc{cdr} of a true list is always a true list. The 62@sc{car}).
62@sc{cdr} of a nonempty true list is a true list containing all the 63
64 Hence, the @sc{cdr} of a proper list is always a proper list. The
65@sc{cdr} of a nonempty proper list is a proper list containing all the
63elements except the first. 66elements except the first.
64 67
65@cindex dotted list 68@cindex dotted list
@@ -71,10 +74,10 @@ Pair Notation}). There is one other possibility: some cons cell's
71@sc{cdr} could point to one of the previous cons cells in the list. 74@sc{cdr} could point to one of the previous cons cells in the list.
72We call that structure a @dfn{circular list}. 75We call that structure a @dfn{circular list}.
73 76
74 For some purposes, it does not matter whether a list is true, 77 For some purposes, it does not matter whether a list is proper,
75circular or dotted. If a program doesn't look far enough down the 78circular or dotted. If a program doesn't look far enough down the
76list to see the @sc{cdr} of the final cons cell, it won't care. 79list to see the @sc{cdr} of the final cons cell, it won't care.
77However, some functions that operate on lists demand true lists and 80However, some functions that operate on lists demand proper lists and
78signal errors if given a dotted list. Most functions that try to find 81signal errors if given a dotted list. Most functions that try to find
79the end of a list enter infinite loops if given a circular list. 82the end of a list enter infinite loops if given a circular list.
80 83
@@ -522,7 +525,7 @@ object. The final argument is not copied or converted; it becomes the
522is itself a list, then its elements become in effect elements of the 525is itself a list, then its elements become in effect elements of the
523result list. If the final element is not a list, the result is a 526result list. If the final element is not a list, the result is a
524dotted list since its final @sc{cdr} is not @code{nil} as required 527dotted list since its final @sc{cdr} is not @code{nil} as required
525in a true list. 528in a proper list (@pxref{Cons Cells}).
526@end defun 529@end defun
527 530
528 Here is an example of using @code{append}: 531 Here is an example of using @code{append}:
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 188a3451140..327de6eb86a 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -1355,7 +1355,7 @@ each initialized to @var{object}.
1355@defun vconcat &rest sequences 1355@defun vconcat &rest sequences
1356@cindex copying vectors 1356@cindex copying vectors
1357This function returns a new vector containing all the elements of 1357This function returns a new vector containing all the elements of
1358@var{sequences}. The arguments @var{sequences} may be true lists, 1358@var{sequences}. The arguments @var{sequences} may be proper lists,
1359vectors, strings or bool-vectors. If no @var{sequences} are given, 1359vectors, strings or bool-vectors. If no @var{sequences} are given,
1360the empty vector is returned. 1360the empty vector is returned.
1361 1361