X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/2aa6b47e3e216410195cf7ec3abb5902f38082fa..d590048bed8466e84c66d60f35df236d0ff8e81b:/lisp/subr.el diff --git a/lisp/subr.el b/lisp/subr.el index 358bfa5e1c..48ff5013ce 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -600,10 +600,12 @@ Elements of ALIST that are not conses are ignored." alist) (defun alist-get (key alist &optional default remove) - "Get the value associated to KEY in ALIST. -DEFAULT is the value to return if KEY is not found in ALIST. -REMOVE, if non-nil, means that when setting this element, we should -remove the entry if the new value is `eql' to DEFAULT." + "Return the value associated with KEY in ALIST, using `assq'. +If KEY is not found in ALIST, return DEFAULT. + +This is a generalized variable suitable for use with `setf'. +When using it to set a value, optional argument REMOVE non-nil +means to remove KEY from ALIST if the new value is `eql' to DEFAULT." (ignore remove) ;;Silence byte-compiler. (let ((x (assq key alist))) (if x (cdr x) default)))