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: Xah Lee
Subject: Re: binding a key for keyword completion in all modes
Date: Tue, 3 Mar 2009 15:35:11 -0800 (PST)
User-agent: G2/1.0

On Mar 2, 5:46 am, Tassilo Horn <address@hidden> wrote:
> XahLee<address@hidden> writes:
>
> HiXah,
>
> >> Ah, the interactive was missing as well as the funcall, and the C-TAB
> >> was wrong, too.  Here's a tested version. ;-)
>
> >> --8<---------------cut here---------------start------------->8---
> >> (global-set-key (kbd "<C-tab>")
> >>                 (lambda ()
> >>                   (interactive)
> >>                   (funcall (key-binding (kbd "M-TAB")))))
> >> --8<---------------cut here---------------end--------------->8---
>
> > Thanks Tassilo. It's wonderful.
>
> But don't forget to use Teemu's advice to use `call-interactively' here
> instead of funcall.

umm... there seems to be a problem with this solution.

Suppose i defined Meta+t for Meta+Tab.
When i do Alt+x describe-key on Meta+t, i get

M-t runs the command #[nil "\300\301\302!!\207" [call-interactively
key-binding [134217737]] 3 nil nil]
  which is an interactive compiled Lisp function.
It is bound to M-t.
(anonymous)

Is there a more robust solution?

  Xah
∑ http://xahlee.org/

reply via email to

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