bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#58070: [PATCH] Add tamil99 input method


From: Eli Zaretskii
Subject: bug#58070: [PATCH] Add tamil99 input method
Date: Tue, 27 Sep 2022 10:53:31 +0300

> From: Visuwesh <visuweshm@gmail.com>
> Cc: arunisaac@systemreboot.net,  58070@debbugs.gnu.org
> Date: Tue, 27 Sep 2022 13:04:48 +0530
> 
> In delete-forward-char, we use find-composition to get the extend of the
> current glyphs in terms of characters.  AFAICT, find-composition does a
> forward search for the 'composition' text property.  My proposal was
> that we write a find-composition variant that would do a backward search
> for the 'composition' text property which we then can make of use in
> delete-backward-char.

You are looking at the wrong branch of the code.  There's no
'composition' text property in the case that is of interest to you;
the characters are composed by the so-called "automatic composition",
whereby Emacs decides which characters to compose without any special
text property.  The relevant code is in find_automatic_composition,
which is called by find-composition-internal.

In any case, my suggestion for finding composition backward is to
incrementally go back and call find-composition-internal, until it
fails to find a composition at or before point.

The next question will be: what would be the key to which you'd bind
this new command?

> We cannot simply do backward-char then delete-forward-char and bind it
> to a command since IIRC the grapheme cluster movement happens in the
> display code?

No, it happens in the command loop.  See adjust_point_for_property,
which calls composition_adjust_point.  I don't think this is important
for the issue at hand, because the point adjustment happens only after
interactive commands.





reply via email to

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