Commit 00a2d57a authored by Mattias Engdegård's avatar Mattias Engdegård Committed by Eli Zaretskii

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).

(cherry picked from commit c8146558)
parent a5da6533
Pipeline #1223 passed with stage
in 38 minutes and 10 seconds
......@@ -752,9 +752,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'.
This is a generalized variable suitable for use with `setf'.
When using it to set a value, optional argument REMOVE non-nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment