aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-10-26 12:24:28 +0000
committerGerd Moellmann1999-10-26 12:24:28 +0000
commita61b9217743f577b6d511b24e231362f3efd1c59 (patch)
treeb70ae44681b9f3113e49115faaa453b1d947f6a0
parentd5c3f902bd12b08dbbcab84603b5b67cc17ff50e (diff)
downloademacs-a61b9217743f577b6d511b24e231362f3efd1c59.tar.gz
emacs-a61b9217743f577b6d511b24e231362f3efd1c59.zip
Patch from rms.
-rw-r--r--lispref/objects.texi42
1 files changed, 29 insertions, 13 deletions
diff --git a/lispref/objects.texi b/lispref/objects.texi
index 7a70f4417ac..1da82860262 100644
--- a/lispref/objects.texi
+++ b/lispref/objects.texi
@@ -22,12 +22,12 @@ but not for ``the'' type of an object.
22 22
23@cindex primitive type 23@cindex primitive type
24 A few fundamental object types are built into Emacs. These, from 24 A few fundamental object types are built into Emacs. These, from
25which all other types are constructed, are called @dfn{primitive 25which all other types are constructed, are called @dfn{primitive types}.
26types}. Each object belongs to one and only one primitive type. These 26Each object belongs to one and only one primitive type. These types
27types include @dfn{integer}, @dfn{float}, @dfn{cons}, @dfn{symbol}, 27include @dfn{integer}, @dfn{float}, @dfn{cons}, @dfn{symbol},
28@dfn{string}, @dfn{vector}, @dfn{subr}, and @dfn{byte-code function}, plus 28@dfn{string}, @dfn{vector}, @dfn{hash-table}, @dfn{subr}, and
29several special types, such as @dfn{buffer}, that are related to 29@dfn{byte-code function}, plus several special types, such as
30editing. (@xref{Editing Types}.) 30@dfn{buffer}, that are related to editing. (@xref{Editing Types}.)
31 31
32 Each primitive type has a corresponding Lisp function that checks 32 Each primitive type has a corresponding Lisp function that checks
33whether an object is a member of that type. 33whether an object is a member of that type.
@@ -470,6 +470,11 @@ reliably. In a given context, usually only one of these uses is
470intended. But you can use one symbol in all of these ways, 470intended. But you can use one symbol in all of these ways,
471independently. 471independently.
472 472
473 A symbol whose name starts with a colon (@samp{:}) is called a
474@dfn{keyword symbol}. These symbols automatically act as constants, and
475are normally used only by comparing an unknown symbol with a few
476specific alternatives.
477
473@cindex @samp{\} in symbols 478@cindex @samp{\} in symbols
474@cindex backslash in symbols 479@cindex backslash in symbols
475 A symbol name can contain any characters whatever. Most symbol names 480 A symbol name can contain any characters whatever. Most symbol names
@@ -1697,7 +1702,7 @@ types. In most cases, it is more convenient to use type predicates than
1697This function returns a symbol naming the primitive type of 1702This function returns a symbol naming the primitive type of
1698@var{object}. The value is one of the symbols @code{symbol}, 1703@var{object}. The value is one of the symbols @code{symbol},
1699@code{integer}, @code{float}, @code{string}, @code{cons}, @code{vector}, 1704@code{integer}, @code{float}, @code{string}, @code{cons}, @code{vector},
1700@code{char-table}, @code{bool-vector}, @code{subr}, 1705@code{char-table}, @code{bool-vector}, @code{hash-table}, @code{subr},
1701@code{compiled-function}, @code{marker}, @code{overlay}, @code{window}, 1706@code{compiled-function}, @code{marker}, @code{overlay}, @code{window},
1702@code{buffer}, @code{frame}, @code{process}, or 1707@code{buffer}, @code{frame}, @code{process}, or
1703@code{window-configuration}. 1708@code{window-configuration}.
@@ -1794,8 +1799,9 @@ Symbols}.
1794This function returns @code{t} if @var{object1} and @var{object2} have 1799This function returns @code{t} if @var{object1} and @var{object2} have
1795equal components, @code{nil} otherwise. Whereas @code{eq} tests if its 1800equal components, @code{nil} otherwise. Whereas @code{eq} tests if its
1796arguments are the same object, @code{equal} looks inside nonidentical 1801arguments are the same object, @code{equal} looks inside nonidentical
1797arguments to see if their elements are the same. So, if two objects are 1802arguments to see if their elements or contents are the same. So, if two
1798@code{eq}, they are @code{equal}, but the converse is not always true. 1803objects are @code{eq}, they are @code{equal}, but the converse is not
1804always true.
1799 1805
1800@example 1806@example
1801@group 1807@group
@@ -1858,9 +1864,19 @@ contents are entirely @sc{ascii} (@pxref{Text Representations}).
1858@end group 1864@end group
1859@end example 1865@end example
1860 1866
1861Two distinct buffers are never @code{equal}, even if their contents 1867However, two distinct buffers are never considered @code{equal}, even if
1862are the same. 1868their textual contents are the same.
1863@end defun 1869@end defun
1864 1870
1865 The test for equality is implemented recursively, and circular lists may 1871 The test for equality is implemented recursively; for example, given
1866therefore cause infinite recursion (leading to an error). 1872two cons cells @var{x} and @var{y}, @code{(equal @var{x} @var{y})}
1873returns @code{t} if and only if both the expressions below return
1874@code{t}:
1875
1876@example
1877(equal (car @var{x}) (car @var{y}))
1878(equal (cdr @var{x}) (cdr @var{y}))
1879@end example
1880
1881Because of this recursive method, circular lists may therefore cause
1882infinite recursion (leading to an error).