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

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

Syntax to use (let...) in key binding


From: Tory S. Anderson
Subject: Syntax to use (let...) in key binding
Date: Mon, 02 Mar 2015 10:37:50 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

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. 




reply via email to

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