Function: hash-add
hash-add is a byte-compiled function defined in hasht.el.
Signature
(hash-add VALUE KEY HASH-TABLE)
Documentation
Add and return VALUE of any type referenced by KEY, a string, to HASH-TABLE.
Replace any VALUE previously referenced by KEY. VALUE should not be nil or cannot determine whether VALUE was successfully added or not. Do nothing and return nil if KEY or HASH-TABLE are of the wrong type. Signal an error if anything goes wrong during addition.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hasht.el
;;; ************************************************************************
;;; Public functions
;;; ************************************************************************
(defun hash-add (value key hash-table)
"Add and return VALUE of any type referenced by KEY, a string, to HASH-TABLE.
Replace any VALUE previously referenced by KEY. VALUE should not be
nil or cannot determine whether VALUE was successfully added or not.
Do nothing and return nil if KEY or HASH-TABLE are of the wrong type.
Signal an error if anything goes wrong during addition."
(when (and (hash-table-p hash-table)
(stringp key))
(puthash (intern key) value hash-table)))