From 48ff93ba18c8fae6c2904d40906cd0e13158b688 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Sun, 9 Apr 2023 13:54:17 +0200 Subject: Adjust side-effect-free declarations * lisp/emacs-lisp/byte-opt.el (side-effect-and-error-free-fns): Add `eql` here. * lisp/emacs-lisp/cl-macs.el (eql, cl-subst, cl-sublis): Don't set the `side-effect-free` property here. `cl-subst` and `cl-sublis` are not side-effect-free. * lisp/emacs-lisp/cl-extra.el (cl-revappend): Declare side-effect-free. * lisp/emacs-lisp/cl-lib.el (cl-copy-list): Declare side-effect-free and error-free. --- lisp/emacs-lisp/cl-lib.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp/emacs-lisp/cl-lib.el') diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el index 95a51a4bdde..7fee780a735 100644 --- a/lisp/emacs-lisp/cl-lib.el +++ b/lisp/emacs-lisp/cl-lib.el @@ -459,6 +459,7 @@ Thus, `(cl-list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to (defun cl-copy-list (list) "Return a copy of LIST, which may be a dotted list. The elements of LIST are not copied, just the list structure itself." + (declare (side-effect-free error-free)) (if (consp list) (let ((res nil)) (while (consp list) (push (pop list) res)) -- cgit v1.2.3