Function: erc-remove-if-not

erc-remove-if-not is a byte-compiled function defined in erc-compat.el.gz.

This function is obsolete since 28.1; use cl-remove-if-not instead.

Signature

(erc-remove-if-not PREDICATE SEQ)

Documentation

Remove all items not satisfying PREDICATE in SEQ.

This is a non-destructive function; it makes a copy of SEQ to avoid corrupting the original SEQ.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-compat.el.gz
;; Provide a simpler replacement for `cl-remove-if-not'
(defun erc-remove-if-not (predicate seq)
  "Remove all items not satisfying PREDICATE in SEQ.
This is a non-destructive function; it makes a copy of SEQ to
avoid corrupting the original SEQ."
  (declare (obsolete cl-remove-if-not "28.1"))
  (let (newseq)
    (dolist (el seq)
      (when (funcall predicate el)
	(setq newseq (cons el newseq))))
    (nreverse newseq)))