[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 891a37ab36a: * lisp/subr.el (string-prefix-p, string-suffix-p): N
From: |
Mattias Engdegård |
Subject: |
master 891a37ab36a: * lisp/subr.el (string-prefix-p, string-suffix-p): Not pure. |
Date: |
Fri, 17 Mar 2023 07:37:52 -0400 (EDT) |
branch: master
commit 891a37ab36a0782a798841c056a2dd86bd31161a
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
* lisp/subr.el (string-prefix-p, string-suffix-p): Not pure.
The `ignore-case` arguments prevent these functions from being pure.
---
lisp/subr.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 8aedce934d1..9ba0acace01 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 891a37ab36a: * lisp/subr.el (string-prefix-p, string-suffix-p): Not pure.,
Mattias Engdegård <=