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

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

Re: Looking up and CALLING a key binding


From: Lennart Borgman
Subject: Re: Looking up and CALLING a key binding
Date: Tue, 6 Jan 2009 16:20:04 +0100

On Tue, Jan 6, 2009 at 4:14 PM, TheLonelyStar <address@hidden> wrote:
>
> Hi,
>
> I need this for the following two things:
>
> 1. I want to bind a key (the tab key) to a special function which can fail.
> If the function fails, I want to call the original  binding of the key
> (which is differerent depending on which mode I am in).

This is what tabkey2 mode (and its predecessor) tries to do. Please
see EmacsWiki.

> 2. I want to bind a key to the insertion of a little code snippet.
> i.E. { -> to
> {
>  |
> }
> But since in many modes the "{" and "}" keys are bound to some special
> function, I want to call these keybindings for the insertions of the "{" and
> "}".

You can use a minor mode for this. Minor mode key bindings comes
before major mode.




reply via email to

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