From f631c90e791ef94b27c5ea4c9c1d865a498ad476 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sun, 26 Mar 2023 12:09:41 +0200 Subject: [PATCH] ; 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)))) -- 2.39.2