[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 f631c90e791 1/2: ; Use string-search instead of string-match[-p
From: |
Dmitry Gutov |
Subject: |
emacs-29 f631c90e791 1/2: ; Use string-search instead of string-match[-p] in ruby-ts-mode.el |
Date: |
Sun, 26 Mar 2023 19:11:51 -0400 (EDT) |
branch: emacs-29
commit f631c90e791ef94b27c5ea4c9c1d865a498ad476
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Dmitry Gutov <dgutov@yandex.ru>
; Use string-search instead of string-match[-p] in ruby-ts-mode.el
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--align-chain):
Use the much faster string-search when just searching for a substring.
(cherry picked from commit 0724c6dbdaef2c549409836ba4f7999e05aa31fe)
---
lisp/progmodes/ruby-ts-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index da2a0a6c852..cefd76feeec 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -469,7 +469,7 @@ non-nil."
(let* (first-call )
(while (and parent
(setq first-call (treesit-node-parent parent))
- (string-match-p "call" (treesit-node-type first-call)))
+ (string-search "call" (treesit-node-type first-call)))
(setq parent first-call))
(treesit-node-start (treesit-search-subtree parent "\\." nil t))))