# HG changeset patch # User Chong Yidong # Date 1240980375 0 # Node ID 15fc92c2fca63502b9baa9c4ae099935c1fd7a47 # Parent feb396742215150e29cef6eb3fe82be270929eeb * subr.el (assoc-default): Doc fix. diff -r feb396742215 -r 15fc92c2fca6 lisp/ChangeLog --- a/lisp/ChangeLog Wed Apr 29 03:48:58 2009 +0000 +++ b/lisp/ChangeLog Wed Apr 29 04:46:15 2009 +0000 @@ -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 -r feb396742215 -r 15fc92c2fca6 lisp/subr.el --- a/lisp/subr.el Wed Apr 29 03:48:58 2009 +0000 +++ b/lisp/subr.el Wed Apr 29 04:46:15 2009 +0000 @@ -371,11 +371,13 @@ (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."