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

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

Re: bind a hotkey to toggle variable


From: tiefeng wu
Subject: Re: bind a hotkey to toggle variable
Date: Mon, 13 Jul 2009 11:12:05 +0800

I think it's better move discussion of my question here to not bother
henry - poster of thread "emacs and window placement", sorry again!

2009/7/13 Drew Adams <drew.adams@oracle.com>:
> What you bind to a key must be a command. For a function to be a command, it
> must have an `interactive' spec. So you need this:
>
>  (global-set-key [f6]
>   (lambda () (interactive) (setq pop-up-frames (not pop-up-frames)))
>
> See the Elisp manual, node `Defining Commands'.
>

thanks Adams, I'll read the manual carefully.

btw, I'm using your elisp library and having my pop-up-frames variable
default setting to t,
Recently I'm trying IDE-like 'nav' mode from google code, and the
setting of pop-up-frames
starts conflict with nav, because for 'nav' it's better open files in
same frame. So this question
occured.

tiefeng wu
2009-07-13




reply via email to

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