[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shell Mode keywords
From: |
Tassilo Horn |
Subject: |
Re: Shell Mode keywords |
Date: |
Tue, 14 Jul 2015 13:09:29 +0200 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Raffaele Ricciardi <rfflrccrd@gmail.com> writes:
> Shell Mode defines these keywords:
>
> (defvar shell-font-lock-keywords
> '(("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face)
> ("^[^ \t\n]+:.*" . font-lock-string-face)
> ("^\\[[1-9][0-9]*\\]" . font-lock-string-face))
> "Additional expressions to highlight in Shell mode.")
>
> I infer that the first regexp is meant to match command options.
> What is the purpose of the other two regexps?
Many commands print informative messages like
tool: this is some message
[17] I refer to line/PID/process no 17
which are then highlighted with the string face. For example, with make
the information messages such as
make[2]: Entering directory '/home/horn/Repos/el/emacs/admin/unidata'
make[2]: Nothing to be done for 'charscript.el'.
make[2]: Leaving directory '/home/horn/Repos/el/emacs/admin/unidata'
are shown like so whereas the actual commands make performs are printed
in the default face, e.g.,
make -C ../admin/charsets eucjp-ms.el
where the -C option is highlighted according to the first regex.
Bye,
Tassilo