emacs-devel
[Top][All Lists]
Advanced

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

Re: region-based face-remapping


From: Dmitry Gutov
Subject: Re: region-based face-remapping
Date: Thu, 4 Jan 2024 02:07:36 +0200
User-agent: Mozilla Thunderbird

On 03/01/2024 15:42, Eli Zaretskii wrote:
Date: Wed, 3 Jan 2024 14:40:49 +0200
Cc:emacs-devel@gnu.org
From: Dmitry Gutov<dmitry@gutov.dev>

On 03/01/2024 14:31, Eli Zaretskii wrote:
The workhorse we use now for obtaining face information is the
function face_at_buffer_position, which calls the various face-merging
routines.  Those merging routines and their subroutines consider
face-remapping-alist as part of face merging process outlined above.
I don't see how we can avoid passing the buffer position to them if
face-remapping depends on buffer position.
Perhaps face_at_buffer_position would first look up the overlay/text
property 'face-remapping-alist, then merge its value with the variable
face-remapping-alist (using plain 'append', for example), and pass on
the resulting value to the face-merging routines?
Then any code running while face_at_buffer_position does its job will
see a tweaked value of face-remapping-alist, which is not necessarily
TRT, since it is not guaranteed that the buffer position being
examined by face_at_buffer_position is relevant to the rest of the
code.

I'm not sure I understand your response.

IIUC the request is that one would be able to change the faces' appearances at any position in the buffer using a mechanism like additional text properties or overlay properties.

It seems to reason that any code computing the 'face' for a buffer position would need to account for the new property if it's set at that position.



reply via email to

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