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

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

[nongnu] elpa/jade-mode eea90de1df 038/128: Add support for keywords syn


From: ELPA Syncer
Subject: [nongnu] elpa/jade-mode eea90de1df 038/128: Add support for keywords syntax coloring.
Date: Sat, 29 Jan 2022 08:24:44 -0500 (EST)

branch: elpa/jade-mode
commit eea90de1df8afc1614dbac5f3464ac942986dc45
Author: Shander Lam <shanderlam@gmail.com>
Commit: Shander Lam <shanderlam@gmail.com>

    Add support for keywords syntax coloring.
---
 jade-mode.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/jade-mode.el b/jade-mode.el
index cb02ecd43b..b1dab1c438 100644
--- a/jade-mode.el
+++ b/jade-mode.el
@@ -36,8 +36,16 @@ For detail, see `comment-dwim'."
         )
     (comment-dwim arg)))
 
+(defconst jade-keywords
+  (eval-when-compile
+    (regexp-opt
+     '("if" "else" "for" "in" "each" "case" "when" "default" "block" "extends"
+       "include" "yield" "mixin") 'words))
+  "Jade keywords.")
+
 (setq jade-font-lock-keywords
       `((,"!!!\\( ?[A-Za-z0-9\-\_]*\\)?" 0 font-lock-comment-face) ;; doctype
+        (,jade-keywords . font-lock-keyword-face) ;; keywords
         (,"#\\(\\w\\|_\\|-\\)*" . font-lock-variable-name-face) ;; id
         (,"\\(?:^[ {2,}]+\\(?:[a-z0-9_:\\-]*\\)\\)?\\(#[A-Za-z0-9\-\_]*[^ 
]\\)" 1 font-lock-variable-name-face) ;; id
         (,"\\(?:^[ {2,}]+\\(?:[a-z0-9_:\\-]*\\)\\)?\\(\\.[A-Za-z0-9\-\_]*\\)" 
1 font-lock-type-face) ;; class name



reply via email to

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