@cindex @code{nil} and lists
Lists in Lisp are not a primitive data type; they are built up from
-@dfn{cons cells}. A cons cell is a data object which represents an ordered
-pair. It records two Lisp objects, one labeled as the @sc{car}, and the
-other labeled as the @sc{cdr}. These names are traditional; @sc{cdr} is
-pronounced ``could-er.''
+@dfn{cons cells}. A cons cell is a data object that represents an
+ordered pair. It records two Lisp objects, one labeled as the @sc{car},
+and the other labeled as the @sc{cdr}. These names are traditional; see
+@ref{Cons Cell Type}. @sc{cdr} is pronounced ``could-er.''
A list is a series of cons cells chained together, one cons cell per
element of the list. By convention, the @sc{car}s of the cons cells are
level of cons cells, the @sc{car} and @sc{cdr} slots have the same
characteristics.
+@cindex list structure
+ Because most cons cells are used as part of lists, the phrase
+@dfn{list structure} has come to mean any structure made out of cons
+cells.
+
The symbol @code{nil} is considered a list as well as a symbol; it is
the list with no elements. For convenience, the symbol @code{nil} is
considered to have @code{nil} as its @sc{cdr} (and also as its
@end group
@end example
- @xref{List Type}, for the read and print syntax of lists, and for more
-``box and arrow'' illustrations of lists.
+ @xref{Cons Cell Type}, for the read and print syntax of cons cells and
+lists, and for more ``box and arrow'' illustrations of lists.
@node List-related Predicates
@section Predicates on Lists
This function returns @code{t} if @var{object} is an atom, @code{nil}
otherwise. All objects except cons cells are atoms. The symbol
@code{nil} is an atom and is also a list; it is the only Lisp object
-which is both.
+that is both.
@example
(atom @var{object}) @equiv{} (not (consp @var{object}))
@defun append &rest sequences
@cindex copying lists
This function returns a list containing all the elements of
-@var{sequences}. The @var{sequences} may be lists, vectors, or strings.
-All arguments except the last one are copied, so none of them are
-altered.
+@var{sequences}. The @var{sequences} may be lists, vectors, or strings,
+but the last one should be a list. All arguments except the last one
+are copied, so none of them are altered.
+
+More generally, the final argument to @code{append} may be any Lisp
+object. The final argument is not copied or converted; it becomes the
+@sc{cdr} of the last cons cell in the new list. If the final argument
+is itself a list, then its elements become in effect elements of the
+result list. If the final element is not a list, the result is a
+``dotted list'' since its final @sc{cdr} is not @code{nil} as required
+in a true list.
- The final argument to @code{append} may be any object but it is
-typically a list. The final argument is not copied or converted; it
-becomes part of the structure of the new list.
+See @code{nconc} in @ref{Rearrangement}, for a way to join lists with no
+copying.
- Here is an example:
+Here is an example of using @code{append}:
@example
@group
@end group
@end example
-You can see what happens by looking at a box diagram. The variable
-@code{trees} is set to the list @code{(pine oak)} and then the variable
-@code{more-trees} is set to the list @code{(maple birch pine oak)}.
-However, the variable @code{trees} continues to refer to the original
-list:
+You can see how @code{append} works by looking at a box diagram. The
+variable @code{trees} is set to the list @code{(pine oak)} and then the
+variable @code{more-trees} is set to the list @code{(maple birch pine
+oak)}. However, the variable @code{trees} continues to refer to the
+original list:
@smallexample
@group
@end group
@end example
-See @code{nconc} in @ref{Rearrangement}, for a way to join lists with no
-copying.
+Here are some examples where the final argument is not a list:
+
+@example
+(append '(x y) 'z)
+ @result{} (x y z)
+(append '(x y) [z])
+ @result{} (x y [z])
+@end example
+
+@noindent
+The second example shows that when the final argument is a sequence but
+not a list, the sequence's elements do not become elements of the
+resulting list. Instead, the sequence becomes the final @sc{cdr}, like
+any other non-list final argument.
Integers are also allowed as arguments to @code{append}. They are
converted to strings of digits making up the decimal print
@node Setcar
@subsection Altering List Elements with @code{setcar}
- Changing the @sc{car} of a cons cell is done with @code{setcar}, which
-replaces one element of a list with a different element.
+ Changing the @sc{car} of a cons cell is done with @code{setcar}. When
+used on a list, @code{setcar} replaces one element of a list with a
+different element.
@defun setcar cons object
This function stores @var{object} as the new @sc{car} of @var{cons},
The lowest-level primitive for modifying a @sc{cdr} is @code{setcdr}:
@defun setcdr cons object
-This function stores @var{object} into the @sc{cdr} of @var{cons}. The
-value returned is @var{object}, not @var{cons}.
+This function stores @var{object} as the new @sc{cdr} of @var{cons},
+replacing its previous @sc{cdr}. It returns the value @var{object}.
@end defun
Here is an example of replacing the @sc{cdr} of a list with a
functions ``destructive'' because they chew up the original lists passed
to them as arguments, to produce a new list that is the returned value.
+@ifinfo
+ See @code{delq}, in @ref{Sets And Lists}, for another function
+that modifies cons cells.
+@end ifinfo
+@iftex
+ The function @code{delq} in the following section is another example
+of destructive list manipulation.
+@end iftex
+
@defun nconc &rest lists
@cindex concatenating lists
@cindex joining lists
@defun nreverse list
@cindex reversing a list
This function reverses the order of the elements of @var{list}.
-Unlike @code{reverse}, @code{nreverse} alters its argument destructively
-by reversing the @sc{cdr}s in the cons cells forming the list. The cons
-cell which used to be the last one in @var{list} becomes the first cell
-of the value.
+Unlike @code{reverse}, @code{nreverse} alters its argument by reversing
+the @sc{cdr}s in the cons cells forming the list. The cons cell that
+used to be the last one in @var{list} becomes the first cell of the
+value.
For example:
sorted order. If you wish to make a sorted copy without destroying the
original, copy it first with @code{copy-sequence} and then sort.
+Sorting does not change the @sc{car}s of the cons cells in @var{list};
+each cons cell in the result contains the same element that it contained
+before. The result differs from the argument @var{list} because the
+cells themselves have been reordered.
+
Sorting does not change the @sc{car}s of the cons cells in @var{list};
the cons cell that originally contained the element @code{a} in
@var{list} still has @code{a} in its @sc{car} after sorting, but it now
useful example of @code{sort}.
@end defun
-@ifinfo
- See @code{delq}, in @ref{Sets And Lists}, for another function
-that modifies cons cells.
-@end ifinfo
-@iftex
- The function @code{delq} in the following section is another example
-of destructive list manipulation.
-@end iftex
-
@node Sets And Lists
@section Using Lists as Sets
@cindex lists as sets
@example
@group
-(memq 2 '(1 2 3 2 1))
- @result{} (2 3 2 1)
+(memq 'b '(a b c b a))
+ @result{} (b c b a)
@end group
@group
(memq '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are not @code{eq}.}
@example
@group
-(setq sample-list '(1 2 3 (4)))
- @result{} (1 2 3 (4))
+(setq sample-list '(a b c (4)))
+ @result{} (a b c (4))
@end group
@group
-(delq 1 sample-list)
- @result{} (2 3 (4))
+(delq 'a sample-list)
+ @result{} (b c (4))
@end group
@group
sample-list
- @result{} (1 2 3 (4))
+ @result{} (a b c (4))
@end group
@group
-(delq 2 sample-list)
- @result{} (1 3 (4))
+(delq 'c sample-list)
+ @result{} (a c (4))
@end group
@group
sample-list
- @result{} (1 3 (4))
+ @result{} (a c (4))
@end group
@end example
-Note that @code{(delq 2 sample-list)} modifies @code{sample-list} to
-splice out the second element, but @code{(delq 1 sample-list)} does not
+Note that @code{(delq 'b sample-list)} modifies @code{sample-list} to
+splice out the second element, but @code{(delq 'a sample-list)} does not
splice anything---it just returns a shorter list. Don't assume that a
variable which formerly held the argument @var{list} now has fewer
elements, or that it still holds the original list! Instead, save the
@example
@group
(delq '(4) sample-list)
- @result{} (1 3 (4))
+ @result{} (a c (4))
@end group
@end example
@result{} nil
@end smallexample
-Here is another example in which the keys and values are not symbols:
+Here is another example, in which the keys and values are not symbols:
@smallexample
(setq needles-per-cluster
@group
(setq needles-per-cluster
'((2 . ("Austrian Pine" "Red Pine"))
- (3 . "Pitch Pine")
- (5 . "White Pine")))
+ (3 . ("Pitch Pine"))
+ (5 . ("White Pine"))))
@result{}
((2 "Austrian Pine" "Red Pine")
- (3 . "Pitch Pine")
- (5 . "White Pine"))
+ (3 "Pitch Pine")
+ (5 "White Pine"))
(setq copy (copy-alist needles-per-cluster))
@result{}
((2 "Austrian Pine" "Red Pine")
- (3 . "Pitch Pine")
- (5 . "White Pine"))
+ (3 "Pitch Pine")
+ (5 "White Pine"))
(eq needles-per-cluster copy)
@result{} nil
(eq (car needles-per-cluster) (car copy))
@result{} nil
(cdr (car (cdr needles-per-cluster)))
- @result{} "Pitch Pine"
+ @result{} ("Pitch Pine")
(eq (cdr (car (cdr needles-per-cluster)))
(cdr (car (cdr copy))))
@result{} t
@end group
+@end example
+
+ This example shows how @code{copy-alist} makes it possible to change
+the associations of one copy without affecting the other:
+
+@example
+@group
+(setcdr (assq 3 needles-per-cluster)
+ '("Martian Vacuum Pine"))
+(cdr (assq 3 needles-per-cluster))
+ @result{} ("Pitch Pine")
+@end group
@end smallexample
@end defun
@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@setfilename ../info/objects
-@node Types of Lisp Object, Numbers, Introduction, Top
+@node Lisp Data Types, Numbers, Introduction, Top
@chapter Lisp Data Types
@cindex object
@cindex Lisp object
In most languages, the programmer must declare the data type of each
variable, and the type is known by the compiler but not represented in
the data. Such type declarations do not exist in Emacs Lisp. A Lisp
-variable can have any type of value, and remembers the type of any value
-you store in it.
+variable can have any type of value, and it remembers whatever value
+you store in it, type and all.
This chapter describes the purpose, printed representation, and read
syntax of each of the standard types in GNU Emacs Lisp. Details on how
* Character Type:: The representation of letters, numbers and
control characters.
* Sequence Type:: Both lists and arrays are classified as sequences.
-* List Type:: Lists gave Lisp its name (not to mention reputation).
+* Cons Cell Type:: Cons cells, and lists (which are made from cons cells).
* Array Type:: Arrays include strings and vectors.
* String Type:: An (efficient) array of characters.
* Vector Type:: One-dimensional arrays.
overflow. Thus @code{(1+ 8388607)} is @minus{}8388608 on 24-bit
implementations.@refill
- The read syntax for numbers is a sequence of (base ten) digits with an
+ The read syntax for integers is a sequence of (base ten) digits with an
optional sign at the beginning and an optional period at the end. The
printed representation produced by the Lisp interpreter never has a
leading @samp{+} or a final @samp{.}.
@end example
You can use the same syntax for punctuation characters, but it is
-often a good idea to add a @samp{\} to prevent Lisp mode from getting
-confused. For example, @samp{?\ } is the way to write the space
-character. If the character is @samp{\}, you @emph{must} use a second
-@samp{\} to quote it: @samp{?\\}.
+often a good idea to add a @samp{\} so that the Emacs commands for
+editing Lisp code don't get confused. For example, @samp{?\ } is the
+way to write the space character. If the character is @samp{\}, you
+@emph{must} use a second @samp{\} to quote it: @samp{?\\}.
@cindex whitespace
@cindex bell character
The read syntax for meta characters uses @samp{\M-}. For example,
@samp{?\M-A} stands for @kbd{M-A}. You can use @samp{\M-} together with
-octal codes, @samp{\C-}, or any other syntax for a character. Thus, you
-can write @kbd{M-A} as @samp{?\M-A}, or as @samp{?\M-\101}. Likewise,
-you can write @kbd{C-M-b} as @samp{?\M-\C-b}, @samp{?\C-\M-b}, or
-@samp{?\M-\002}.
+octal character codes (see below), with @samp{\C-}, or with any other
+syntax for a character. Thus, you can write @kbd{M-A} as @samp{?\M-A},
+or as @samp{?\M-\101}. Likewise, you can write @kbd{C-M-b} as
+@samp{?\M-\C-b}, @samp{?\C-\M-b}, or @samp{?\M-\002}.
The case of an ordinary letter is indicated by its character code as
part of @sc{ASCII}, but @sc{ASCII} has no way to represent whether a
the easily readable escape sequences, such as @samp{\t}, instead of an
actual whitespace character such as a tab.
+@node Symbol Type
+@subsection Symbol Type
+
+ A @dfn{symbol} in GNU Emacs Lisp is an object with a name. The symbol
+name serves as the printed representation of the symbol. In ordinary
+use, the name is unique---no two symbols have the same name.
+
+ A symbol can serve as a variable, as a function name, or to hold a
+property list. Or it may serve only to be distinct from all other Lisp
+objects, so that its presence in a data structure may be recognized
+reliably. In a given context, usually only one of these uses is
+intended. But you can use one symbol in all of these ways,
+independently.
+
+@cindex @samp{\} in symbols
+@cindex backslash in symbols
+ A symbol name can contain any characters whatever. Most symbol names
+are written with letters, digits, and the punctuation characters
+@samp{-+=*/}. Such names require no special punctuation; the characters
+of the name suffice as long as the name does not look like a number.
+(If it does, write a @samp{\} at the beginning of the name to force
+interpretation as a symbol.) The characters @samp{_~!@@$%^&:<>@{@}} are
+less often used but also require no special punctuation. Any other
+characters may be included in a symbol's name by escaping them with a
+backslash. In contrast to its use in strings, however, a backslash in
+the name of a symbol simply quotes the single character that follows the
+backslash. For example, in a string, @samp{\t} represents a tab
+character; in the name of a symbol, however, @samp{\t} merely quotes the
+letter @kbd{t}. To have a symbol with a tab character in its name, you
+must actually use a tab (preceded with a backslash). But it's rare to
+do such a thing.
+
+@cindex CL note---case of letters
+@quotation
+@b{Common Lisp note:} in Common Lisp, lower case letters are always
+``folded'' to upper case, unless they are explicitly escaped. This is
+in contrast to Emacs Lisp, in which upper case and lower case letters
+are distinct.
+@end quotation
+
+ Here are several examples of symbol names. Note that the @samp{+} in
+the fifth example is escaped to prevent it from being read as a number.
+This is not necessary in the last example because the rest of the name
+makes it invalid as a number.
+
+@example
+@group
+foo ; @r{A symbol named @samp{foo}.}
+FOO ; @r{A symbol named @samp{FOO}, different from @samp{foo}.}
+char-to-string ; @r{A symbol named @samp{char-to-string}.}
+@end group
+@group
+1+ ; @r{A symbol named @samp{1+}}
+ ; @r{(not @samp{+1}, which is an integer).}
+@end group
+@group
+\+1 ; @r{A symbol named @samp{+1}}
+ ; @r{(not a very readable name).}
+@end group
+@group
+\(*\ 1\ 2\) ; @r{A symbol named @samp{(* 1 2)} (a worse name).}
+@c the @'s in this next line use up three characters, hence the
+@c apparent misalignment of the comment.
++-*/_~!@@$%^&=:<>@{@} ; @r{A symbol named @samp{+-*/_~!@@$%^&=:<>@{@}}.}
+ ; @r{These characters need not be escaped.}
+@end group
+@end example
+
@node Sequence Type
@subsection Sequence Types
Arrays are further subdivided into strings and vectors. Vectors can
hold elements of any type, but string elements must be characters in the
range from 0 to 255. However, the characters in a string can have text
-properties; vectors do not support text properties even when their
-elements happen to be characters.
+properties like characters in a buffer (@pxref{Text Properties});
+vectors do not support text properties even when their elements happen
+to be characters.
Lists, strings and vectors are different, but they have important
similarities. For example, all have a length @var{l}, and all have
exception: the empty list @code{()} always stands for the same object,
@code{nil}.
-@node List Type
-@subsection List Type
+@node Cons Cell Type
+@subsection Cons Cell and List Types
@cindex address field of register
@cindex decrement field of register
- A @dfn{list} is a series of cons cells, linked together. A @dfn{cons
-cell} is an object comprising two pointers named the @sc{car} and the
-@sc{cdr}. Each of them can point to any Lisp object, but when the cons
-cell is part of a list, the @sc{cdr} points either to another cons cell
-or to the empty list. @xref{Lists}, for functions that work on lists.
+ A @dfn{cons cell} is an object comprising two pointers named the
+@sc{car} and the @sc{cdr}. Each of them can point to any Lisp object.
+
+ A @dfn{list} is a series of cons cells, linked together so that the
+@sc{cdr} of each cons cell points either to another cons cell or to the
+empty list. @xref{Lists}, for functions that work on lists. Because
+most cons cells are used as part of lists, the phrase @dfn{list
+structure} has come to refer to any structure made out of cons cells.
The names @sc{car} and @sc{cdr} have only historical meaning now. The
original Lisp implementation ran on an @w{IBM 704} computer which
Upon reading, each object inside the parentheses becomes an element
of the list. That is, a cons cell is made for each element. The
@sc{car} of the cons cell points to the element, and its @sc{cdr} points
-to the next cons cell which holds the next element in the list. The
-@sc{cdr} of the last cons cell is set to point to @code{nil}.
+to the next cons cell of the list, which holds the next element in the
+list. The @sc{cdr} of the last cons cell is set to point to @code{nil}.
@cindex box diagrams, for lists
@cindex diagrams, boxed, for lists
A list can be illustrated by a diagram in which the cons cells are
shown as pairs of boxes. (The Lisp reader cannot read such an
-illustration; unlike the textual notation, which can be understood both
-humans and computers, the box illustrations can only be understood by
-humans.) The following represents the three-element list @code{(rose
+illustration; unlike the textual notation, which can be understood by
+both humans and computers, the box illustrations can be understood only
+by humans.) The following represents the three-element list @code{(rose
violet buttercup)}:
@example
An @dfn{array} is composed of an arbitrary number of slots for
referring to other Lisp objects, arranged in a contiguous block of
-memory. Accessing any element of an array takes a the same amount of
+memory. Accessing any element of an array takes the same amount of
time. In contrast, accessing an element of a list requires time
proportional to the position of the element in the list. (Elements at
the end of a list take longer to access than elements at the beginning
This is not the same representation that the meta modifier has in a
character on its own (not inside a string). @xref{Character Type}.
- Strings cannot hold characters that have the hyper, super or alt
+ Strings cannot hold characters that have the hyper, super, or alt
modifiers; they can hold @sc{ASCII} control characters, but no others.
They do not distinguish case in @sc{ASCII} control characters.
- In contrast with the C programming language, Emacs Lisp allows
-newlines in string literals. But an escaped newline---one that is
-preceded by @samp{\}---does not become part of the string; i.e., the
-Lisp reader ignores an escaped newline in a string literal.
+ The printed representation of a string consists of a double-quote, the
+characters it contains, and another double-quote. However, you must
+escape any backslash or double-quote characters in the string with a
+backslash, like this: @code{"this \" is an embedded quote"}.
+
+ The newline character is not special in the read syntax for strings;
+if you write a new line between the double-quotes, it becomes a
+character in the string. But an escaped newline---one that is preceded
+by @samp{\}---does not become part of the string; i.e., the Lisp reader
+ignores an escaped newline while reading a string.
@cindex newline in strings
@example
but the newline is ignored if escaped."
@end example
- The printed representation of a string consists of a double-quote, the
-characters it contains, and another double-quote. However, any
-backslash or double-quote characters in the string are preceded with a
-backslash like this: @code{"this \" is an embedded quote"}.
-
A string can hold properties of the text it contains, in addition to
the characters themselves. This enables programs that copy text between
strings and buffers to preserve the properties with no special effort.
@xref{Vectors}, for functions that work with vectors.
-@node Symbol Type
-@subsection Symbol Type
-
- A @dfn{symbol} in GNU Emacs Lisp is an object with a name. The symbol
-name serves as the printed representation of the symbol. In ordinary
-use, the name is unique---no two symbols have the same name.
-
- A symbol can serve as a variable, as a function name, or to hold a
-property list. Or it may serve only to be distinct from all other Lisp
-objects, so that its presence in a data structure may be recognized
-reliably. In a given context, usually only one of these uses is
-intended. But you can use one symbol in all of these ways,
-independently.
-
-@cindex @samp{\} in symbols
-@cindex backslash in symbols
- A symbol name can contain any characters whatever. Most symbol names
-are written with letters, digits, and the punctuation characters
-@samp{-+=*/}. Such names require no special punctuation; the characters
-of the name suffice as long as the name does not look like a number.
-(If it does, write a @samp{\} at the beginning of the name to force
-interpretation as a symbol.) The characters @samp{_~!@@$%^&:<>@{@}} are
-less often used but also require no special punctuation. Any other
-characters may be included in a symbol's name by escaping them with a
-backslash. In contrast to its use in strings, however, a backslash in
-the name of a symbol quotes the single character that follows the
-backslash, without conversion. For example, in a string, @samp{\t}
-represents a tab character; in the name of a symbol, however, @samp{\t}
-merely quotes the letter @kbd{t}. To have a symbol with a tab character
-in its name, you must actually use a tab (preceded with a backslash).
-But it's rare to do such a thing.
-
-@cindex CL note---case of letters
-@quotation
-@b{Common Lisp note:} in Common Lisp, lower case letters are always
-``folded'' to upper case, unless they are explicitly escaped. This is
-in contrast to Emacs Lisp, in which upper case and lower case letters
-are distinct.
-@end quotation
-
- Here are several examples of symbol names. Note that the @samp{+} in
-the fifth example is escaped to prevent it from being read as a number.
-This is not necessary in the last example because the rest of the name
-makes it invalid as a number.
-
-@example
-@group
-foo ; @r{A symbol named @samp{foo}.}
-FOO ; @r{A symbol named @samp{FOO}, different from @samp{foo}.}
-char-to-string ; @r{A symbol named @samp{char-to-string}.}
-@end group
-@group
-1+ ; @r{A symbol named @samp{1+}}
- ; @r{(not @samp{+1}, which is an integer).}
-@end group
-@group
-\+1 ; @r{A symbol named @samp{+1}}
- ; @r{(not a very readable name).}
-@end group
-@group
-\(*\ 1\ 2\) ; @r{A symbol named @samp{(* 1 2)} (a worse name).}
-@c the @'s in this next line use up three characters, hence the
-@c apparent misalignment of the comment.
-+-*/_~!@@$%^&=:<>@{@} ; @r{A symbol named @samp{+-*/_~!@@$%^&=:<>@{@}}.}
- ; @r{These characters need not be escaped.}
-@end group
-@end example
-
-@node Lisp Function Type
-@subsection Lisp Function Type
+@node Function Type
+@subsection Function Type
Just as functions in other programming languages are executable,
@dfn{Lisp function} objects are pieces of executable code. However,
a function object at run time and then call it with the primitive
functions @code{funcall} and @code{apply}. @xref{Calling Functions}.
-@node Lisp Macro Type
-@subsection Lisp Macro Type
+@node Macro Type
+@subsection Macro Type
A @dfn{Lisp macro} is a user-defined construct that extends the Lisp
language. It is represented as an object much like a function, but with
but calls from C code may still use the built-in definition.
The term @dfn{function} refers to all Emacs functions, whether written
-in Lisp or C. @xref{Lisp Function Type}, for information about the
-functions written in Lisp.@refill
+in Lisp or C. @xref{Function Type}, for information about the
+functions written in Lisp.
Primitive functions have no read syntax and print in hash notation
with the name of the subroutine.
Each buffer has a designated position called @dfn{point}
(@pxref{Positions}). At any time, one buffer is the @dfn{current
buffer}. Most editing commands act on the contents of the current
-buffer in the neighborhood of point. Many other functions manipulate or
-test the characters in the current buffer; a whole chapter in this
-manual is devoted to describing these functions (@pxref{Text}).
+buffer in the neighborhood of point. Many of the standard Emacs
+functions manipulate or test the characters in the current buffer; a
+whole chapter in this manual is devoted to describing these functions
+(@pxref{Text}).
Several other data structures are associated with each buffer:
@end itemize
@noindent
-The local keymap and variable list contain entries which individually
+The local keymap and variable list contain entries that individually
override global bindings or values. These are used to customize the
behavior of programs in different buffers, without actually changing the
programs.
Streams have no special printed representation or read syntax, and
print as whatever primitive type they are.
- @xref{Streams}, for a description of various functions related to
-streams, including various parsing and printing functions.
+ @xref{Streams, Reading and Printing}, for a description of functions
+related to streams, including parsing and printing functions.
@node Keymap Type
@subsection Keymap Type
symbol. These modes specify different interpretations by changing the
syntax table entry for @samp{+}, at index 43 in the syntax table.
- Syntax tables are only used for scanning text in buffers, not for
+ Syntax tables are used only for scanning text in buffers, not for
reading Lisp expressions. The table the Lisp interpreter uses to read
expressions is built into the Emacs source code and cannot be changed;
thus, to change the list delimiters to be @samp{@{} and @samp{@}}
All built-in functions do check the types of their actual arguments
when appropriate, and signal a @code{wrong-type-argument} error if an
argument is of the wrong type. For example, here is what happens if you
-pass an argument to @code{+} which it cannot handle:
+pass an argument to @code{+} that it cannot handle:
@example
@group
@item markerp
@xref{Predicates on Markers, markerp}.
-@item natnump
-@xref{Predicates on Numbers, natnump}.
+@item wholenump
+@xref{Predicates on Numbers, wholenump}.
@item nlistp
@xref{List-related Predicates, nlistp}.
Here we describe two functions that test for equality between any two
objects. Other functions test equality between objects of specific
-types, e.g., strings. See the appropriate chapter describing the data
-type for these predicates.
+types, e.g., strings. For these predicates, see the appropriate chapter
+describing the data type.
@defun eq object1 object2
This function returns @code{t} if @var{object1} and @var{object2} are