emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/typescript-mode a7cd7a92a5 167/222: fix(font-lock): prefer


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode a7cd7a92a5 167/222: fix(font-lock): prefer fontifying constants over keywords
Date: Sun, 6 Feb 2022 16:59:29 -0500 (EST)

branch: elpa/typescript-mode
commit a7cd7a92a5980efd1568cc436c2650679b0536d6
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: Matus Goljer <matus.goljer@gmail.com>

    fix(font-lock): prefer fontifying constants over keywords
    
    This way null, false, undefined etc. will be fontified with
    font-lock-constant-face instead of font-lock-keyword-face.
---
 typescript-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index e9632d70dd..3fe79698f9 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -294,13 +294,13 @@ Match group 1 is MUMBLE.")
 
 (defconst typescript--font-lock-keywords-2
   (append typescript--font-lock-keywords-1
-          (list (list typescript--keyword-re 1 font-lock-keyword-face)
+          (list (cons typescript--constant-re font-lock-constant-face)
+                (list typescript--keyword-re 1 font-lock-keyword-face)
                 (list "\\_<for\\_>"
                       "\\s-+\\(each\\)\\_>" nil nil
                       (list 1 'font-lock-keyword-face))
                 (cons "\\_<yield\\(\\*\\|\\_>\\)" 'font-lock-keyword-face)
-                (cons typescript--basic-type-re font-lock-type-face)
-                (cons typescript--constant-re font-lock-constant-face)))
+                (cons typescript--basic-type-re font-lock-type-face)))
   "Level two font lock keywords for `typescript-mode'.")
 
 ;; typescript--pitem is the basic building block of the lexical



reply via email to

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