[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock in shell.el
From: |
Stefan Monnier |
Subject: |
Re: font-lock in shell.el |
Date: |
Tue, 29 Mar 2005 08:33:40 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>> In the shell buffer the current prompt has its own face,
>> comint-highlight-prompt. After a command is entered, the new prompt has this
>> face, but the face for the old prompt is relegated to font-lock-string-face.
> You must have a prompt that triggers one of the various font-lock
> patterns, causing font-lock to over-write the correct prompt face.
> Older (before 2002 sometime) versions used overlays instead of
> text-properties for all prompt faces instead of just the last one,
> which were resistant to being overwritten.
> I'm not sure about how to make font-lock not match areas with certain
> properties attached; Stefan?
In the font lock keywords, don't forget that the "face" specification of
each keyword is an expression. So you can just use an expression like (if
(get-text-property (point) 'toto) nil 'the-face).
Stefan