From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.help Subject: Re: On definition of `kbd' Date: Wed, 11 Oct 2006 21:55:36 +0800 Message-ID: References: <85u02brtkw.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1160575232 26992 80.91.229.2 (11 Oct 2006 14:00:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 Oct 2006 14:00:32 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 11 16:00:30 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GXeaa-0001qw-E9 for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Oct 2006 15:57:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXeaa-0007DU-1o for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Oct 2006 09:57:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GXeYl-0004gb-Kj for help-gnu-emacs@gnu.org; Wed, 11 Oct 2006 09:55:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GXeYi-0004aq-Mw for help-gnu-emacs@gnu.org; Wed, 11 Oct 2006 09:55:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXeYi-0004Zz-9Z for help-gnu-emacs@gnu.org; Wed, 11 Oct 2006 09:55:44 -0400 Original-Received: from [65.54.246.232] (helo=bay0-omc3-s32.bay0.hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GXegg-0003q2-Vi; Wed, 11 Oct 2006 10:03:59 -0400 Original-Received: from hotmail.com ([64.4.26.24]) by bay0-omc3-s32.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 11 Oct 2006 06:55:41 -0700 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 11 Oct 2006 06:55:40 -0700 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Wed, 11 Oct 2006 13:55:36 GMT X-Originating-IP: [216.145.54.158] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <85u02brtkw.fsf@lola.goethe.zz> Original-To: dak@gnu.org X-OriginalArrivalTime: 11 Oct 2006 13:55:40.0854 (UTC) FILETIME=[F017A560:01C6ED3C] 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:37989 Archived-At: Have changed to "help-gnu-emacs". So, is this usage of macro only suitable for cases the actual arguments are constants? I.e. (let ((x "x")) (kbd x)) will not pass compilation? Thanks. Regards, Guanpeng Xu >From: David Kastrup >To: "Herbert Euler" >CC: emacs-devel@gnu.org >Subject: Re: On definition of `kbd' >Date: Wed, 11 Oct 2006 13:16:15 +0200 > >"Herbert Euler" writes: > > > I find definition of `kbd' is: > > > > (defmacro kbd (keys) > > "Convert KEYS to the internal Emacs key representation. > > KEYS should be a string constant in the format used for > > saving keyboard macros (see `edmacro-mode')." > > (read-kbd-macro keys)) > > > > This would cause problem when evaluating > > > > (kbd (car list)) > > > > where the `car' of a list is a key sequence text. > >In this case, KEYS is the list `(car list)' and not a string constant. > > > Is the definition correct? I think the body should be > > > > `(read-kbd-macro ,keys) > >That would completely defeat the purpose of having a macro, namely >being able to do compile-time evaluation. > >-- >David Kastrup, Kriemhildstr. 15, 44793 Bochum > > >_______________________________________________ >Emacs-devel mailing list >Emacs-devel@gnu.org >http://lists.gnu.org/mailman/listinfo/emacs-devel _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/