Function: gnus-remassoc

gnus-remassoc is a byte-compiled function defined in gnus-util.el.gz.

Signature

(gnus-remassoc KEY ALIST)

Documentation

Delete by side effect any elements of LIST whose car is equal to KEY.

The modified LIST is returned. If the first member of LIST has a car that is equal to KEY, there is no way to remove it by side effect; therefore, write (setq foo (gnus-remassoc key foo)) to be sure of changing the value of foo.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-util.el.gz
(defun gnus-remassoc (key alist)
  "Delete by side effect any elements of LIST whose car is `equal' to KEY.
The modified LIST is returned.  If the first member
of LIST has a car that is `equal' to KEY, there is no way to remove it
by side effect; therefore, write `(setq foo (gnus-remassoc key foo))' to be
sure of changing the value of `foo'."
  (when alist
    (if (equal key (caar alist))
	(cdr alist)
      (setcdr alist (gnus-remassoc key (cdr alist)))
      alist)))