]> git.eshelyaron.com Git - emacs.git/commit
ruby-ts-mode: Highlight builtin methods
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 20 Jan 2023 01:56:44 +0000 (03:56 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 20 Jan 2023 01:58:03 +0000 (03:58 +0200)
commitd66ac5285f72e0343d1cc6aae2db70a00b35feed
tree7c8b6e57b5de85be9b786faa478a92da14f81874
parent370b1ac99ec4328981ce8502ecb03353dbea5041
ruby-ts-mode: Highlight builtin methods

* lisp/progmodes/ruby-mode.el (ruby-builtin-methods-with-reqs)
(ruby-builtin-methods-no-reqs): New constants, extracted.
(ruby-font-lock-keywords): Replace values with references.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-methods): New
variable.  Construct regexp from aforementioned constants' values.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
Use it.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add new font-lock feature: builtin-functions.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--predefined-constants)
(ruby-ts--predefined-variables): Unrelated to the rest of the
patch, add string-start and string-end anchors.
lisp/progmodes/ruby-mode.el
lisp/progmodes/ruby-ts-mode.el