From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Customizing key bindings (was: Re: [CVS] f7, f8 bound..) Date: Thu, 05 Sep 2002 20:35:34 +0200 Organization: The Church of Emacs Sender: emacs-devel-admin@gnu.org Message-ID: References: <200208271621.g7RGLNm30516@rum.cs.yale.edu> <874rdfaytt.fsf@pot.cnuce.cnr.it> <5xvg5sh06u.fsf@kfs2.cua.dk> <20020830235528.GA13207@gnu.org> <87ofbji88u.fsf@emacswiki.org> <87sn0scb0b.fsf@emacswiki.org> <87bs7er99v.fsf@emacswiki.org> <877ki2r8nr.fsf@emacswiki.org> <87y9aipop2.fsf@emacswiki.org> <200209041511.g84FBMi19168@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031250985 17374 127.0.0.1 (5 Sep 2002 18:36:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 5 Sep 2002 18:36:25 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu, alex@emacswiki.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17n1UO-0004W4-00 for ; Thu, 05 Sep 2002 20:36:24 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17n24B-0007G0-00 for ; Thu, 05 Sep 2002 21:13:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17n1W0-0006Ot-00; Thu, 05 Sep 2002 14:38:04 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17n1UQ-0006M0-00 for emacs-devel@gnu.org; Thu, 05 Sep 2002 14:36:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17n1UO-0006LB-00 for emacs-devel@gnu.org; Thu, 05 Sep 2002 14:36:26 -0400 Original-Received: from sheridan.dina.kvl.dk ([130.225.40.227]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17n1UJ-0006Hv-00; Thu, 05 Sep 2002 14:36:20 -0400 Original-Received: from zuse.dina.kvl.dk (zuse.dina.kvl.dk [130.225.40.245]) by sheridan.dina.kvl.dk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id UAA19479; Thu, 5 Sep 2002 20:35:39 +0200 Original-Received: (from abraham@localhost) by zuse.dina.kvl.dk (8.9.3+Sun/8.9.3) id UAA00867; Thu, 5 Sep 2002 20:35:35 +0200 (MEST) X-Authentication-Warning: zuse.dina.kvl.dk: abraham set sender to abraham@dina.kvl.dk using -f Original-To: rms@gnu.org X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ In-Reply-To: (Richard Stallman's message of "Thu, 05 Sep 2002 14:03:34 -0400") Original-Lines: 23 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7578 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7578 Richard Stallman writes: > How about allowing a more declarative form like > > (defkeymap my-mode-map > '(([mouse-1] . foo) > (([mouse-2] "f" "e" "\C-m") . open-file)) > "Keymap for My mode." > :group 'foo > :inherit his-mode-map) > > That is a clean interface, but the crucial question is, what would it > expand into? Would it just be a defvar for my-mode-map, or a > defcustom for my-mode-map? Or would it produce something else? If > so, what else? It is just a variation of the code Alex already posted. It creates a variable my-mode-map whose value is a keymap with the specified bindings, and which can be customized with customize-option. The variable belongs to the foo customize group, and the keymap inherits from his-mode-map.