]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/hash.texi
Proper help support for EIEIO classes and methods.
[gnu-emacs] / doc / lispref / hash.texi
index 14e9accff7198b7a183dce06186ac48916537fb6..5d0d6b6c89e2829ca5667a82a49f14d4c115668b 100644 (file)
@@ -1,10 +1,8 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005,
-@c   2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+@c Copyright (C) 1999, 2001-2014 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
-@setfilename ../../info/hash
-@node Hash Tables, Symbols, Sequences Arrays Vectors, Top
+@node Hash Tables
 @chapter Hash Tables
 @cindex hash tables
 @cindex lookup tables
@@ -76,13 +74,13 @@ alternatives:
 Keys which are numbers are ``the same'' if they are @code{equal}, that
 is, if they are equal in value and either both are integers or both
 are floating point numbers; otherwise, two distinct objects are never
-``the same.''
+``the same''.
 
 @item eq
 Any two distinct Lisp objects are ``different'' as keys.
 
 @item equal
-Two Lisp objects are ``the same,'' as keys, if they are equal
+Two Lisp objects are ``the same'', as keys, if they are equal
 according to @code{equal}.
 @end table
 
@@ -130,7 +128,7 @@ doing that takes some extra time.
 The default size is 65.
 
 @item :rehash-size @var{rehash-size}
-When you add an association to a hash table and the table is ``full,''
+When you add an association to a hash table and the table is ``full'',
 it grows automatically.  This value specifies how to make the hash table
 larger, at that time.
 
@@ -264,7 +262,7 @@ will use @var{test-fn} to compare key values, and @var{hash-fn} to compute
 a ``hash code'' from a key value.
 
 The function @var{test-fn} should accept two arguments, two keys, and
-return non-@code{nil} if they are considered ``the same.''
+return non-@code{nil} if they are considered ``the same''.
 
 The function @var{hash-fn} should accept one argument, a key, and return
 an integer that is the ``hash code'' of that key.  For good results, the
@@ -295,7 +293,7 @@ compared case-insensitively.
 
 @example
 (defun case-fold-string= (a b)
-  (compare-strings a nil nil b nil nil t))
+  (eq t (compare-strings a nil nil b nil nil t)))
 (defun case-fold-string-hash (a)
   (sxhash (upcase a)))
 
@@ -356,6 +354,13 @@ This returns the rehash threshold of @var{table}.
 This returns the current nominal size of @var{table}.
 @end defun
 
-@ignore
-   arch-tag: 3b5107f9-d2f0-47d5-ad61-3498496bea0e
-@end ignore
+The following two functions are provided by the @file{subr-x} library.
+To use them, you need to load this library first.
+
+@defun hash-table-keys hash-table
+This returns a list of keys in @var{hash-table}.
+@end defun
+
+@defun hash-table-values hash-table
+This returns a list of values in @var{hash-table}.
+@end defun