From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: torys.anderson@gmail.com (Tory S. Anderson) Newsgroups: gmane.emacs.help Subject: Syntax to use (let...) in key binding Date: Mon, 02 Mar 2015 10:37:50 -0500 Message-ID: <87r3t7quk1.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1425310700 30917 80.91.229.3 (2 Mar 2015 15:38:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Mar 2015 15:38:20 +0000 (UTC) To: Emacs Help List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 02 16:38:20 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YSSQE-0006f3-TV for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 16:38:19 +0100 Original-Received: from localhost ([::1]:57735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSSQE-0008AV-Bo for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Mar 2015 10:38:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSSPt-000883-Cm for help-gnu-emacs@gnu.org; Mon, 02 Mar 2015 10:37:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSSPp-0001pB-Lv for help-gnu-emacs@gnu.org; Mon, 02 Mar 2015 10:37:57 -0500 Original-Received: from mail-qg0-x22d.google.com ([2607:f8b0:400d:c04::22d]:36098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSSPp-0001p7-Fe for help-gnu-emacs@gnu.org; Mon, 02 Mar 2015 10:37:53 -0500 Original-Received: by mail-qg0-f45.google.com with SMTP id z107so5342020qgd.4 for ; Mon, 02 Mar 2015 07:37:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=SBIryb2/eYM2CgJdAWEJaoblGrWEhNb/CemJ4BJDLHo=; b=lacElYQWCB4OGypV/CAH9aPxF3ROocxXvhFD2Fu6/dYPTpXU3hic+R0rBgvoc0gA9O UjYS0tFr6YA1Skm/V+LWK2QSqeAKOFLkAmxZ0GIFfq0M8jgpDumenv0UPFac+H45GhkV v7Peppe5ZprfZuZQgciIZtE/Ai9StWBijJkMDxD2T2DGycHQD25CEWyP6SG0i0NtVAc7 wT1YAO4GetHnLbcK6S9K2C+tz6MdYSLjROzpdZsoQcJGkAn7MkFPMZcgz2ltHTVgQC5Z dEdsn/5KUUvnRT3edHZYYLnFMQpZvnF/l7o4foHapyT/OGoeIOm88aOI7Zq1DzROmsLS R27Q== X-Received: by 10.55.43.139 with SMTP id r11mr6558075qkr.67.1425310672837; Mon, 02 Mar 2015 07:37:52 -0800 (PST) Original-Received: from localhost.localdomain (lawn-143-215-60-226.lawn.gatech.edu. [143.215.60.226]) by mx.google.com with ESMTPSA id b195sm8570104qhc.45.2015.03.02.07.37.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2015 07:37:51 -0800 (PST) User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102982 Archived-At: I'm guessing it's some stupid mistake, but why doesn't this work? --8<---------------cut here---------------start------------->8--- ;; Resume bookmark view or create it (global-set-key [f10] '(let ((b "*Bookmark List*")) (if (get-buffer b) '(switch-to-buffer b) 'bookmark-bmenu-list))) --8<---------------cut here---------------end--------------->8--- This results in: command-execute: Wrong type argument: commandp, (let ((b "*Bookmark List*")) (if (get-buffer b) (quote (switch-to-buffer b)) (quote bookmark-bmenu-list))) Is the "let" not returning a command like I want it to? debug-on-error doesn't seem to be helping me understand this.