help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font-lock seemingly interacting with insertion


From: Marcin Borkowski
Subject: Re: Font-lock seemingly interacting with insertion
Date: Wed, 21 Mar 2018 08:24:31 +0100
User-agent: mu4e 1.1.0; emacs 27.0.50

On 2018-03-21, at 07:54, Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Marcin Borkowski <mbork@mbork.pl>
>> Date: Wed, 21 Mar 2018 06:28:36 +0100
>> 
>> I want to insert a string with a part made bold (using
>> `add-face-text-property').  In certain buffers (e.g. in Fundamental
>> mode) this works, but in some other ones (e.g. in Org-mode or
>> message-mode) it does not.  After turning font-lock off, it works back
>> again.  This means that font-lock kicks in right after inserting and
>> disables my boldface.
>
> Yes.
>
>> Is there a way to make it not happen, without turning font lock off?
>
> Not really.  You can turn off JIT font-lock, but then you will have to
> refontify manually, and I suspect that this would, for you, mean
> "turning off font-lock".
>
> Bottom line: in buffers with font-lock turned on, font-lock has
> absolute control of the faces.

Thanks.  This means that instead of inserting stuff with added faces,
I need either to modify font lock keywords or use overlays.

Best,

-- 
Marcin Borkowski
http://mbork.pl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]