summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/regexp-opt.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2023-02-17 14:38:50 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2023-02-17 14:52:54 +0100
commitd5bf26f488b7968feed9f43e612a90da2aab15a8 (patch)
treef31f3a743eef072012597f812fd2e5635c170de7 /lisp/emacs-lisp/regexp-opt.el
parent7ab6c6ac8334f80a2effcb9d66d2c57810c9a73e (diff)
downloademacs-d5bf26f488b7968feed9f43e612a90da2aab15a8.tar.gz
Move side-effect-free and pure declarations to function definitions
Some Lisp functions still had their `side-effect-free` and `pure` properties declared in byte-opt.el; do it at their definition instead. The lists in byte-opt.el now only contain functions implemented in C and function aliases. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns) (side-effect-and-error-free-fns, pure-fns): Remove functions whose properties are now declared elsewhere and some obsolete entries. * lisp/custom.el (custom-variable-p): * lisp/emacs-lisp/lisp.el (buffer-end): * lisp/emacs-lisp/regexp-opt.el (regexp-opt): * lisp/env.el (getenv): * lisp/simple.el (count-lines, mark, string-empty-p, lax-plist-get): * lisp/subr.el (ignore, always, zerop, fixnump, bignump, lsh, last) (eventp, mouse-movement-p, log10, memory-limit, string-greaterp) (interactive-p): * lisp/window.el (get-lru-window, get-largest-window, (window-edges) (window-body-edges, window-pixel-edges, window-body-pixel-edges) (window-absolute-pixel-edges, window-absolute-body-pixel-edges) (one-window-p): Declare functions `side-effect-free` and/or `pure` as appropriate.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
-rw-r--r--lisp/emacs-lisp/regexp-opt.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index e64a3dcea1e..fd9fbbe25a4 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -130,6 +130,7 @@ usually more efficient than that of a simplified version:
(concat (car parens)
(mapconcat \\='regexp-quote strings \"\\\\|\")
(cdr parens))))"
+ (declare (pure t) (side-effect-free t))
(save-match-data
;; Recurse on the sorted list.
(let* ((max-lisp-eval-depth 10000)