From: Mattias EngdegÄrd Date: Fri, 17 Mar 2023 11:13:27 +0000 (+0100) Subject: * lisp/subr.el (string-prefix-p, string-suffix-p): Not pure. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=891a37ab36a0782a798841c056a2dd86bd31161a;p=emacs.git * lisp/subr.el (string-prefix-p, string-suffix-p): Not pure. The `ignore-case` arguments prevent these functions from being pure. --- 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