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:
Eli Zaretskii 2017-09-22 16:40:59 +03:00
parent 0273916618
commit 51cbd85454

View file

@ -84,11 +84,11 @@
. 'bat-label-face)
("\\_<\\(defined\\|set\\)\\_>[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)"
(2 font-lock-variable-name-face))
("%\\(\\(\\sw\\|\\s_\\)+\\)%"
("%\\([^% \n]+\\)%?"
(1 font-lock-variable-name-face))
("!\\(\\(\\sw\\|\\s_\\)+\\)!" ; delayed-expansion !variable!
("!\\([^!% \n]+\\)!?" ; delayed-expansion !variable!
(1 font-lock-variable-name-face))
("%%\\(?:~[adfnpstxz]*\\(?:\\$\\(\\(?:\\sw\\|\\s_\\)+\\):\\)?\\)?\\([]!#$&-:?-[_-{}~]\\)"
("%%\\(?:~[adfnpstxz]*\\(?:\\$\\(\\(?:\\sw\\|\\s_\\|_\\)+\\):\\)?\\)?\\([]!#$&-:?-[_-{}~]\\)"
(1 font-lock-variable-name-face nil t) ; PATH expansion
(2 font-lock-variable-name-face)) ; iteration variable or positional parameter
("[ =][-/]+\\(\\w+\\)"