From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: defcustom :type to use for a key sequence? Date: Fri, 16 Dec 2005 00:55:46 +0100 Message-ID: <43A20282.4020704@student.lu.se> 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=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1134691120 11209 80.91.229.2 (15 Dec 2005 23:58:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 23:58:40 +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:58:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1En2y3-0002FD-Q6 for ged-emacs-devel@m.gmane.org; Fri, 16 Dec 2005 00:57:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1En2yi-00039D-R9 for ged-emacs-devel@m.gmane.org; Thu, 15 Dec 2005 18:57:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1En2xu-0002nR-Lq for emacs-devel@gnu.org; Thu, 15 Dec 2005 18:56:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1En2xr-0002ls-GD for emacs-devel@gnu.org; Thu, 15 Dec 2005 18:56:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1En2xr-0002lc-4M for emacs-devel@gnu.org; Thu, 15 Dec 2005 18:56:47 -0500 Original-Received: from [81.228.8.83] (helo=pne-smtpout1-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1En30B-00034p-C3 for emacs-devel@gnu.org; Thu, 15 Dec 2005 18:59:11 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout1-sn2.hy.skanova.net (7.2.069.1) id 43A176630002A6E9; Fri, 16 Dec 2005 00:55:46 +0100 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: "Kim F. Storm" In-Reply-To: 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:47830 Archived-At: Kim F. Storm wrote: >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-$ > > I do not think it is implemented now, but it would be rather easy to do I believe. Just add a keymap to the field where you enter the keys. But it seems a little bit more complicated to edit it, but not at all impossible.