emacs-devel
[Top][All Lists]
Advanced

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

Re: I do not understand input-decode-map


From: Lennart Borgman (gmail)
Subject: Re: I do not understand input-decode-map
Date: Tue, 30 Sep 2008 03:36:48 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Stefan Monnier wrote:
>> This works, ie typing "." gives ":" (even in for example Viper)
>>   (define-key input-decode-map [?\.] [?\:])
> 
>> Why does not the next work?
> 
>>   (setq input-decode-map (make-sparse-keymap))
>>   (defvar my-second-map (make-sparse-keymap))
>>   (define-key my-second-map [?\:] [?\.])
>>   (define-key input-decode-map [?\,] my-second-map)
> 
>> Typing "," does what it use to do. Not too bad, but not what I expected ...
> 
> The detailed behavior is fairly tricky.  Basically, it's difficult to
> know when to stop waiting for more keys.  IIRC the code basically stops
> if the current input (rewritten/remapped as necessary) is a valid key
> sequence bound to a command.


I am not sure I understand. It is a bit unexpected that it stops before
there is a matching valid key sequence in input-decode-map. Why is that
useful?




reply via email to

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