diff options
| author | Mattias EngdegÄrd | 2019-04-09 16:56:37 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-04-09 19:10:47 +0300 |
| commit | 00a2d57adfe78bd137cd9458d9133f9c825b7d75 (patch) | |
| tree | 4dad9e9ff64daa86ca69a9ae5ffedf44c7de4d23 | |
| parent | a5da653319a3018074debfc7b4fdd90ac7ea838c (diff) | |
| download | emacs-00a2d57adfe78bd137cd9458d9133f9c825b7d75.tar.gz emacs-00a2d57adfe78bd137cd9458d9133f9c825b7d75.zip | |
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 c81465580fe262f28ce47502c00f4afcbe3b8f8d)
| -rw-r--r-- | lisp/subr.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 44199a50754..54bee8a809f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -752,9 +752,9 @@ Elements of ALIST that are not conses are ignored." | |||
| 752 | alist) | 752 | alist) |
| 753 | 753 | ||
| 754 | (defun alist-get (key alist &optional default remove testfn) | 754 | (defun alist-get (key alist &optional default remove testfn) |
| 755 | "Return the value associated with KEY in ALIST. | 755 | "Find the first element of ALIST whose `car' equals KEY and return its `cdr'. |
| 756 | If KEY is not found in ALIST, return DEFAULT. | 756 | If KEY is not found in ALIST, return DEFAULT. |
| 757 | Use TESTFN to lookup in the alist if non-nil. Otherwise, use `assq'. | 757 | Equality with KEY is tested by TESTFN, defaulting to `eq'. |
| 758 | 758 | ||
| 759 | This is a generalized variable suitable for use with `setf'. | 759 | This is a generalized variable suitable for use with `setf'. |
| 760 | When using it to set a value, optional argument REMOVE non-nil | 760 | When using it to set a value, optional argument REMOVE non-nil |