[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On definition of `kbd'
From: |
Stuart D. Herring |
Subject: |
Re: On definition of `kbd' |
Date: |
Wed, 11 Oct 2006 07:24:33 -0700 (PDT) |
User-agent: |
SquirrelMail/1.4.6-7.el3.7lanl |
>> 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.
To elaborate on David's response: if you really want to get a key sequence
representation of a dynamic string, just use the `read-kbd-macro' function
that the `kbd' macro calls. `kbd' is for when you just want to do
something simple and direct (read: hardcoded) in Lisp: (kbd "C-x C-c").
The result is human-readable but during byte-compilation actually becomes
"^X^C" (two characters), so there's no performance penalty.
Hope this helps,
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.