From: martin rudalics <rudalics@gmx.at>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Can one define global-set-key to override mode-based keymap?
Date: Thu, 21 Dec 2006 14:17:39 +0100 [thread overview]
Message-ID: <458A8973.8040802@gmx.at> (raw)
>> Not really recommended:
>>
>> (defvar my-map (make-sparse-keymap)
>> "My keymap.")
>>
>> (defvar my-map-alist `((t . ,my-map))
>> "My keymap alist.")
>>
>> (add-to-ordered-list 'emulation-mode-map-alists 'my-map-alist 100)
>>
>> (define-key my-map [(control n)] 'other-window)
>
> I tried this and it works great so far. Why is it not recommended?
It might interact badly with other modes using this - like cua-mode.
If you use them, you should study their keymaps in order to avoid any
bad interactions. Alternatively you could try `overriding-local-map'.
next reply other threads:[~2006-12-21 13:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-21 13:17 martin rudalics [this message]
[not found] <mailman.551.1163488292.2155.help-gnu-emacs@gnu.org>
2006-12-18 7:31 ` Can one define global-set-key to override mode-based keymap? Daniel Engeler
-- strict thread matches above, loose matches on Subject: below --
2006-11-14 6:46 martin rudalics
2006-11-13 2:19 Liu Fung Sin
2006-11-13 16:25 ` Kevin Rodgers
2006-11-13 16:52 ` rgb
[not found] ` <mailman.501.1163435231.2155.help-gnu-emacs@gnu.org>
2006-11-13 17:01 ` rgb
2006-11-13 17:59 ` Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=458A8973.8040802@gmx.at \
--to=rudalics@gmx.at \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).