]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/lists.texi
(Common Keywords): Correct what missing :group means
[gnu-emacs] / doc / lispref / lists.texi
index 48e1b57eede9dd6e9e9b9aea028456ab181892a7..c18c408209a3b24369cf4fbb4cc503c2e5135f15 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2015 Free Software
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2016 Free Software
 @c Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @node Lists
@@ -1556,6 +1556,14 @@ keys may not be symbols:
 @end smallexample
 @end defun
 
+@defun 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.
+@end 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