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: TomSW
Subject: Re: binding a key for keyword completion in all modes
Date: Wed, 4 Mar 2009 15:17:54 -0800 (PST)
User-agent: G2/1.0

On Mar 4, 11:18 pm, Xah Lee <address@hidden> wrote:

> just to make message more clear and independent of the thread, what i
> wanted is to set Ctrl+Tab for command completion that works in all
> major modes, and avoding adding a custome hook to each and every mode.

It depends what you call a "custom hook". The code to rebind C-tab
works whatever the mode, but it still needs to be run for every new
buffer: in my experience most worthwhile modes need a bit of tweaking
so adding an extra function call to emacs-mode-hook, nxml-mode-hook,
etc. isn't a big deal.

I believe the best solution will involve local-set-key and a suitable
hook: maybe you can find a hook called for every new buffer after the
major mode has loaded. Another possibility is to define a global minor
mode that just applies your keybinding changes: I think this will be
invoked after any major mode but I'm not certain.

Regards,
Tom


reply via email to

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