From: Dmitry Gutov Date: Thu, 26 Dec 2024 04:17:40 +0000 (+0200) Subject: ruby-ts--s-p-query: Put '_' syntax on ?! method definitions X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3bf64028245f5bfbb8b63c4b1b8ea2c3efd399cf;p=emacs.git 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) --- 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.