* bug#53568: Keyword "setx" in `bat-mode`
@ 2022-01-27 4:17 Arni Magnusson
2022-01-27 16:12 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Arni Magnusson @ 2022-01-27 4:17 UTC (permalink / raw)
To: 53568
[-- Attachment #1.1: Type: text/plain, Size: 519 bytes --]
Hi,
As the author of bat-mode, I'd like to suggest adding syntax highlighting
support for the 'setx' command and the subsequent variable name.
Working from bat-mode.el in the current git repository, I added "setx" to
the list of commands and also tweaked the matcher for
`font-lock-variable-name-face`. See the attached patch.
To see the improved syntax highlighting, this example code can be used:
xcopy sty c:\home\latex\sty\spc /s /y
setx TEXINPUTS .\\;c:\home\latex\\;
echo Installation completed
Cheers,
Arni
[-- Attachment #1.2: Type: text/html, Size: 1422 bytes --]
[-- Attachment #2: bat-mode.el.patch --]
[-- Type: text/x-patch, Size: 1209 bytes --]
diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el
index 7ef2500e46..6bac297a29 100644
--- a/lisp/progmodes/bat-mode.el
+++ b/lisp/progmodes/bat-mode.el
@@ -71,8 +71,8 @@
"doskey" "echo" "endlocal" "erase" "fc" "find" "findstr" "format"
"ftype" "label" "md" "mkdir" "more" "move" "net" "path" "pause"
"popd" "prompt" "pushd" "rd" "ren" "rename" "replace" "rmdir" "set"
- "setlocal" "shift" "sort" "subst" "time" "title" "tree" "type"
- "ver" "vol" "xcopy"))
+ "setlocal" "setx" "shift" "sort" "subst" "time" "title" "tree"
+ "type" "ver" "vol" "xcopy"))
(CONTROLFLOW
'("call" "cmd" "defined" "do" "else" "equ" "exist" "exit" "for" "geq"
"goto" "gtr" "if" "in" "leq" "lss" "neq" "not" "start"))
@@ -82,7 +82,7 @@
(2 font-lock-constant-face t))
("^:[^:].*"
. 'bat-label-face)
- ("\\_<\\(defined\\|set\\)\\_>[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)"
+ ("\\_<\\(defined\\|set\\|setx\\)\\_>[ \t]*\\(\\(\\sw\\|\\s_\\)+\\)"
(2 font-lock-variable-name-face))
("%~\\([0-9]\\)"
(1 font-lock-variable-name-face))
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#53568: Keyword "setx" in `bat-mode`
2022-01-27 4:17 bug#53568: Keyword "setx" in `bat-mode` Arni Magnusson
@ 2022-01-27 16:12 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-27 16:12 UTC (permalink / raw)
To: Arni Magnusson; +Cc: 53568
Arni Magnusson <thisisarni@gmail.com> writes:
> As the author of bat-mode, I'd like to suggest adding syntax highlighting support
> for the 'setx' command and the subsequent variable name.
>
> Working from bat-mode.el in the current git repository, I added "setx" to the list of
> commands and also tweaked the matcher for `font-lock-variable-name-face`. See
> the attached patch.
Thanks; pushed to Emacs 29 (with an added ChangeLog-style commit
message).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-27 16:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 4:17 bug#53568: Keyword "setx" in `bat-mode` Arni Magnusson
2022-01-27 16:12 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).