Function: format-delq-cons
format-delq-cons is a byte-compiled function defined in format.el.gz.
Signature
(format-delq-cons CONS LIST)
Documentation
Remove the given CONS from LIST by side effect and return the new LIST.
Since CONS could be the first element of LIST, write
(setq foo (format-delq-cons element foo)) to be sure of changing
the value of foo.
Source Code
;; Defined in /usr/src/emacs/lisp/format.el.gz
;;; Some list-manipulation functions that we need.
(defun format-delq-cons (cons list)
"Remove the given CONS from LIST by side effect and return the new LIST.
Since CONS could be the first element of LIST, write
\(setq foo \(format-delq-cons element foo)) to be sure of changing
the value of `foo'."
(if (eq cons list)
(cdr list)
(let ((p list))
(while (not (eq (cdr p) cons))
(if (null p) (error "format-delq-cons: Not an element"))
(setq p (cdr p)))
;; Now (cdr p) is the cons to delete
(setcdr p (cdr cons))
list)))