[Top][All Lists]

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

Re: Is `kbd' idempotent?

From: Michael Heerdegen
Subject: Re: Is `kbd' idempotent?
Date: Tue, 01 Dec 2015 15:25:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Random832 <address@hidden> writes:

> What exactly do you define as "any format that Emacs
> understands" - do you want to allow backslash-escapes (even
> though no characters requiring such are used in keyboard macro
> format)? Control characters typed directly with C-q? A vector
> literal such as "[?\\M-x]" representing [134217848]? The string
> "(kbd \"foo\")"? Emacs understands all of these.

> Basically, what other formats, specifically, do you want to
> accept? What formats do you think your documentation will cause
> your users to be inclined to type?

The input from the user is `read' and evaluated.  Any expression that
evaluates to something that would be accepted by `define-key' should be
accepted as input.

I'm deliberating if I'm doing the user a favor if I pass any `stringp'
input implicitly to `kbd', because the keyboard macro format seems to be
quite popular.  That would spare him to wrap his input into `kbd' by
himself.  But if the result of `kbd' can change the "semantics" of a
string describing a key sequence - as your counterexamples demonstrate -
I can't do that.

Thanks for all answers,


reply via email to

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