diff options
| author | Glenn Morris | 2016-06-07 19:59:37 -0400 |
|---|---|---|
| committer | Glenn Morris | 2016-06-07 19:59:37 -0400 |
| commit | 1f85b7ca034ee4f96d796d95ec86bc4fa0ba8aa3 (patch) | |
| tree | 601774c89a6ccbc6686c3a15c35dfaa92d539381 /doc/lispref/lists.texi | |
| parent | ba3f206239349b725a970c7015f7f4ee8631ef6d (diff) | |
| download | emacs-1f85b7ca034ee4f96d796d95ec86bc4fa0ba8aa3.tar.gz emacs-1f85b7ca034ee4f96d796d95ec86bc4fa0ba8aa3.zip | |
Doc fixes re alist-get. (Bug#23548)
* lisp/subr.el (alist-get): Doc fix.
* doc/lispref/lists.texi (Association Lists): Improve alist-get.
; * etc/NEWS: Related edit.
Diffstat (limited to 'doc/lispref/lists.texi')
| -rw-r--r-- | doc/lispref/lists.texi | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index c18c408209a..e7a739f88f3 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi | |||
| @@ -1556,12 +1556,16 @@ keys may not be symbols: | |||
| 1556 | @end smallexample | 1556 | @end smallexample |
| 1557 | @end defun | 1557 | @end defun |
| 1558 | 1558 | ||
| 1559 | @defun alist-get key value &optional default | 1559 | @defun alist-get key value &optional default remove |
| 1560 | This function is like @code{assq}, but instead of returning the entire | 1560 | This function is like @code{assq}, but instead of returning the entire |
| 1561 | association for @var{key}, @code{(@var{key} . @var{value})}, it | 1561 | association for @var{key}, @code{(@var{key} . @var{value})}, it |
| 1562 | returns just the @var{value}. It returns @var{default} if @var{key} | 1562 | returns just the @var{value}. If @var{key} is not found in |
| 1563 | is not found in @var{alist}, defaulting to @code{nil} if @var{default} | 1563 | @var{alist} it returns @var{default}. |
| 1564 | is omitted. | 1564 | |
| 1565 | This is a generalized variable (@pxref{Generalized Variables}) that | ||
| 1566 | can be used to change a value with @code{setf}. When using it to set | ||
| 1567 | a value, optional argument @var{remove} non-nil means to remove | ||
| 1568 | @var{key} from @var{alist} if the new value is @code{eql} to @var{default}. | ||
| 1565 | @end defun | 1569 | @end defun |
| 1566 | 1570 | ||
| 1567 | @defun rassq value alist | 1571 | @defun rassq value alist |