aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2022-07-31 15:45:16 +0200
committerMattias EngdegÄrd2022-07-31 18:29:02 +0200
commitf5cd6b730dd04390fcbcfe45f7462026f16ae78e (patch)
treef665bbb5e9494b375e353f1371ce17d5a8decb2b
parentb2fb73db2fec999c7b6aaf6d287674dc71b05e5e (diff)
downloademacs-f5cd6b730dd04390fcbcfe45f7462026f16ae78e.tar.gz
emacs-f5cd6b730dd04390fcbcfe45f7462026f16ae78e.zip
Declare `key-valid-p` and `readablep` as error-free
* lisp/keymap.el (key-valid-p): * lisp/subr.el (readablep): These functions are effect-free; declare them correspondingly. Note that readablep is not pure since its return value depends on ambient state.
-rw-r--r--lisp/keymap.el2
-rw-r--r--lisp/subr.el2
2 files changed, 2 insertions, 2 deletions
diff --git a/lisp/keymap.el b/lisp/keymap.el
index ad7d4fbbba1..376a30f1065 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -313,7 +313,7 @@ Modifiers have to be specified in this order:
313which is 313which is
314 314
315 Alt-Control-Hyper-Meta-Shift-super" 315 Alt-Control-Hyper-Meta-Shift-super"
316 (declare (pure t) (side-effect-free t)) 316 (declare (pure t) (side-effect-free error-free))
317 (let ((case-fold-search nil)) 317 (let ((case-fold-search nil))
318 (and 318 (and
319 (stringp keys) 319 (stringp keys)
diff --git a/lisp/subr.el b/lisp/subr.el
index 1a16d781174..ff82d0d1d8d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -6820,7 +6820,7 @@ This means that OBJECT can be printed out and then read back
6820again by the Lisp reader. This function returns nil if OBJECT is 6820again by the Lisp reader. This function returns nil if OBJECT is
6821unreadable, and the printed representation (from `prin1') of 6821unreadable, and the printed representation (from `prin1') of
6822OBJECT if it is readable." 6822OBJECT if it is readable."
6823 (declare (side-effect-free t)) 6823 (declare (side-effect-free error-free))
6824 (catch 'unreadable 6824 (catch 'unreadable
6825 (let ((print-unreadable-function 6825 (let ((print-unreadable-function
6826 (lambda (_object _escape) 6826 (lambda (_object _escape)