help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: how to add button to emacs that play a elisp code


From: Emanuel Berg
Subject: Re: how to add button to emacs that play a elisp code
Date: Thu, 11 Sep 2014 23:06:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

"Gian Uberto Lauri" <address@hidden> 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


reply via email to

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