Function: map-put!
map-put! is a byte-compiled function defined in map.el.gz.
Signature
(map-put! MAP KEY VALUE)
Documentation
Associate KEY with VALUE in MAP.
If KEY is already present in MAP, replace the associated value
with VALUE.
This operates by modifying MAP in place.
If it cannot do that, it signals a map-not-inplace error.
To insert an element without modifying MAP, use map-insert.
Probably introduced at or before Emacs version 27.1.
Aliases
map--put (obsolete since 27.1)
Implementations
(map-put! (MAP array) KEY VALUE &optional TESTFN) in `map.el'.
Undocumented
(map-put! (MAP hash-table) KEY VALUE &optional TESTFN) in `map.el'.
Undocumented
(map-put! (MAP list) KEY VALUE &optional TESTFN) in `map.el'.
Undocumented
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/map.el.gz
(cl-defgeneric map-put! (map key value &optional testfn)
"Associate KEY with VALUE in MAP.
If KEY is already present in MAP, replace the associated value
with VALUE.
This operates by modifying MAP in place.
If it cannot do that, it signals a `map-not-inplace' error.
To insert an element without modifying MAP, use `map-insert'."
;; `testfn' only exists for backward compatibility with `map-put'!
(declare (advertised-calling-convention (map key value) "27.1")))