unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: scame <laszlomail@protonmail.com>
To: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Could the current font-lock mechanism support font locking code in comments?
Date: Tue, 30 Mar 2021 07:40:25 +0000	[thread overview]
Message-ID: <-vuXfnLB83FOYoLI0Kery7gGaun-l6OFzywSWZ6LMyJTpDGk9ooLIKfJ4xSCkYwNTK9IHgDhtkdxPw7kXZkyaippVgp7CRR3aMz7dbos3og=@protonmail.com> (raw)

For example, if I have a file which have some
commented code parts then they could be easier to
read if they were also font locked maybe with dimmed
versions of the regular font lock colors.

Could it be done by reusing the current font locking
implementation and re-running it on a commented code part?

I mean something like layers, the comment is font locked
first with comment syntax as usual and then if some option
is set then font locking is run again on the comment contents
like it's some individual file and it's fontified with dimmed
colors, so it can be distinguished from regular code.

Could current font lock support this somehow or there
is no way that the same buffer part can be fontified
two times by such competing rules?



             reply	other threads:[~2021-03-30  7:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  7:40 scame [this message]
2021-03-30 14:06 ` Could the current font-lock mechanism support font locking code in comments? 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
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='-vuXfnLB83FOYoLI0Kery7gGaun-l6OFzywSWZ6LMyJTpDGk9ooLIKfJ4xSCkYwNTK9IHgDhtkdxPw7kXZkyaippVgp7CRR3aMz7dbos3og=@protonmail.com' \
    --to=laszlomail@protonmail.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).