[Top][All Lists]

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

Re: defcustom :type to use for a key sequence?

From: Kim F. Storm
Subject: Re: defcustom :type to use for a key sequence?
Date: Fri, 16 Dec 2005 00:49:48 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:

> With my suggestion, you just write C-g -- much simpler and equally flexible.
> A user must know a lot about internal representation -- with my suggestion,
> he just has to do C-h c to learn how to write the keys he's interested in
> and copy the output directly to the field.

There is already a :type key-sequence (defined as a restricted-sexp),
but it is only used in one place:

M-x customize-variable RET mouse-region-delete-keys RET

.. which seems to be completely broken when I try it.
E.g. if I press one of the "INS" buttons strange things happen.

I still think it would make a lot of sense to make :type key-sequence
edit a string rather than a sexp.

The actual value would still be a vector or string, but before editing
it would be passed through "key-description" to give the string to
edit, and after editing the string would be passed through "kbd" (aka
"read-kbd-macro") to make the value to save in the variable.

It would be great if there was some way to actually press the keys
to insert, rather than to have to spell them out -- is there some
way to bind a key to have a special meaning while editing such a string?
E.g. to add C-M-S-$ to the string, one could press e.g. C-u C-M-S-$

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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