From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tiefeng wu Newsgroups: gmane.emacs.help Subject: bind a hotkey to toggle variable Date: Sun, 12 Jul 2009 00:28:36 +0800 Message-ID: <4314c1f70907110928j2b12bc95v51e4c785a9fee6f2@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e642d9d4a66c1c046e709441 X-Trace: ger.gmane.org 1247422519 5249 80.91.229.12 (12 Jul 2009 18:15:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jul 2009 18:15:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 12 20:15:13 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQ3Zw-0000ai-JU for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jul 2009 20:15:12 +0200 Original-Received: from localhost ([127.0.0.1]:52290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQ3Zv-000563-UX for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Jul 2009 14:15:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPfRI-0007AB-KN for help-gnu-emacs@gnu.org; Sat, 11 Jul 2009 12:28:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPfRF-000791-0q for help-gnu-emacs@gnu.org; Sat, 11 Jul 2009 12:28:40 -0400 Original-Received: from [199.232.76.173] (port=50897 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPfRE-00078y-Re for help-gnu-emacs@gnu.org; Sat, 11 Jul 2009 12:28:36 -0400 Original-Received: from mail-gx0-f219.google.com ([209.85.217.219]:40004) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MPfRE-0003MW-JL for help-gnu-emacs@gnu.org; Sat, 11 Jul 2009 12:28:36 -0400 Original-Received: by gxk19 with SMTP id 19so2640367gxk.18 for ; Sat, 11 Jul 2009 09:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=yxqE03/sYYs5afSNDW2gas8mYcmUixpznp7mJcFQWnQ=; b=f5cHzyXp0FsPsAPHUa2qrZmu366qYnqS6aB3BBj58bJJElrIC4T4SV8TDFB9uTnr1v 6ozIA4GPfpo5O1mXqknncoEH8GNSypm5rzRQmkZWZKkCnwuKDBJIGYQb2cxxblm3+Mpc i/Bz45LnCayX/YqC29NWf3oRBYfdBd9AAAOhc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Dy8VYDRJMHANfW6mVRuTAt0Z0ntNdVzuXvKzOKgv8HZNTEqNaI+1Anq1nVogPj4rb8 58ysYG6Cev1sgvZAwPNsYKh6eMNkJC1EPf7Lz47E7f52PcnR8zQL4BzEZxxvbOopXCF8 0yTbR7yPYH+mY1kXBXSx276oE3V5OaHl857M0= Original-Received: by 10.100.110.19 with SMTP id i19mr4519421anc.1.1247329716169; Sat, 11 Jul 2009 09:28:36 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Sun, 12 Jul 2009 14:13:55 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:65991 Archived-At: --0016e642d9d4a66c1c046e709441 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit hello all!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)))" please give me some help, thanks! tiefeng wu 2009-07-12 --0016e642d9d4a66c1c046e709441 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit hello all!
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)))"

please give me some help, thanks!

tiefeng wu
2009-07-12
--0016e642d9d4a66c1c046e709441--