unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: JD Smith <jdtsmith@gmail.com>
To: emacs-devel@gnu.org
Subject: Local face remapping
Date: Wed, 4 Oct 2023 08:58:34 -0400	[thread overview]
Message-ID: <1AB6E9C8-1BCB-4C0A-A4AF-45F5C64D9B4C@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

My indent-bars <https://github.com/jdtsmith/indent-bars> package makes good use of `face-remap-add-relative’ to provide performant depth-based context highlighting via a post-command-hook.  This is very fast and simple: just check the indentation depth, and if it changed, update the buffer-local face remapping list accordingly.  I am now considering a feature which would make this highlighting local in regions based on treesitter block scope.

Is there any means of achieving local face remapping within regions?  Ideally overlays could be used, if they had a `remapping-alist' property, similar to the global or buffer-local value, but applying only within the bounds of the overlay.  Given that this does not exist, is there another way to achieve something similar?


[-- Attachment #2: Type: text/html, Size: 1060 bytes --]

             reply	other threads:[~2023-10-04 12:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 12:58 JD Smith [this message]
2023-10-04 16:54 ` Local face remapping Eli Zaretskii
2023-10-04 18:48   ` JD Smith
2023-10-05  5:32     ` Eli Zaretskii
2023-10-05 13:12       ` JD Smith
2023-10-06  5:41         ` Eli Zaretskii

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=1AB6E9C8-1BCB-4C0A-A4AF-45F5C64D9B4C@gmail.com \
    --to=jdtsmith@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).