all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Herbert Euler" <herberteuler@hotmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: On definition of `kbd'
Date: Wed, 11 Oct 2006 21:55:36 +0800	[thread overview]
Message-ID: <BAY112-F14A394F998C71A58410709DA140@phx.gbl> (raw)
In-Reply-To: <85u02brtkw.fsf@lola.goethe.zz>

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/

  reply	other threads:[~2006-10-11 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-11 11:09 On definition of `kbd' Herbert Euler
2006-10-11 11:16 ` David Kastrup
2006-10-11 13:55   ` Herbert Euler [this message]
2006-10-11 14:03     ` David Kastrup
2006-10-11 14:24   ` Stuart D. Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY112-F14A394F998C71A58410709DA140@phx.gbl \
    --to=herberteuler@hotmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.