]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Decl struct predicates as pure
authorAndrea Corallo <akrl@sdf.org>
Wed, 1 Dec 2021 10:23:25 +0000 (11:23 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Dec 2021 21:21:04 +0000 (22:21 +0100)
lisp/emacs-lisp/cl-macs.el

index 1852471bcbbf1fce5ea651e59897d3584f2b7008..9c9a778f045649aa17fd18c844326eac62150d70 100644 (file)
@@ -3050,7 +3050,7 @@ To see the documentation for a defined struct type, use
                             `(,predicate cl-x))))
     (when pred-form
       (push `(,defsym ,predicate (cl-x)
-               (declare (side-effect-free error-free))
+               (declare (side-effect-free error-free) (pure t))
                ,(if (eq (car pred-form) 'and)
                     (append pred-form '(t))
                   `(and ,pred-form t)))