diff options
| -rw-r--r-- | doc/lispref/objects.texi | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 745baacc297..2e8e2ee7147 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -964,7 +964,8 @@ char-tables. | |||
| 964 | 964 | ||
| 965 | A string is an array of characters and a vector is an array of | 965 | A string is an array of characters and a vector is an array of |
| 966 | arbitrary objects. A bool-vector can hold only @code{t} or @code{nil}. | 966 | arbitrary objects. A bool-vector can hold only @code{t} or @code{nil}. |
| 967 | These kinds of array may have any length up to the largest integer. | 967 | These kinds of array may have any length up to the largest fixnum, |
| 968 | subject to system architecture limits and available memory. | ||
| 968 | Char-tables are sparse arrays indexed by any valid character code; they | 969 | Char-tables are sparse arrays indexed by any valid character code; they |
| 969 | can hold arbitrary objects. | 970 | can hold arbitrary objects. |
| 970 | 971 | ||
| @@ -2085,7 +2086,7 @@ appropriate chapter describing the data type. | |||
| 2085 | This function returns @code{t} if @var{object1} and @var{object2} are | 2086 | This function returns @code{t} if @var{object1} and @var{object2} are |
| 2086 | the same object, and @code{nil} otherwise. | 2087 | the same object, and @code{nil} otherwise. |
| 2087 | 2088 | ||
| 2088 | If @var{object1} and @var{object2} are integers with the same value, | 2089 | If @var{object1} and @var{object2} are fixnums with the same value, |
| 2089 | they are considered to be the same object (i.e., @code{eq} returns | 2090 | they are considered to be the same object (i.e., @code{eq} returns |
| 2090 | @code{t}). If @var{object1} and @var{object2} are symbols with the | 2091 | @code{t}). If @var{object1} and @var{object2} are symbols with the |
| 2091 | same name, they are normally the same object---but see @ref{Creating | 2092 | same name, they are normally the same object---but see @ref{Creating |
| @@ -2095,7 +2096,7 @@ necessarily @code{eq} to each other: they are @code{eq} only if they | |||
| 2095 | are the same object, meaning that a change in the contents of one will | 2096 | are the same object, meaning that a change in the contents of one will |
| 2096 | be reflected by the same change in the contents of the other. | 2097 | be reflected by the same change in the contents of the other. |
| 2097 | For other types of objects whose contents cannot be changed (e.g., | 2098 | For other types of objects whose contents cannot be changed (e.g., |
| 2098 | floats), two arguments with the same contents might or might not be | 2099 | bignums and floats), two arguments with the same contents might or might not be |
| 2099 | the same object, and @code{eq} returns @code{t} or @code{nil} | 2100 | the same object, and @code{eq} returns @code{t} or @code{nil} |
| 2100 | depending on whether the Lisp interpreter created one object or two. | 2101 | depending on whether the Lisp interpreter created one object or two. |
| 2101 | 2102 | ||
| @@ -2258,7 +2259,7 @@ However, two distinct buffers are never considered @code{equal}, even if | |||
| 2258 | their textual contents are the same. | 2259 | their textual contents are the same. |
| 2259 | @end defun | 2260 | @end defun |
| 2260 | 2261 | ||
| 2261 | The test for equality is implemented recursively; for example, given | 2262 | For @code{equal}, equality is defined recursively; for example, given |
| 2262 | two cons cells @var{x} and @var{y}, @code{(equal @var{x} @var{y})} | 2263 | two cons cells @var{x} and @var{y}, @code{(equal @var{x} @var{y})} |
| 2263 | returns @code{t} if and only if both the expressions below return | 2264 | returns @code{t} if and only if both the expressions below return |
| 2264 | @code{t}: | 2265 | @code{t}: |
| @@ -2268,8 +2269,10 @@ returns @code{t} if and only if both the expressions below return | |||
| 2268 | (equal (cdr @var{x}) (cdr @var{y})) | 2269 | (equal (cdr @var{x}) (cdr @var{y})) |
| 2269 | @end example | 2270 | @end example |
| 2270 | 2271 | ||
| 2271 | Because of this recursive method, circular lists may therefore cause | 2272 | Comparing circular lists may therefore cause deep recursion that leads |
| 2272 | infinite recursion (leading to an error). | 2273 | to an error, and this may result in counterintuitive behavior such as |
| 2274 | @code{(equal a b)} returning @code{t} whereas @code{(equal b a)} | ||
| 2275 | signals an error. | ||
| 2273 | 2276 | ||
| 2274 | @defun equal-including-properties object1 object2 | 2277 | @defun equal-including-properties object1 object2 |
| 2275 | This function behaves like @code{equal} in all cases but also requires | 2278 | This function behaves like @code{equal} in all cases but also requires |