]> git.eshelyaron.com Git - emacs.git/commitdiff
; Use string-search instead of string-match[-p] in ruby-ts-mode.el
authorMattias EngdegÄrd <mattiase@acm.org>
Sun, 26 Mar 2023 10:09:41 +0000 (12:09 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 26 Mar 2023 23:08:48 +0000 (02:08 +0300)
* 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

index da2a0a6c852ac7d7e0a163e99d95036abce1652a..cefd76feeec5e98e8602057a86c1cb22de3e531d 100644 (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))))