File: bat-mode.el.html

Major mode for editing DOS/Windows scripts (batch files). Provides syntax highlighting, a basic template, access to DOS help pages, imenu/outline navigation, and the ability to run scripts from within Emacs. The syntax groups for highlighting are:

Face Example
bat-label-face :LABEL
font-lock-comment-face rem
font-lock-builtin-face copy
font-lock-keyword-face goto
font-lock-warning-face cp
font-lock-constant-face [call] prog
font-lock-variable-name-face %var%
font-lock-type-face -option

Usage:

See documentation of function bat-mode.

Separate package dos-indent (Matthew Fidler) provides rudimentary indentation, see https://www.emacswiki.org/emacs/dos-indent.el.

Acknowledgments:

Inspired by batch-mode (Agnar Renolen) and cmd-mode (Tadamegu Furukawa).

Defined variables (5)

bat-menuMenu used for ‘bat-mode’.
bat-mode-abbrev-tableAbbrev table for ‘bat-mode’.
bat-mode-hookHook run after entering ‘bat-mode’.
bat-mode-mapKeymap for ‘bat-mode’.
bat-mode-syntax-tableSyntax table for ‘bat-mode’.

Defined functions (6)

bat-cmd-help(CMD)
bat-menu(ARG1)
bat-mode()
bat-run()
bat-run-args(ARGS)
bat-template()

Defined faces (1)

bat-label-faceFont Lock mode face used to highlight labels in batch files.