Function: pc-select-add-to-alist
pc-select-add-to-alist is a macro defined in pc-select.el.gz.
Signature
(pc-select-add-to-alist ALIST VAR VAL)
Documentation
Ensure that ALIST contains the cons cell (VAR . VAL).
If a cons cell whose car is VAR is already on the ALIST, update the
cdr of that cell with VAL. Otherwise, make a new cons cell
(VAR . VAL), and prepend it onto ALIST.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/pc-select.el.gz
(defmacro pc-select-add-to-alist (alist var val)
"Ensure that ALIST contains the cons cell (VAR . VAL).
If a cons cell whose car is VAR is already on the ALIST, update the
cdr of that cell with VAL. Otherwise, make a new cons cell
\(VAR . VAL), and prepend it onto ALIST."
(let ((elt (make-symbol "elt")))
`(let ((,elt (assq ',var ,alist)))
(if ,elt
(setcdr ,elt ,val)
(setq ,alist (cons (cons ',var ,val) ,alist))))))