mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Clarify the TESTFN argument to `alist-get'
* lisp/subr.el (alist-get): Rephrase the initial text to clarify the meaning of the TESTFN argument. It's an equality predicate, not a look-up function (Bug#35206).
This commit is contained in:
parent
44b306d351
commit
c81465580f
1 changed files with 2 additions and 2 deletions
|
|
@ -779,9 +779,9 @@ Elements of ALIST that are not conses are ignored."
|
|||
alist)
|
||||
|
||||
(defun alist-get (key alist &optional default remove testfn)
|
||||
"Return the value associated with KEY in ALIST.
|
||||
"Find the first element of ALIST whose `car' equals KEY and return its `cdr'.
|
||||
If KEY is not found in ALIST, return DEFAULT.
|
||||
Use TESTFN to lookup in the alist if non-nil. Otherwise, use `assq'.
|
||||
Equality with KEY is tested by TESTFN, defaulting to `eq'.
|
||||
|
||||
You can use `alist-get' in PLACE expressions. This will modify
|
||||
an existing association (more precisely, the first one if
|
||||
|
|
|
|||
Loading…
Reference in a new issue