branch: externals/poke-mode
commit 66799d3eef087192385944f894a82903c6e407af
Author: Jose E. Marchesi <[email protected]>
Commit: Jose E. Marchesi <[email protected]>
poke-mode: font-lock entity names in chained declarations
2020-11-08 Jose E. Marchesi <[email protected]>
* etc/poke-mode.el (poke-font-lock-keywords): Add additional rule
to cover chained declarations.
---
poke-mode.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/poke-mode.el b/poke-mode.el
index 0b4c561ef7..c2a062051f 100644
--- a/poke-mode.el
+++ b/poke-mode.el
@@ -189,6 +189,15 @@
(+ space)
"=")
1 'poke-declaration-name)
+ ;; This one is to cover the case of chained declarations of the form
+ ;; var foo = 10, bar = 20,
+ ;; baz = 30,
+ `(,(rx (group (any "A-Z" "a-z" "_") (* (any "A-Z" "a-z" "_" "0-9")))
+ (* space)
+ "="
+ (+ (not ","))
+ "," (* space) eol)
+ 1 'poke-declaration-name)
;; attributes
`(,(rx "'" (group (any "A-Z" "a-z" "_") (* (any "A-Z" "a-z" "0-9" "_"))))
0 'poke-attribute)