]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (string-prefix-p, string-suffix-p): Not pure.
authorMattias Engdegård <mattiase@acm.org>
Fri, 17 Mar 2023 11:13:27 +0000 (12:13 +0100)
committerMattias Engdegård <mattiase@acm.org>
Fri, 17 Mar 2023 11:33:14 +0000 (12:33 +0100)
The `ignore-case` arguments prevent these functions from being pure.

lisp/subr.el

index 8aedce934d10d0bec2c094d12f4a4e9b6e60cfbf..9ba0acace018767c6beb2b923d4f0a831bc5cd53 100644 (file)
@@ -5531,7 +5531,7 @@ See also `string-equal'."
   "Return non-nil if PREFIX is a prefix of STRING.
 If IGNORE-CASE is non-nil, the comparison is done without paying attention
 to case differences."
-  (declare (pure t) (side-effect-free t))
+  (declare (side-effect-free t))
   (let ((prefix-length (length prefix)))
     (if (> prefix-length (length string)) nil
       (eq t (compare-strings prefix 0 prefix-length string
@@ -5541,7 +5541,7 @@ to case differences."
   "Return non-nil if SUFFIX is a suffix of STRING.
 If IGNORE-CASE is non-nil, the comparison is done without paying
 attention to case differences."
-  (declare (pure t) (side-effect-free t))
+  (declare (side-effect-free t))
   (let ((start-pos (- (length string) (length suffix))))
     (and (>= start-pos 0)
          (eq t (compare-strings suffix nil nil