[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 2460cfa: * doc/lispref/lists.texi (Association Li
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'. |
Date: |
Sat, 16 Jan 2016 14:32:38 +0000 |
branch: emacs-25
commit 2460cfac091c6a5b095816bef9e639f9da88f432
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
* doc/lispref/lists.texi (Association Lists): Document 'alist-get'.
---
doc/lispref/lists.texi | 8 ++++++++
etc/NEWS | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index d961caf..c18c408 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1556,6 +1556,14 @@ keys may not be symbols:
@end smallexample
@end defun
address@hidden alist-get key value &optional default
+This function is like @code{assq}, but instead of returning the entire
+association for @var{key}, @code{(@var{key} . @var{value})}, it
+returns just the @var{value}. It returns @var{default} if @var{key}
+is not found in @var{alist}, defaulting to @code{nil} if @var{default}
+is omitted.
address@hidden defun
+
@defun rassq value alist
This function returns the first association with value @var{value} in
@var{alist}. It returns @code{nil} if no association in @var{alist} has
diff --git a/etc/NEWS b/etc/NEWS
index 3f867a0..01a8490 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1464,6 +1464,7 @@ emulates the behavior of modern Posix platforms when the
locale's
codeset is "UTF-8" (as in "en_US.UTF-8"). This is needed because
MS-Windows doesn't support UTF-8 as codeset in its locales.
++++
** New function `alist-get', which is also a valid place (aka lvalue).
** New function `funcall-interactively', which works like `funcall'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 2460cfa: * doc/lispref/lists.texi (Association Lists): Document 'alist-get'.,
Eli Zaretskii <=