1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 14:01:43 -08:00

; 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 0724c6dbda)
This commit is contained in:
Mattias Engdegård 2023-03-26 12:09:41 +02:00 committed by Dmitry Gutov
parent 0337131bfa
commit f631c90e79

View file

@ -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))))