From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: customizing key definitions with Customize Date: Tue, 13 May 2008 22:23:09 -0700 Message-ID: <005a01c8b582$99b4fb90$0200a8c0@us.oracle.com> References: <000301c8b39e$ded16a50$0200a8c0@us.oracle.com><003701c8b438$9d6e9f20$0200a8c0@us.oracle.com> <87r6c75brc.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1210742745 26447 80.91.229.12 (14 May 2008 05:25:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 May 2008 05:25:45 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: "'Juri Linkov'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 14 07:26:21 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jw9VM-00043m-PI for ged-emacs-devel@m.gmane.org; Wed, 14 May 2008 07:26:21 +0200 Original-Received: from localhost ([127.0.0.1]:52182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jw9Ud-0004sE-KL for ged-emacs-devel@m.gmane.org; Wed, 14 May 2008 01:25:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jw9TO-0004Xf-Ry for emacs-devel@gnu.org; Wed, 14 May 2008 01:24:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jw9TO-0004XR-52 for emacs-devel@gnu.org; Wed, 14 May 2008 01:24:18 -0400 Original-Received: from [199.232.76.173] (port=52623 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jw9TN-0004XM-Hr for emacs-devel@gnu.org; Wed, 14 May 2008 01:24:17 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]:48767) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jw9TJ-0003ad-07; Wed, 14 May 2008 01:24:13 -0400 Original-Received: from agmgw2.us.oracle.com (agmgw2.us.oracle.com [152.68.180.213]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m4E5O9ec004732; Wed, 14 May 2008 00:24:09 -0500 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw2.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m4E3MU5G015117; Tue, 13 May 2008 23:24:09 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3672030061210742585; Tue, 13 May 2008 22:23:05 -0700 Original-Received: from dradamslap1 (/141.144.72.233) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 13 May 2008 22:23:05 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87r6c75brc.fsf@jurta.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: Aci0jyEtFEak7BY7RjGcqyaOKYRczAAem8PA X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:97119 Archived-At: > >> Using Customize to rebind keys would be a good feature to add; > >> but in order to make this fit in well with Emacs, it should > >> store the bindings in keymaps. For instance, if you customize > >> the bindings of Lisp mode, it should do that by altering > >> the bindings in lisp-mode-map. > > > > Not sure what you mean. The code I sent does let users > > change bindings in the keymap. If such an option were provided > > for Lisp mode, users could use it to change `lisp-mode-map' > > bindings. However, it is true that if a binding is > > changed in some other way, it is not then reflected in the > > user option. That could be fixed. > > Another alternative is to make keybindings first-class entities > for Customize like faces with their `defface' definition. > So customized and saved settings in a customization file > would be like: > > (custom-set-keybindings > ;; custom-set-keybindings was added by Custom. > ;; If you edit it by hand, you could mess it up, so be careful. > ;; Your init file should contain only one such instance. > ;; If there is more than one, they won't work right. > '(emacs-lisp-mode-map (([tab] 'lisp-indent-or-complete) ...)) > ...) > > that will override the default bindings in the corresponding keymaps. That was the idea behind using a user option for key definitions. Whether having a separate user option is better or worse could be discussed.