From: Mattias EngdegÄrd Date: Sun, 26 Mar 2023 10:09:41 +0000 (+0200) Subject: ; Use string-search instead of string-match[-p] in ruby-ts-mode.el X-Git-Tag: emacs-29.0.90~79 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f631c90e791ef94b27c5ea4c9c1d865a498ad476;p=emacs.git ; 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) --- 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))))