Subject: bug#58070: [PATCH] Add tamil99 input method

From: Visuwesh <[email-masked]>
Date: Tue, 27 Sep 2022 13:04:48 +0530

[செவ்வாய் செப்டம்பர் 27, 2022] Eli Zaretskii wrote:

>> Emacs 29's delete-forward-char deletes by grapheme clusters now.  It is
>> now a job of writing a backward version of the grapheme cluster
>> detection code.  I poked around in the C code to see how
>> find-composition-internal was implemented, and it looked *relatively*
>> straightforward to get a backward searching function working.  I might
>> be wrong here, so I hope Eli corrects my misunderstandings.
>
> I don't think I understand what you are after.  Please elaborate on
> the "backward version of the grapheme cluster detection code", and its
> purpose in this context.

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.

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?  M-: (progn (backward-char 1) (delete-forward-char 1)) RET
deletes கு| to | (| being point) whereas if I define the above as a
command named test, and call it via M-x test RET it gives க| instead.
Which is why I said we need a "backward version of the grapheme cluster
detection code."  

HTH.