From fa4aa20f011b19d03874afc4a4aaca5ddda155c9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 4 Jun 2025 19:27:08 -0400 Subject: [PATCH] (cl-deftype): Silence spurious warnings in `xcb-types.el` * lisp/emacs-lisp/cl-macs.el (cl-deftype): Don't warn if the predicate doesn't use its argument, e.g. when the type is equivalent to `t`. (cherry picked from commit 1903b0062b1688241d1485b3e460264e124ba757) --- lisp/emacs-lisp/cl-macs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 51ab55c508c..0794337922c 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -3757,7 +3757,7 @@ If PARENTS is non-nil, ARGLIST must be nil." (pcase specifier (`(satisfies ,f) `#',f) ('nil nil) - (type `(lambda (x) (cl-typep x ',type)))))) + (type `(lambda (x) (ignore x) (cl-typep x ',type)))))) `(eval-and-compile (cl--define-derived-type ',name ,expander ,predicate ',parents))))) -- 2.39.5