[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem modifying a keyboard map
From: |
Julien Cubizolles |
Subject: |
Re: Problem modifying a keyboard map |
Date: |
Fri, 08 Mar 2013 14:05:05 +0100 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
Dmitry Gutov <dgutov@yandex.ru> writes:
> Julien Cubizolles <j.cubizolles@free.fr> writes:
>
>> The following code adds a function to the keymap of ido but it's removed
>> from it later on, any idea what could be resetting/clearing it ?
>>
>> (define-key ido-file-dir-completion-map (kbd "$") 'jc-ido-use-bookmark-dir)
>
> `ido-common-initialization', probably. It's called by `ido-completing-read'.
You're right, it calls ido-init-completion-maps. The right way to add
key bindings is (from ido.el)
--8<---------------cut here---------------start------------->8---
(add-hook 'ido-setup-hook 'ido-my-keys)
(defun ido-my-keys ()
"Add my keybindings for ido."
(define-key ido-completion-map " " 'ido-next-match)
)
--8<---------------cut here---------------end--------------->8---