]> git.eshelyaron.com Git - emacs.git/commitdiff
cl-extra-tests.el: Follow convention
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 14 May 2025 16:28:25 +0000 (12:28 -0400)
committerEshel Yaron <me@eshelyaron.com>
Tue, 20 May 2025 20:51:13 +0000 (22:51 +0200)
* test/lisp/emacs-lisp/cl-extra-tests.el (multiples-of)
(unsigned-byte): Stick to the tradition of accepting nil.

(cherry picked from commit b644823443bf4b9f2257d1409024094bb5b608d2)

test/lisp/emacs-lisp/cl-extra-tests.el

index 1f94d71e56741f92d5f859afd67d7b752cbb3cce..6280be06cbba17798f67ace2141044ae6b43a70b 100644 (file)
 ;;;; Method dispatch for derived types.
 
 (cl-deftype multiples-of (&optional m)
-  (let ((multiplep (if (eq m '*)
+  (let ((multiplep (if (memq m '(nil *))
                        #'ignore
                     (lambda (n) (= 0 (% n m))))))
     `(and integer (satisfies ,multiplep))))
 
 (cl-deftype unsigned-byte (&optional bits)
   "Unsigned integer."
-  `(integer 0 ,(if (eq bits '*) bits (1- (ash 1 bits)))))
+  `(integer 0 ,(if (memq bits '(nil *)) bits (1- (ash 1 bits)))))
 
 (cl-deftype unsigned-16bits ()
   "Unsigned 16-bits integer."