From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/hash-access.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 devdocs/elisp/hash-access.html (limited to 'devdocs/elisp/hash-access.html') diff --git a/devdocs/elisp/hash-access.html b/devdocs/elisp/hash-access.html new file mode 100644 index 00000000..58b2764c --- /dev/null +++ b/devdocs/elisp/hash-access.html @@ -0,0 +1,20 @@ +

Hash Table Access

This section describes the functions for accessing and storing associations in a hash table. In general, any Lisp object can be used as a hash key, unless the comparison method imposes limits. Any Lisp object can also be used as the value.

Function: gethash key table &optional default +

This function looks up key in table, and returns its associated value—or default, if key has no association in table.

+
Function: puthash key value table +

This function enters an association for key in table, with value value. If key already has an association in table, value replaces the old associated value. This function always returns value.

+
Function: remhash key table +
+

This function removes the association for key from table, if there is one. If key has no association, remhash does nothing.

Common Lisp note: In Common Lisp, remhash returns non-nil if it actually removed an association and nil otherwise. In Emacs Lisp, remhash always returns nil.

+
+
Function: clrhash table +

This function removes all the associations from hash table table, so that it becomes empty. This is also called clearing the hash table. clrhash returns the empty table.

+
Function: maphash function table +
+

This function calls function once for each of the associations in table. The function function should accept two arguments—a key listed in table, and its associated value. maphash returns nil.

+
+
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Hash-Access.html +

+
-- cgit v1.2.3