unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: scame <laszlomail@protonmail.com>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [External] : Re: Could the current font-lock mechanism support font locking code in comments?
Date: Tue, 30 Mar 2021 21:12:46 -0400	[thread overview]
Message-ID: <jwvo8f0ceo3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CO1PR10MB446664A7FAC2C6A384005B97F37D9@CO1PR10MB4466.namprd10.prod.outlook.com> (Drew Adams's message of "Tue, 30 Mar 2021 18:09:02 +0000")

> Vanilla Emacs might not have dimming, but Emacs has it.
> Library `doremi-frm.el' provides commands that let
> you incrementally dim or strengthen a face or frame
> foreground or background.

What I meant is that there is no way to define a face that dims
other faces.

What you point to is what I was referring to as the hard way: you have
to come up with a list of faces used by the font-lock rules then pass it
to a function (like the ones in `doremi-frm`) which returns a new face
(since you can't modify the actual font-lock faces which are still
being needed in their non-dimmed form) and then arrange to run the
existing rules in such a way that they actually use your newly
defined faces.

It's cumbersome and tricky to do it in a reliable way.

Instead, what we'd need is a face whose effect is to modify the
underlying face (e.g. by dimming it).  I guess alpha-blending could be
used for that.


        Stefan




  parent reply	other threads:[~2021-03-31  1:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  7:40 Could the current font-lock mechanism support font locking code in comments? scame
2021-03-30 14:06 ` Stefan Monnier
2021-03-30 15:44   ` scame
2021-03-30 16:18     ` Stefan Monnier
2021-03-30 18:09       ` [External] : " Drew Adams
2021-03-31  0:10         ` Arthur Miller
2021-03-31  1:12         ` Stefan Monnier [this message]
2021-03-31  4:36           ` Drew Adams
2021-03-31  4:38             ` Drew Adams

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=jwvo8f0ceo3.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=laszlomail@protonmail.com \
    /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).