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

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

bug#71345: Feature: unleash font-lock's secret weapon; handle Qfontified


From: Drew Adams
Subject: bug#71345: Feature: unleash font-lock's secret weapon; handle Qfontified = non-nil
Date: Wed, 5 Jun 2024 17:24:44 +0000

> > The solution to this dilemma is well known: Lisp
> > programs that want to control faces without
> > turning off font-lock mode should set
> > font-lock-face property, instead of the face 
> > property.  Why do you need to find another solution?
> 
> Another solution to that dilemma was to use overlays.  🙂

Apologies, as I'm not really following this
thread.  My comment might be irrelevant to
the actual issue; if so, sorry.
___

The question of how to prevent some ad hoc
highlighting from being undone or overridden
by font-lock has always been answered by
telling users to use property `font-lock-face',
which, in effect, still gives font-lock control
but tells it to consider such highlighting as
its own.

As far back as 2007 I proposed what library
font-lock+.el offers as another approach (I
provided a patch in bug #18367): putting a
non-nil text property of `font-lock-ignore'
on text that you don't want font-lock to
fiddle with.

https://lists.gnu.org/archive/html/emacs-devel/2022-04/msg00059.html

Neither `font-lock-face' nor
`font-lock-extra-managed-props' does the
same job (see previous discussions).

They just make `font-lock' _also_ manage the
text; e.g., turning off `font-lock-mode' also
turns off highlighting with the property.

The point is not to give font-lock more
control; it's to be able to remove control
by font-lock from given text.

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18367#38
___

2014 emacs-devel thread:

https://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00540.html

https://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00583.html

2007 emacs-devel thread:

https://lists.gnu.org/archive/html/emacs-devel/2007-03/msg01459.html

Bug #18367 thread:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18367

reply via email to

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