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

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

Re: Swapping default input method: why so complicated?


From: Ilya Zakharevich
Subject: Re: Swapping default input method: why so complicated?
Date: Wed, 08 Dec 2010 15:36:55 -0000
User-agent: slrn/0.9.8.1pl1 (Linux)

On 2010-11-17, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> I'm trying to do what I consider a very typical requirement: swap two
>> values of default input method.  Unfortunately, I could not find any
>> documented solution (outside of info-manuals, just using f1 v and f1
>> f).  To get it working, I was forced to inspect the sources...  Is
>> there a simpler solution?
>
> I must say I do not really understand what you're trying to do, but to
> change between two different values of default input methods, I'd do
> something like:
>
>    (defun my-foo ()
>      (interactive)
>      (setq default-input-method
>            (if (eq default-input-method 'toto) 'titi 'toto)))
>
> but that only affects the default method to use, not the method actually
> in use.

YEAH, RIGHT!  ;-)

This is what I had for a year - and was trying (for a year!) to
understand - why THIS works only time-to-time. 

Inspecting the code shows that the actual "default input method" is
NOT in 'default-input-method, but is a COMPUTED value based on 3
different stored pieces of information.  Hence my question (and
working code I posted).

Thank anyway, ;-)
Ilya


reply via email to

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