Function: gnus-delete-first

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

Signature

(gnus-delete-first ELT LIST)

Documentation

Delete by side effect the first occurrence of ELT as a member of LIST.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-util.el.gz
(defun gnus-delete-first (elt list)
  "Delete by side effect the first occurrence of ELT as a member of LIST."
  (if (equal (car list) elt)
      (cdr list)
    (let ((total list))
      (while (and (cdr list)
		  (not (equal (cadr list) elt)))
	(setq list (cdr list)))
      (when (cdr list)
	(setcdr list (cddr list)))
      total)))