[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: emacs and window placement
From: |
Drew Adams |
Subject: |
RE: emacs and window placement |
Date: |
Sun, 12 Jul 2009 11:25:16 -0700 |
> I'm trying to bind f6 key to toggle 'pop-up-frames' variable
> by insert following line in my .emacs file:
> (global-set-key [f6] (lambda () (setq pop-up-frames (not pop-up-frames)))
> and after restart emacs and press f6, emacs says "Wrong type argument:
> commandp, (lambda nil (setq pop-up-frames (not pop-up-frames)))"
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'.