diff options
| author | Glenn Morris | 2018-07-13 09:28:15 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-07-13 09:28:15 -0700 |
| commit | cda7e1850f2f19a5025fd163ff2c6c6cba275acf (patch) | |
| tree | 1fdb0014a632e936da813128ead6353051436cbd /doc/lispref | |
| parent | 1013e0392b78ee0e2199fb51859dc9e939315f9b (diff) | |
| parent | 17ebb6e5ae9cdd2586d1b4d6f2347ae09c6f653f (diff) | |
| download | emacs-cda7e1850f2f19a5025fd163ff2c6c6cba275acf.tar.gz emacs-cda7e1850f2f19a5025fd163ff2c6c6cba275acf.zip | |
Merge from origin/emacs-26
17ebb6e (origin/emacs-26) Use consistent function names in thread-tes...
1c86229 Fix format error in Faccept_process_output
b38b91a Lessen stack consumption in recursive read1
3eb4603 Match w32 paths in grep sans --null hits (Bug#32051)
5cc7c4b Fix previous make-network-process change
d6a1b69 Another documentation improvement in flyspell.el
9b49a8e Improve documentation of Flyspell
3744fda Provide feature 'threads
ef9025f Save the server alias on reconnect (Bug#29657)
db3874b Refer to "proper lists" instead of "true lists"
35e0305 Avoid turning on the global-minor-mode recursively
51bf4e4 Fix Bug#32085
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/lists.texi | 23 | ||||
| -rw-r--r-- | doc/lispref/sequences.texi | 2 |
2 files changed, 14 insertions, 11 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index 57cefeac962..b7bb3cf6be1 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} | |||
| 50 | slots have similar properties). Hence, the @sc{cdr} slot of each cons | 50 | slots have similar properties). Hence, the @sc{cdr} slot of each cons |
| 51 | cell in a list refers to the following cons cell. | 51 | cell 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 |
| 57 | symbol 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 | 59 | manual.}. In Emacs Lisp, the symbol @code{nil} is both a symbol and a |
| 59 | as its @sc{car}). | 60 | list with no elements. For convenience, the symbol @code{nil} is |
| 60 | 61 | considered 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 | ||
| 63 | elements except the first. | 66 | elements 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. |
| 72 | We call that structure a @dfn{circular list}. | 75 | We 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, |
| 75 | circular or dotted. If a program doesn't look far enough down the | 78 | circular or dotted. If a program doesn't look far enough down the |
| 76 | list to see the @sc{cdr} of the final cons cell, it won't care. | 79 | list to see the @sc{cdr} of the final cons cell, it won't care. |
| 77 | However, some functions that operate on lists demand true lists and | 80 | However, some functions that operate on lists demand proper lists and |
| 78 | signal errors if given a dotted list. Most functions that try to find | 81 | signal errors if given a dotted list. Most functions that try to find |
| 79 | the end of a list enter infinite loops if given a circular list. | 82 | the end of a list enter infinite loops if given a circular list. |
| 80 | 83 | ||
| @@ -538,7 +541,7 @@ object. The final argument is not copied or converted; it becomes the | |||
| 538 | is itself a list, then its elements become in effect elements of the | 541 | is itself a list, then its elements become in effect elements of the |
| 539 | result list. If the final element is not a list, the result is a | 542 | result list. If the final element is not a list, the result is a |
| 540 | dotted list since its final @sc{cdr} is not @code{nil} as required | 543 | dotted list since its final @sc{cdr} is not @code{nil} as required |
| 541 | in a true list. | 544 | in a proper list (@pxref{Cons Cells}). |
| 542 | @end defun | 545 | @end defun |
| 543 | 546 | ||
| 544 | Here is an example of using @code{append}: | 547 | Here is an example of using @code{append}: |
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index b98889eb099..be7a4020625 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 |
| 1357 | This function returns a new vector containing all the elements of | 1357 | This 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, |
| 1359 | vectors, strings or bool-vectors. If no @var{sequences} are given, | 1359 | vectors, strings or bool-vectors. If no @var{sequences} are given, |
| 1360 | the empty vector is returned. | 1360 | the empty vector is returned. |
| 1361 | 1361 | ||