* Shell Mode keywords
@ 2015-07-14 9:22 Raffaele Ricciardi
2015-07-14 11:09 ` Tassilo Horn
0 siblings, 1 reply; 2+ messages in thread
From: Raffaele Ricciardi @ 2015-07-14 9:22 UTC (permalink / raw)
To: help-gnu-emacs
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?
Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Shell Mode keywords
2015-07-14 9:22 Shell Mode keywords Raffaele Ricciardi
@ 2015-07-14 11:09 ` Tassilo Horn
0 siblings, 0 replies; 2+ messages in thread
From: Tassilo Horn @ 2015-07-14 11:09 UTC (permalink / raw)
To: Raffaele Ricciardi; +Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-14 11:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 9:22 Shell Mode keywords Raffaele Ricciardi
2015-07-14 11:09 ` Tassilo Horn
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).