[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: |
Thu, 15 Dec 2005 10:34:55 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"Drew Adams" <address@hidden> writes:
> I sent this question to gnu-emacs-help a while back. I got one reply saying
> that there is no better choice, for now, than `sexp', and that this
> (key-sequence typing) was to be reviewed for possible enhancement after the
> release.
>
> Can someone confirm that `sexp' is the best choice here, for now? Thanks.
IMO, this is better (using a string type):
(defcustom the-key "M-SPC" :type 'string)
(define-key my-map (kbd the-key) 'the-cmd)
It would be very useful to have a :type 'kbd that could DTRT
re. :set etc.
> (defcustom the-key [(meta ?\ )] "...")
> (define-key my-map the-key 'the-cmd))
>
> Suppose I have this:
>
> (defcustom the-key [(meta ?\ )] "...")
> (define-key my-map the-key 'the-cmd))
>
> A user might customize which key sequence is bound to `the-cmd'.
>
> What :type is appropriate for the defcustom? I don't see a type
> ready-made for key sequences. Just `string'? Or is a `choice' of
> `string' and (what kind of?) `vector' appropriate? How can the
> :type allow for any key sequence (besides using just `sexp')? Thx.
>
>
>
> _______________________________________________
> Emacs-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-devel
>
>
--
Kim F. Storm <address@hidden> http://www.cua.dk
- defcustom :type to use for a key sequence?, Drew Adams, 2005/12/14
- Re: defcustom :type to use for a key sequence?,
Kim F. Storm <=
- Re: defcustom :type to use for a key sequence?, Lennart Borgman, 2005/12/15
- Re: defcustom :type to use for a key sequence?, Kim F. Storm, 2005/12/15
- Re: defcustom :type to use for a key sequence?, Lennart Borgman, 2005/12/15
- Re: defcustom :type to use for a key sequence?, Kim F. Storm, 2005/12/15
- Re: defcustom :type to use for a key sequence?, Lennart Borgman, 2005/12/15
- Re: defcustom :type to use for a key sequence?, Kim F. Storm, 2005/12/15
- Re: defcustom :type to use for a key sequence?, Lennart Borgman, 2005/12/15
- Re: defcustom :type to use for a key sequence?, Richard M. Stallman, 2005/12/16
- Re: defcustom :type to use for a key sequence?, Kim F. Storm, 2005/12/20
- Re: defcustom :type to use for a key sequence?, Richard M. Stallman, 2005/12/20