diff options
| author | Luc Teirlinck | 2003-11-09 04:44:28 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2003-11-09 04:44:28 +0000 |
| commit | b02495f1b5d52315bc15dd1706fa69e94dc3c0e0 (patch) | |
| tree | b2d2b463e09b94e70433d7c814d17a6a8666e6ec | |
| parent | bb3612ec1fbdc40a2e4466a5c3fd181bc19428a6 (diff) | |
| download | emacs-b02495f1b5d52315bc15dd1706fa69e94dc3c0e0.tar.gz emacs-b02495f1b5d52315bc15dd1706fa69e94dc3c0e0.zip | |
(Creating Hash): Clarify description of `eql'. `makehash' is obsolete.
(Hash Access): Add Common Lisp notes for `remhash' and `clrhash'.
| -rw-r--r-- | lispref/hash.texi | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lispref/hash.texi b/lispref/hash.texi index c6bb9caac00..3d4fe8aece9 100644 --- a/lispref/hash.texi +++ b/lispref/hash.texi | |||
| @@ -76,8 +76,9 @@ alternatives: | |||
| 76 | 76 | ||
| 77 | @table @code | 77 | @table @code |
| 78 | @item eql | 78 | @item eql |
| 79 | Keys which are numbers are ``the same'' if they are equal in value; | 79 | Keys which are numbers are ``the same'' if they are @code{equal}, that |
| 80 | otherwise, two distinct objects are never ``the same''. | 80 | is, if they are equal in value and either both are integers or both |
| 81 | are floats; otherwise, two distinct objects are never ``the same''. | ||
| 81 | 82 | ||
| 82 | @item eq | 83 | @item eq |
| 83 | Any two distinct Lisp objects are ``different'' as keys. | 84 | Any two distinct Lisp objects are ``different'' as keys. |
| @@ -158,8 +159,7 @@ This is equivalent to @code{make-hash-table}, but with a different style | |||
| 158 | argument list. The argument @var{test} specifies the method | 159 | argument list. The argument @var{test} specifies the method |
| 159 | of key lookup. | 160 | of key lookup. |
| 160 | 161 | ||
| 161 | If you want to specify other parameters, you should use | 162 | This function is obsolete. Use @code{make-hash-table} instead. |
| 162 | @code{make-hash-table}. | ||
| 163 | @end defun | 163 | @end defun |
| 164 | 164 | ||
| 165 | @node Hash Access | 165 | @node Hash Access |
| @@ -187,6 +187,10 @@ value @var{value}. If @var{key} already has an association in | |||
| 187 | This function removes the association for @var{key} from @var{table}, if | 187 | This function removes the association for @var{key} from @var{table}, if |
| 188 | there is one. If @var{key} has no association, @code{remhash} does | 188 | there is one. If @var{key} has no association, @code{remhash} does |
| 189 | nothing. | 189 | nothing. |
| 190 | |||
| 191 | @b{Common Lisp note:} In Common Lisp, @code{remhash} returns | ||
| 192 | non-@code{nil} if it actually removed an association and @code{nil} | ||
| 193 | otherwise. In Emacs Lisp, @code{remhash} always returns @code{nil}. | ||
| 190 | @end defun | 194 | @end defun |
| 191 | 195 | ||
| 192 | @tindex clrhash | 196 | @tindex clrhash |
| @@ -194,6 +198,9 @@ nothing. | |||
| 194 | This function removes all the associations from hash table @var{table}, | 198 | This function removes all the associations from hash table @var{table}, |
| 195 | so that it becomes empty. This is also called @dfn{clearing} the hash | 199 | so that it becomes empty. This is also called @dfn{clearing} the hash |
| 196 | table. | 200 | table. |
| 201 | |||
| 202 | @b{Common Lisp note:} In Common Lisp, @code{clrhash} returns the empty | ||
| 203 | @var{table}. In Emacs Lisp, it returns @code{nil}. | ||
| 197 | @end defun | 204 | @end defun |
| 198 | 205 | ||
| 199 | @tindex maphash | 206 | @tindex maphash |
| @@ -255,8 +262,8 @@ If two objects @var{obj1} and @var{obj2} are equal, then @code{(sxhash | |||
| 255 | @var{obj1})} and @code{(sxhash @var{obj2})} are the same integer. | 262 | @var{obj1})} and @code{(sxhash @var{obj2})} are the same integer. |
| 256 | 263 | ||
| 257 | If the two objects are not equal, the values returned by @code{sxhash} | 264 | If the two objects are not equal, the values returned by @code{sxhash} |
| 258 | are usually different, but not always; but once in a rare while, by | 265 | are usually different, but not always; once in a rare while, by luck, |
| 259 | luck, you will encounter two distinct-looking objects that give the same | 266 | you will encounter two distinct-looking objects that give the same |
| 260 | result from @code{sxhash}. | 267 | result from @code{sxhash}. |
| 261 | @end defun | 268 | @end defun |
| 262 | 269 | ||