summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/seq.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-04-01 10:02:32 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-04-01 10:02:32 -0400
commit6cb688684065ca74b14263fcc22036cededa2bbe (patch)
treeebf2606b01bc9d33d9542d71622710bbca3f88b2 /lisp/emacs-lisp/seq.el
parent2b564f504bbf7c050355840b40a9897f12ed91f9 (diff)
downloademacs-6cb688684065ca74b14263fcc22036cededa2bbe.tar.gz
emacs-6cb688684065ca74b14263fcc22036cededa2bbe.tar.bz2
emacs-6cb688684065ca74b14263fcc22036cededa2bbe.zip
cl-generic: Rework obsolescence checks for defmethod
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Silence obsolescence warnings in the included methods. (cl-defmethod): Reuse standard obsolescence checks. * lisp/emacs-lisp/seq.el (seq-contains): Remove redundant `with-suppressed-warnings`.
Diffstat (limited to 'lisp/emacs-lisp/seq.el')
-rw-r--r--lisp/emacs-lisp/seq.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 1bcb844d8e9..133d3c9e118 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -403,15 +403,14 @@ found or not."
(setq count (+ 1 count))))
count))
-(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.
+(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.