emacs-devel
[Top][All Lists]
Advanced

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

Re: Questions about Quail


From: Visuwesh
Subject: Re: Questions about Quail
Date: Sat, 23 Jul 2022 17:49:42 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

[சனி ஜூலை 23, 2022] James Thomas wrote:

>> The ibus input method does not care about the character before point, it
>> only checks the keystrokes hmm...  I will wait for user feedback™ to
>> decide which is better.
>>
>>> In that web keyboard, try typing hj (கப) then backspace (க) and type h
>>> again: you will get க்க.
>>
>> I.e., whilst you get க்க in my input method, you get கக in the ibus
>> one.
>
> Hmm. One possible solution (albeit a bit complicated), to get the
> non-ibus behaviour, is to use the update-translation-function to never
> end a translation that reaches up to the last 2 input characters: ie
> keep the input pending (unless the last one is not any of the valid
> input characters), and programatically insert the translation of any
> remaining input character beyond the control-flag.
>
> But that would work for only one level of backspace. If you have a
> simpler implementation with the use of state (or checking the character
> before point directly?) that might be better.

Yep, checking the character before point is the easiest solution.  I
tried to keep track of the last character inputted but that quickly got
hairy and unnecessarily complicated.  The current update-translation-function
checks the character before point and the key that was pressed to set
the quail-current-string appropriately.



reply via email to

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