From: Chong Yidong Date: Wed, 29 Apr 2009 04:46:15 +0000 (+0000) Subject: * subr.el (assoc-default): Doc fix. X-Git-Tag: emacs-pretest-23.0.93~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=753bc4f6500383c347daa5d85c7023eee370d45c;p=emacs.git * subr.el (assoc-default): Doc fix. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c93996b6ef0..5958cbc1164 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2009-04-29 Chong Yidong + + * subr.el (assoc-default): Doc fix. + 2009-04-29 Ulrich Mueller * files.el (hack-local-variables-prop-line) diff --git a/lisp/subr.el b/lisp/subr.el index 5372adb510c..aa60ab7ca80 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -371,11 +371,13 @@ argument VECP, this copies vectors as well as conses." (defun assoc-default (key alist &optional test default) "Find object KEY in a pseudo-alist ALIST. -ALIST is a list of conses or objects. Each element (or the element's car, -if it is a cons) is compared with KEY by evaluating (TEST (car elt) KEY). -If that is non-nil, the element matches; -then `assoc-default' returns the element's cdr, if it is a cons, -or DEFAULT if the element is not a cons. +ALIST is a list of conses or objects. Each element + (or the element's car, if it is a cons) is compared with KEY by + calling TEST, with two arguments: (i) the element or its car, + and (ii) KEY. +If that is non-nil, the element matches; then `assoc-default' + returns the element's cdr, if it is a cons, or DEFAULT if the + element is not a cons. If no element matches, the value is nil. If TEST is omitted or nil, `equal' is used."