From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: how to add button to emacs that play a elisp code
Date: Thu, 11 Sep 2014 23:06:36 +0200 [thread overview]
Message-ID: <87zje5x3xf.fsf@debian.uxu> (raw)
In-Reply-To: mailman.8671.1410424828.1147.help-gnu-emacs@gnu.org
"Gian Uberto Lauri" <saint@eng.it> writes:
> In Emacs you can have global keybindings (that are
> active no matter what is the current buffer) and
> local ones (active only in the buffers they are
> defined for).
Almost!
The global map is always present, yes.
But if there is a mode map, and you set the global map
for key K, and K is defined in the mode map as well,
and then you hit K, you get the mode K, not the
"global" K.
This can make for a fair bit of annoyance if you (like
me) want to have a lot of (truly) global keys (i.e.,
keys that are the same everywhere).
I don't know what the standard approach is.
Either, you can rebind all those mode maps. Those can
be quite a few. (But it can be automatized with
functions that accepts the maps as arguments.)
Or you can set the global map to the keys you want, and
then have those keys set to nil in the mode maps.
I have experimented a lot with this (in various ways),
and all is in:
http://user.it.uu.se/~embe8573/conf/emacs-init/global-keys.el
- it works, but I wouldn't be surprised if there are
other ways to do it as well, which may be better or
worse.
--
underground experts united
next prev parent reply other threads:[~2014-09-11 21:06 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 7:44 how to add button to emacs that play a elisp code Renato Pontefice
2014-09-11 8:08 ` Gian Uberto Lauri
2014-09-11 8:40 ` Gian Uberto Lauri
2014-09-11 12:17 ` Stefan Monnier
2014-09-11 12:22 ` Gian Uberto Lauri
2014-09-11 12:35 ` Stefan Monnier
2014-09-11 12:46 ` Gian Uberto Lauri
[not found] ` <mailman.8685.1410439222.1147.help-gnu-emacs@gnu.org>
2014-09-11 21:15 ` Emanuel Berg
2014-09-11 23:42 ` Pascal J. Bourguignon
2014-09-12 0:05 ` Emanuel Berg
2014-09-12 0:23 ` Michael Heerdegen
[not found] ` <mailman.8717.1410481417.1147.help-gnu-emacs@gnu.org>
2014-09-12 0:50 ` Emanuel Berg
2014-09-12 1:19 ` Michael Heerdegen
2014-09-12 14:52 ` Drew Adams
[not found] ` <mailman.8719.1410484774.1147.help-gnu-emacs@gnu.org>
2014-09-12 2:07 ` Emanuel Berg
2014-09-12 7:44 ` Renato Pontefice
2014-09-12 10:15 ` Renato Pontefice
2014-09-12 19:33 ` Emanuel Berg
2014-09-13 21:28 ` Pascal J. Bourguignon
2014-09-14 2:30 ` Rusi
2014-09-14 4:18 ` Rusi
2014-09-14 18:16 ` Emanuel Berg
2014-09-14 18:11 ` Emanuel Berg
2014-09-15 5:48 ` Alex Kost
[not found] ` <mailman.8874.1410760111.1147.help-gnu-emacs@gnu.org>
2014-09-15 22:45 ` Emanuel Berg
2014-09-16 4:55 ` Alex Kost
[not found] ` <mailman.8956.1410843332.1147.help-gnu-emacs@gnu.org>
2014-09-16 22:27 ` Emanuel Berg
[not found] ` <mailman.8671.1410424828.1147.help-gnu-emacs@gnu.org>
2014-09-11 21:06 ` Emanuel Berg [this message]
[not found] ` <mailman.8670.1410422963.1147.help-gnu-emacs@gnu.org>
2014-09-11 8:24 ` Renato Pontefice
2014-09-11 16:00 ` Pascal J. Bourguignon
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zje5x3xf.fsf@debian.uxu \
--to=embe8573@student.uu.se \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.