unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Augusto Stoffel <arstoffel@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Toning down font-lock
Date: Mon, 07 Mar 2022 11:10:01 -0500	[thread overview]
Message-ID: <jwv7d95n48o.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87v8wscm4x.fsf@gmail.com> (Augusto Stoffel's message of "Sat, 05 Mar 2022 19:03:26 +0100")

[ 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	other threads:[~2022-03-07 16:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05 18:03 Toning down font-lock Augusto Stoffel
2022-03-07 16:10 ` Stefan Monnier [this message]
2022-03-07 19:25   ` Augusto Stoffel
2022-03-07 23:55     ` Stefan Monnier
2022-03-08 11:50       ` Augusto Stoffel
2022-03-08 15:18         ` Stefan Monnier
2022-03-10  7:42           ` Augusto Stoffel

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=jwv7d95n48o.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=arstoffel@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).