mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Work around long-standing seq.el compilation warning
* lisp/emacs-lisp/seq.el (seq-contains): When using cl-defgeneric to define an obsolete function, it'll complain about it being obsolete. Suppress that warning. (Should probably be fixed in cl-defgeneric instead.)
This commit is contained in:
parent
97894b07c2
commit
4053bd5201
1 changed files with 8 additions and 7 deletions
|
|
@ -394,14 +394,15 @@ found or not."
|
|||
(setq count (+ 1 count))))
|
||||
count))
|
||||
|
||||
(cl-defgeneric seq-contains (sequence elt &optional testfn)
|
||||
"Return the first element in SEQUENCE that is equal to ELT.
|
||||
(with-suppressed-warnings ((obsolete seq-contains))
|
||||
(cl-defgeneric seq-contains (sequence elt &optional testfn)
|
||||
"Return the first element in SEQUENCE that is equal to ELT.
|
||||
Equality is defined by TESTFN if non-nil or by `equal' if nil."
|
||||
(declare (obsolete seq-contains-p "27.1"))
|
||||
(seq-some (lambda (e)
|
||||
(when (funcall (or testfn #'equal) elt e)
|
||||
e))
|
||||
sequence))
|
||||
(declare (obsolete seq-contains-p "27.1"))
|
||||
(seq-some (lambda (e)
|
||||
(when (funcall (or testfn #'equal) elt e)
|
||||
e))
|
||||
sequence)))
|
||||
|
||||
(cl-defgeneric seq-contains-p (sequence elt &optional testfn)
|
||||
"Return non-nil if SEQUENCE contains an element equal to ELT.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue