[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat b4d971acb7: Use save-match-data instead of setti
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat b4d971acb7: Use save-match-data instead of setting inhibit-changing-match-data |
Date: |
Wed, 12 Jan 2022 13:57:20 -0500 (EST) |
branch: externals/compat
commit b4d971acb7da50798bf0e251e47a94dda9059ddc
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Use save-match-data instead of setting inhibit-changing-match-data
Setting inhibit-changing-match-data has been deprecated from Emacs 28
onward.
---
compat-28.1.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compat-28.1.el b/compat-28.1.el
index 8ed040f934..cf9245731e 100644
--- a/compat-28.1.el
+++ b/compat-28.1.el
@@ -45,9 +45,9 @@ It must be between zero and the length of HAYSTACK, inclusive.
Case is always significant and text properties are ignored."
(when (and start-pos (< start-pos 0))
(signal 'args-out-of-range (list start-pos)))
- (let ((inhibit-changing-match-data t)
- (case-fold-search nil))
- (string-match (regexp-quote needle) haystack start-pos)))
+ (save-match-data
+ (let ((case-fold-search nil))
+ (string-match (regexp-quote needle) haystack start-pos))))
(compat-defun length= (sequence length)
"Returns non-nil if SEQUENCE has a length equal to LENGTH."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/compat b4d971acb7: Use save-match-data instead of setting inhibit-changing-match-data,
ELPA Syncer <=