emacs-devel
[Top][All Lists]
Advanced

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

Re: Auto de-composition when point is inside a composition


From: Eli Zaretskii
Subject: Re: Auto de-composition when point is inside a composition
Date: Mon, 21 Oct 2019 19:07:02 +0300

> From: Stefan Monnier <address@hidden>
> Date: Mon, 21 Oct 2019 10:15:43 -0400
> 
> I was recently looking at the following code in keyboard.c:
> 
>         if (last_point_position > BEGV
>             && last_point_position < ZV
>             && (composition_adjust_point (last_point_position,
>                                           last_point_position)
>                 != last_point_position))
>           /* The last point was temporarily set within a grapheme
>              cluster to prevent automatic composition.  To recover
>              the automatic composition, we must update the
>              display.  */
>           windows_or_buffers_changed = 21;
> 
> and wondered:
> 
> - why do we need to set windows_or_buffers_changed at all here?
>   after all, this code is only run in some circumstances, definitely not
>   all the circumstances where we might need to redraw the grapheme
>   cluster after point moved out of it, so it seems it's not the right
>   place to handle this case (it seems either redundant or insufficient).

Maybe because otherwise the redisplay optimizations taken in case only
point moved could fail to redisplay (they might only redraw the
character at point, and fail to include the rest of the composition)?

> - more importantly, does the inhibition of composition when point is in
>   the middle of it still work?  I don't use languages which rely on
>   composition so I'm not completely sure how this feature is/was
>   supposed to work, but I do remember searching for "lam" in Elisp
>   buffers in which I had "lambda" prettified to "λ" and having those "λ"
>   temporarily be expanded back to "lambda" to show the cursor in the
>   middle of it.  Yet, I can't seem to reproduce this de-composition
>   behavior any more.  Is it still working?  How can I trigger it?

Could be related to Backspace deleting just part of the grapheme
cluster?  Or searching for a codepoint that is part of a composition?
But that's guessing, I don't really know the answer to this.  Perhaps
Handa-san (CC'ed) does.



reply via email to

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