[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/jade-mode e9288f66dc 106/128: use named regexes in font-lo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/jade-mode e9288f66dc 106/128: use named regexes in font-lock-keywords list |
Date: |
Sat, 29 Jan 2022 08:24:51 -0500 (EST) |
branch: elpa/jade-mode
commit e9288f66dcca7799a15ffbbfa77572616bedc976
Author: Matthew Conway <matthew.f.conway@gmail.com>
Commit: Matthew Conway <matthew.f.conway@gmail.com>
use named regexes in font-lock-keywords list
---
jade-mode.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/jade-mode.el b/jade-mode.el
index 16d6fbccc7..85b1ea26ec 100644
--- a/jade-mode.el
+++ b/jade-mode.el
@@ -72,6 +72,9 @@
(defvar jade-class-re "[.][a-zA-Z][0-9a-zA-Z_\\-]*"
"Regexp used to match a class literal, e.g. .class, .class_name-123")
+(defvar jade-mixin-re "[+][a-zA-Z][0-9a-zA-Z_\\-]*"
+ "Regexp used to match a mixin name")
+
(defvar jade-double-quote-string-re "[\"]\\(\\\\.\\|[^\"\n]\\)*[\"]"
"Regexp used to match a double-quoted string literal")
@@ -84,11 +87,11 @@
(defvar jade-font-lock-keywords
`(
(,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
- ("^[ \t]*\\([a-zA-Z0-9]+\\)" 1 font-lock-function-name-face) ;; tag name
- ("^[ \t]*\\(-?//.*\\)" 1 font-lock-comment-face t) ;; jade block comments
+ (,jade-id-re . font-lock-variable-name-face) ;; id
+ (,jade-class-re . font-lock-type-face) ;; class name
+ ("\\(-?//.*\\)" . font-lock-comment-face) ;; jade block comments
+ (,jade-tag-re . font-lock-function-name-face)
+ ;; tag name
;; remove highlighting from literal content following tag/class/id
;; e.g. tag Inner text
- [nongnu] elpa/jade-mode d90ad2cc02 036/128: Add syntax table entry for single line comment., (continued)
- [nongnu] elpa/jade-mode d90ad2cc02 036/128: Add syntax table entry for single line comment., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 05d671fcdb 057/128: Add comment syntax to allow for M-x (un)comment-region., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 351f756569 083/128: [#37] Highlight string lit. manually - Closes #37, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode a90b512c6e 086/128: [#39] add two functions to hl JS blocks, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 57ab4d6555 085/128: [#39] add JS examples to highlight, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode bbaf2bb3a1 092/128: add a THIRD comment type and use THAT ad default, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 4336ae9cc4 097/128: [#46] ignore .elc files, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 42bb8501b4 099/128: fix some compile warnings and sexp-region, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 0de371694a 053/128: Match zero or more whitespace in BOL instead of one or more., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode c4014d8a9c 098/128: Merge pull request #50 from tjefferson08/46_unit_tests, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode e9288f66dc 106/128: use named regexes in font-lock-keywords list,
ELPA Syncer <=
- [nongnu] elpa/jade-mode f9522fc00a 105/128: reorder highlight tests to match regex order in jade-mode.el and display, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 97c460453b 116/128: Merge pull request #62 from robbyoconnor/remove-flymake-from-README, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 93c0dec9d4 121/128: fix `.pug` extension to be auto-loaded, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 4dbde92542 122/128: Merge pull request #68 from chillum/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 1ad7c51f3c 128/128: Merge pull request #72 from he-la/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 91c2d4be67 019/128: update to include keybinding information, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode ac71830de7 096/128: [#46] add Makefile and .travis.yml, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode a61ad07db6 094/128: Merge pull request #42 from tjefferson08/doctype_fontification, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 5752db7c36 012/128: added significant whitespace mode as sub-mode for jade-mode and (soon to be) stylus-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 2f0f55cae4 018/128: updated readme, ELPA Syncer, 2022/01/29