[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 19:32:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Random832 <address@hidden> writes:
> What about calling kbd only if the 'read' result is a string? That way
> if they really want to pass a self-made string, they can do e.g.
> (identity "foo"), whereas "foo" alone will be treated as (kbd "foo")
I want to avoid to introduce such a complexity for that little gain.
>From what I heard, I think it's cleaner to let the user type the `kbd'
call if he prefers the `kbd' format.
> I do wonder what the use case is, though, that benefits from allowing
> the entry of an arbitrary lisp expression instead of just directly
> passing the user input to kbd without even a read/eval stage. Are there
> key sequences that can't be represented in kbd format that the user will
> want to enter as vector literals?
The input can be inserted via copy and paste or another method different
from typing literally. Also the binding of a variable or the result
of something like (my-private-version-of-kbd KEYS ...) should be
supported.
Thanks,
Michael.