aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-04-29 04:46:15 +0000
committerChong Yidong2009-04-29 04:46:15 +0000
commit753bc4f6500383c347daa5d85c7023eee370d45c (patch)
tree593e90ad9db069db059f1e5b7aa465e98e5dfad5
parentc3c963a026f57b20c7798f552aa40b7fbb1027c9 (diff)
downloademacs-753bc4f6500383c347daa5d85c7023eee370d45c.tar.gz
emacs-753bc4f6500383c347daa5d85c7023eee370d45c.zip
* subr.el (assoc-default): Doc fix.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/subr.el12
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c93996b6ef0..5958cbc1164 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12009-04-29 Chong Yidong <cyd@stupidchicken.com>
2
3 * subr.el (assoc-default): Doc fix.
4
12009-04-29 Ulrich Mueller <ulm@gentoo.org> 52009-04-29 Ulrich Mueller <ulm@gentoo.org>
2 6
3 * files.el (hack-local-variables-prop-line) 7 * 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."
371 371
372(defun assoc-default (key alist &optional test default) 372(defun assoc-default (key alist &optional test default)
373 "Find object KEY in a pseudo-alist ALIST. 373 "Find object KEY in a pseudo-alist ALIST.
374ALIST is a list of conses or objects. Each element (or the element's car, 374ALIST is a list of conses or objects. Each element
375if it is a cons) is compared with KEY by evaluating (TEST (car elt) KEY). 375 (or the element's car, if it is a cons) is compared with KEY by
376If that is non-nil, the element matches; 376 calling TEST, with two arguments: (i) the element or its car,
377then `assoc-default' returns the element's cdr, if it is a cons, 377 and (ii) KEY.
378or DEFAULT if the element is not a cons. 378If that is non-nil, the element matches; then `assoc-default'
379 returns the element's cdr, if it is a cons, or DEFAULT if the
380 element is not a cons.
379 381
380If no element matches, the value is nil. 382If no element matches, the value is nil.
381If TEST is omitted or nil, `equal' is used." 383If TEST is omitted or nil, `equal' is used."