From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: defcustom :type to use for a key sequence? Date: Thu, 15 Dec 2005 10:34:55 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134651037 1633 80.91.229.2 (15 Dec 2005 12:50:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 12:50:37 +0000 (UTC) Cc: Emacs-Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 15 13:50:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EmsX2-0008Ka-7C for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 13:48:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmsXf-00070i-O3 for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 07:49:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EmpXC-0001DD-7N for emacs-devel@gnu.org; Thu, 15 Dec 2005 04:36:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EmpX6-0001C2-1j for emacs-devel@gnu.org; Thu, 15 Dec 2005 04:36:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EmpX2-0001B9-LZ for emacs-devel@gnu.org; Thu, 15 Dec 2005 04:36:13 -0500 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EmpZG-0003QX-9T for emacs-devel@gnu.org; Thu, 15 Dec 2005 04:38:30 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepa.post.tele.dk (Postfix) with SMTP id A50BB47FE84; Thu, 15 Dec 2005 10:35:27 +0100 (CET) Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Wed, 14 Dec 2005 08:44:36 -0800") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47784 Archived-At: "Drew Adams" 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 > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel > > -- Kim F. Storm http://www.cua.dk