Function: cl-member
cl-member is an autoloaded and byte-compiled function defined in
cl-seq.el.gz.
Signature
(cl-member ITEM LIST [KEYWORD VALUE]...)
Documentation
Find the first occurrence of ITEM in LIST.
Return the sublist of LIST whose car is ITEM.
Keywords supported: :test :test-not :key
Aliases
member* (obsolete since 27.1)
filesets-member (obsolete since 28.1)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-seq.el.gz
;;;###autoload
(defun cl-member (item list &rest cl-keys)
"Find the first occurrence of ITEM in LIST.
Return the sublist of LIST whose car is ITEM.
\nKeywords supported: :test :test-not :key
\n(fn ITEM LIST [KEYWORD VALUE]...)"
(declare (important-return-value t)
(compiler-macro cl--compiler-macro-member))
(if cl-keys
(cl--parsing-keywords (:test :test-not :key :if :if-not) ()
(while (and list (not (cl--check-test item (car list))))
(setq list (cdr list)))
list)
(memql item list)))