From: "Drew Adams" <drew.adams@oracle.com>
To: "'tiefeng wu'" <icebergwtf@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: emacs and window placement
Date: Sun, 12 Jul 2009 11:25:16 -0700 [thread overview]
Message-ID: <45120EA9136B4FBCB900A7FE5F2F341F@us.oracle.com> (raw)
In-Reply-To: <4314c1f70907110924y65fd9b6ai59db1969be47f614@mail.gmail.com>
> 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'.
prev parent reply other threads:[~2009-07-12 18:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 14:04 emacs and window placement henry atting
2009-07-11 16:24 ` tiefeng wu
2009-07-12 18:25 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45120EA9136B4FBCB900A7FE5F2F341F@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=icebergwtf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.