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

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

Re: binding a key for keyword completion in all modes


From: Tassilo Horn
Subject: Re: binding a key for keyword completion in all modes
Date: Thu, 26 Feb 2009 09:13:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux)

Xah Lee <xahlee@gmail.com> writes:

Hi Xah,

> the default shortcut for completion is Meta+Tab. However, that key is
> after Alt+Tab, and in Mac and Windows and Linux, that combo is taken
> by OS to switch apps. (i don't want to have emacs override that)
>
> What i have always been doing is pressing Esc then Tab, but that is
> really annoying, especially if you use this often.
>
> How do you solve this?

I reverve super-* for window manager keys, so emacs can use very C and M
binding.  I don't know if that's possible on windows and mac, too.

> also, how to bind a key to completion in any lang's mode? the problem
> for me is, each lang mode usually uses a different name for
> completion, e.g. lisp-complete-symbol, python-complete-symbol, etc.

I think it's more or less a convention that each language mode binds its
symbol completion command to M-TAB.

> Is there a way to solve this?

Maybe something like this will do the trick?

  (global-set-key (kbd "C-TAB")
                  (lambda () (key-binding (kbd "M-TAB")))

Now when you hit C-TAB the command normally bound to M-TAB will be
called.

Bye,
Tassilo
-- 
When Richard Stallman pipes to more, he gets less


reply via email to

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