]> git.eshelyaron.com Git - emacs.git/commitdiff
ruby-ts--s-p-query: Put '_' syntax on ?! method definitions
authorDmitry Gutov <dmitry@gutov.dev>
Thu, 26 Dec 2024 04:17:40 +0000 (06:17 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 27 Dec 2024 15:34:10 +0000 (16:34 +0100)
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query):
Put 'symbol' syntax on method definitions ending with [?!].
Reported in https://github.com/dgutov/robe/issues/149.

(cherry picked from commit b561f896b5e52d3e4571901fd5d545354ba29bac)

lisp/progmodes/ruby-ts-mode.el

index a6fe39da45fad04b0baca91bfc88f3bac68e9074..0ee72df6c9d2c4429a5986f66bfee4226e5d8ac3 100644 (file)
@@ -1052,6 +1052,9 @@ leading double colon is not added."
                              ;; Method calls with name ending with ? or !.
                              ((call method: (identifier) @ident)
                               (:match "[?!]\\'" @ident))
+                             ;; Method definitions for the above.
+                             ((method name: (identifier) @ident)
+                              (:match "[?!]\\'" @ident))
                              ;; Backtick method redefinition.
                              ((operator "`" @backtick))
                              ;; TODO: Stop at interpolations.