Improve syntax highlighting in bat-mode
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Improve font-locking of environment variables. Suggested by Achim Gratz <Stromeko@nexgo.de>. (Bug#28311) (Bug#18405)
This commit is contained in:
parent
0273916618
commit
51cbd85454
1 changed files with 3 additions and 3 deletions
|
@ -84,11 +84,11 @@
|
||||||
. 'bat-label-face)
|
. 'bat-label-face)
|
||||||
("\\_<\\(defined\\|set\\)\\_>[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)"
|
("\\_<\\(defined\\|set\\)\\_>[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)"
|
||||||
(2 font-lock-variable-name-face))
|
(2 font-lock-variable-name-face))
|
||||||
("%\\(\\(\\sw\\|\\s_\\)+\\)%"
|
("%\\([^% \n]+\\)%?"
|
||||||
(1 font-lock-variable-name-face))
|
(1 font-lock-variable-name-face))
|
||||||
("!\\(\\(\\sw\\|\\s_\\)+\\)!" ; delayed-expansion !variable!
|
("!\\([^!% \n]+\\)!?" ; delayed-expansion !variable!
|
||||||
(1 font-lock-variable-name-face))
|
(1 font-lock-variable-name-face))
|
||||||
("%%\\(?:~[adfnpstxz]*\\(?:\\$\\(\\(?:\\sw\\|\\s_\\)+\\):\\)?\\)?\\([]!#$&-:?-[_-{}~]\\)"
|
("%%\\(?:~[adfnpstxz]*\\(?:\\$\\(\\(?:\\sw\\|\\s_\\|_\\)+\\):\\)?\\)?\\([]!#$&-:?-[_-{}~]\\)"
|
||||||
(1 font-lock-variable-name-face nil t) ; PATH expansion
|
(1 font-lock-variable-name-face nil t) ; PATH expansion
|
||||||
(2 font-lock-variable-name-face)) ; iteration variable or positional parameter
|
(2 font-lock-variable-name-face)) ; iteration variable or positional parameter
|
||||||
("[ =][-/]+\\(\\w+\\)"
|
("[ =][-/]+\\(\\w+\\)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue