aboutsummaryrefslogtreecommitdiff
path: root/evil-common.el
diff options
context:
space:
mode:
authorRudi Grinberg <rudi.grinberg@gmail.com>2018-03-07 00:26:37 +0700
committerRudi Grinberg <rudi.grinberg@gmail.com>2018-03-07 00:26:37 +0700
commit718b03fb4220e8b23868ce9f7eef2bb9cf789448 (patch)
tree99eee58d9f0c76eb83b28e5bcfbeead2dbc952ad /evil-common.el
parent0611c329d61c897c04de6ac0f9bdd42256c52d99 (diff)
Use string-match-p when possible
In some situations, we don't use the match data. So we might as well not capture it.
Diffstat (limited to 'evil-common.el')
-rw-r--r--evil-common.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/evil-common.el b/evil-common.el
index f0fe68a..d320fd0 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -488,13 +488,13 @@ If any character set is complemented, the result is also complemented."
(let ((bracket "") (complement "") (hyphen "") result)
(save-match-data
(dolist (set sets)
- (when (string-match "^\\^" set)
+ (when (string-match-p "^\\^" set)
(setq set (substring set 1)
complement "^"))
- (when (string-match "^]" set)
+ (when (string-match-p "^]" set)
(setq set (substring set 1)
bracket "]"))
- (when (string-match "^-" set)
+ (when (string-match-p "^-" set)
(setq set (substring set 1)
hyphen "-"))
(setq result (concat result set)))