emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 9e6536e4d9 1/2: ruby-ts-mode: Standardize the string literal hi


From: Dmitry Gutov
Subject: emacs-29 9e6536e4d9 1/2: ruby-ts-mode: Standardize the string literal highlights
Date: Mon, 2 Jan 2023 17:42:37 -0500 (EST)

branch: emacs-29
commit 9e6536e4d96e2280b8ed76e9e83369659a347e02
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    ruby-ts-mode: Standardize the string literal highlights
    
    * lisp/progmodes/ruby-ts-mode.el (ruby-ts--font-lock-settings):
    Use font-lock-string-face for %w() and `...`.
    Use font-lock-constant-face (just like we do for symbol literals)
    for symbol array literals, %i().
    Combine the matchers for string content and heredocs.
---
 lisp/progmodes/ruby-ts-mode.el | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index 26d0fc4926..92c8f93a79 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -253,16 +253,17 @@ values of OVERRIDE"
    :feature 'string
    '((delimited_symbol [ ":\"" "\"" ] @font-lock-string-face)
      (string "\"" @font-lock-string-face)
-     (string_array [ "%w(" ")" ] @font-lock-delimiter-face)
-     (subshell "`" @font-lock-delimiter-face)
-     (symbol_array [ "%i(" ")"] @font-lock-delimiter-face))
+     (string_array ["%w(" ")"] @font-lock-string-face)
+     (subshell "`" @font-lock-string-face)
+     (symbol_array ["%i(" ")"] @font-lock-constant-face))
 
    :language language
    :feature 'string
-   '((string_content) @font-lock-string-face
-     (heredoc_beginning) @font-lock-string-face
-     (heredoc_content) @font-lock-string-face
-     (heredoc_end) @font-lock-string-face)
+   '([(string_content)
+      (heredoc_beginning)
+      (heredoc_content)
+      (heredoc_end)]
+     @font-lock-string-face)
 
    :language language
    :feature 'interpolation



reply via email to

[Prev in Thread] Current Thread [Next in Thread]