[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cant global map overwrite local maps?
From: |
Florian Kaufmann |
Subject: |
Cant global map overwrite local maps? |
Date: |
29 Mar 2006 10:47:32 -0800 |
User-agent: |
G2/0.2 |
Hello
Isn't it possible to bind a key to command such that this definition is
effective in all major & minor modes? In my particular case I'd like to
bind forward-char and backward-char to C-j and C-l respectively. But I
'd like to write this definition only once, and not for all minor and
major modes which overwrite the global map. For example currently in my
init.el I not only have to write
(global-set-key [(control j)] 'backward-char)
(global-set-key [(control l)] 'forward-char)
but disturbingly also
(add-hook 'c++-mode-hook
'(lambda ()
(define-key c++-mode-map [(control j)] 'backward-char)
(define-key c++-mode-map [(control l)] 'forward-char) ))
And I also have to add lines for countless of other modes I intend to
use.
Thanks & Greetings
Flo
- Cant global map overwrite local maps?,
Florian Kaufmann <=