unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: On definition of `kbd'
       [not found] <85u02brtkw.fsf@lola.goethe.zz>
@ 2006-10-11 13:55 ` Herbert Euler
  2006-10-11 14:03   ` David Kastrup
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Euler @ 2006-10-11 13:55 UTC (permalink / raw)
  Cc: help-gnu-emacs

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 <dak@gnu.org>
>To: "Herbert Euler" <herberteuler@hotmail.com>
>CC: emacs-devel@gnu.org
>Subject: Re: On definition of `kbd'
>Date: Wed, 11 Oct 2006 13:16:15 +0200
>
>"Herbert Euler" <herberteuler@hotmail.com> 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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: On definition of `kbd'
  2006-10-11 13:55 ` On definition of `kbd' Herbert Euler
@ 2006-10-11 14:03   ` David Kastrup
  0 siblings, 0 replies; 2+ messages in thread
From: David Kastrup @ 2006-10-11 14:03 UTC (permalink / raw)
  Cc: help-gnu-emacs

"Herbert Euler" <herberteuler@hotmail.com> writes:

> Have changed to "help-gnu-emacs".  So, is this usage
> of macro only suitable for cases the actual arguments
> are constants?

Is there anything unclear about the DOC string?  It _says_ `string
constant' explicitly.

> I.e.
>
> (let ((x "x")) (kbd x))
>
> will not pass compilation?

You could try asking Emacs itself instead of the list.  It will answer
more reliably, faster, with less effort, and authoritatively.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-11 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <85u02brtkw.fsf@lola.goethe.zz>
2006-10-11 13:55 ` On definition of `kbd' Herbert Euler
2006-10-11 14:03   ` David Kastrup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).