emacs-devel
[Top][All Lists]
Advanced

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

Re: prettify-symbols-mode, derived modes, and compose-region


From: Stefan Monnier
Subject: Re: prettify-symbols-mode, derived modes, and compose-region
Date: Fri, 05 Mar 2021 10:14:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> You should definitely try, but I suspect it's not going to work
>> well: :align-to wants to get an "absolute" position of the position
>> where the flexible space ends whereas in your case you only know how
>> wide "char + space" should be, but you don't know at which absolute
>> column "char" will happen to be displayed, so you can't know to which
>> column to :align-to.
>
> If the width of the additional space is known, there's also the :width
> display property.

Indeed, there's `:width` but in the case under discussion the desired
with of the space is something like `1 - width-of-previous-char`, IOW
something ELisp can't know when it puts the text property.

I think it would take something like a `width` property that is
non-replacing (i.e. can be applied to non-spaces and doesn't hide the
text to which it's applied).


        Stefan




reply via email to

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