From 3bf64028245f5bfbb8b63c4b1b8ea2c3efd399cf Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Thu, 26 Dec 2024 06:17:40 +0200 Subject: [PATCH] ruby-ts--s-p-query: Put '_' syntax on ?! method definitions * 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el index a6fe39da45f..0ee72df6c9d 100644 --- a/lisp/progmodes/ruby-ts-mode.el +++ b/lisp/progmodes/ruby-ts-mode.el @@ -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. -- 2.39.5