emacs-devel
[Top][All Lists]
Advanced

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

Re: Toning down font-lock


From: Stefan Monnier
Subject: Re: Toning down font-lock
Date: Mon, 07 Mar 2022 11:10:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

[ FWIW, I use a "theme" where most font-lock faces use the same colors as
  the default face ;-)
  IOW: black-on-white for most faces, grey-on-white for comments,
  different fonts for strings and keywords, bold for function
  names, ...  ]

> I'm also wondering if there is a more fine-grained mechanism to pick and
> choose font-lock rules.

No, we only have this notion of "level" which is not very useful or even
well defined (does it relate to CPU cost, or gaudiness, or ...).

> I guess not, so should there be one?

Yes.  But I don't think it makes much sense to try and retro-fit into
the current `font-lock-keywords` system, which is already too complex
(yet not flexible enough) for its own good.

I think we should instead introduce a brand new "syntax".  This new
syntax should indeed include a way to give names to some "rules" (or
groups of rules) so they can be enabled/disabled by the user.

Whoever designs this new set of rules would do well to study other
editors's approaches to this problem to benefit from some of the
advantages of the solutions they chose.


        Stefan




reply via email to

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