Function: assq-delete-all

assq-delete-all is a byte-compiled function defined in subr.el.gz.

Signature

(assq-delete-all KEY ALIST)

Documentation

Delete from ALIST all elements whose car is eq to KEY.

Return the modified alist. Elements of ALIST that are not conses are ignored.

Other relevant functions are documented in the list and alist groups.

Probably introduced at or before Emacs version 21.1.

Shortdoc

;; alist
(assq-delete-all 'foo '((foo . bar) (zot . baz)))
    => ((zot . baz))
;; list
(assq-delete-all 2 (list '(1 . a) '(2 . b) '(2 . c)))
    => ((1 . a))

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun assq-delete-all (key alist)
  "Delete from ALIST all elements whose car is `eq' to KEY.
Return the modified alist.
Elements of ALIST that are not conses are ignored."
  (assoc-delete-all key alist #'eq))