[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4053bd5: Work around long-standing seq.el compilation warning
From: |
Lars Ingebrigtsen |
Subject: |
master 4053bd5: Work around long-standing seq.el compilation warning |
Date: |
Fri, 30 Jul 2021 07:13:58 -0400 (EDT) |
branch: master
commit 4053bd5201252850aa816150925aa256e5ab7238
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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.)
---
lisp/emacs-lisp/seq.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 6c15463..e8fc4a2 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4053bd5: Work around long-standing seq.el compilation warning,
Lars Ingebrigtsen <=