all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Raffaele Ricciardi <rfflrccrd@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Shell Mode keywords
Date: Tue, 14 Jul 2015 13:09:29 +0200	[thread overview]
Message-ID: <87fv4rc7x2.fsf@gnu.org> (raw)
In-Reply-To: <d0k2luF6l66U1@mid.individual.net> (Raffaele Ricciardi's message of "Tue, 14 Jul 2015 11:22:00 +0200")

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



      reply	other threads:[~2015-07-14 11:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14  9:22 Shell Mode keywords Raffaele Ricciardi
2015-07-14 11:09 ` Tassilo Horn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fv4rc7x2.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rfflrccrd@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.