From: Stefan Monnier Date: Wed, 4 Jun 2025 23:27:08 +0000 (-0400) Subject: (cl-deftype): Silence spurious warnings in `xcb-types.el` X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa4aa20f011b19d03874afc4a4aaca5ddda155c9;p=emacs.git (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) --- 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)))))