unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>, Eli Zaretskii <eliz@gnu.org>
Cc: "71345@debbugs.gnu.org" <71345@debbugs.gnu.org>,
	JD Smith <jdtsmith@gmail.com>
Subject: bug#71345: Feature: unleash font-lock's secret weapon; handle Qfontified = non-nil
Date: Wed, 5 Jun 2024 17:24:44 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488870CE7ECAD1A5A8B35E0F3F92@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <jwva5jzjpeu.fsf-monnier+emacs@gnu.org>

> > 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	other threads:[~2024-06-05 17:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 16:35 bug#71345: Feature: unleash font-lock's secret weapon; handle Qfontified = non-nil JD Smith
2024-06-03 16:56 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 21:14   ` JD Smith
2024-06-04  1:44     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 12:08       ` JD Smith
2024-06-04 14:15         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 15:38           ` JD Smith
2024-06-04 21:52             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04 22:41               ` JD Smith
2024-06-05 11:29                 ` Eli Zaretskii
2024-06-05 14:02                   ` JD Smith
2024-06-05 14:53                     ` Eli Zaretskii
2024-06-05 15:52                       ` JD Smith
2024-06-05 17:00                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-05 17:24                         ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-06-05 11:24               ` Eli Zaretskii
2024-06-05 14:05                 ` JD Smith
2024-06-05 16:28                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-05 16:38                   ` Eli Zaretskii
2024-06-05 16:59                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-05 17:52                       ` Eli Zaretskii
2024-06-05 18:13                         ` JD Smith
2024-06-07  3:27                         ` JD Smith

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=SJ0PR10MB5488870CE7ECAD1A5A8B35E0F3F92@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=71345@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=jdtsmith@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

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).