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: Fri, 16 Dec 2005 00:49:48 +0100 Message-ID: References: <43A16BDF.6020608@student.lu.se> <43A1943C.804@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134690745 10397 80.91.229.2 (15 Dec 2005 23:52:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 23:52:25 +0000 (UTC) Cc: Drew Adams , Emacs-Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 16 00:52:16 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1En2s0-000100-Bb for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2005 00:50:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1En2sf-0000Tr-58 for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 18:51:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1En2sM-0000Ta-79 for emacs-devel@gnu.org; Thu, 15 Dec 2005 18:51:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1En2sI-0000T2-Lx for emacs-devel@gnu.org; Thu, 15 Dec 2005 18:51:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1En2sI-0000Sy-GM for emacs-devel@gnu.org; Thu, 15 Dec 2005 18:51:02 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1En2uc-0001Yh-NE for emacs-devel@gnu.org; Thu, 15 Dec 2005 18:53:26 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id 9CAC026281F; Fri, 16 Dec 2005 00:50:19 +0100 (CET) Original-To: Lennart Borgman In-Reply-To: (Kim F. Storm's message of "Thu, 15 Dec 2005 23:47:31 +0100") 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:47829 Archived-At: storm@cua.dk (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 http://www.cua.dk