Function: cider-add-to-alist

cider-add-to-alist is a byte-compiled function defined in cider-util.el.

Signature

(cider-add-to-alist SYMBOL CAR CADR)

Documentation

Add (CAR CADR) to the alist stored in SYMBOL.

If CAR already corresponds to an entry in the alist, destructively replace the entry's second element with CADR.

This can be used, for instance, to update the version of an injected plugin or dependency with:
  (cider-add-to-alist 'cider-jack-in-lein-plugins
                  "plugin/artifact-name" "THE-NEW-VERSION")

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-util.el
(defun cider-add-to-alist (symbol car cadr)
  "Add (CAR CADR) to the alist stored in SYMBOL.
If CAR already corresponds to an entry in the alist, destructively replace
the entry's second element with CADR.

This can be used, for instance, to update the version of an injected
plugin or dependency with:
  (cider-add-to-alist \\='cider-jack-in-lein-plugins
                  \"plugin/artifact-name\" \"THE-NEW-VERSION\")"
  (let ((alist (symbol-value symbol)))
    (if-let* ((cons (assoc car alist)))
        (setcdr cons (list cadr))
      (set symbol (cons (list car cadr) alist)))))