From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Enhancements to "minor-mode-map-alist" functionality. Date: 30 Apr 2002 23:25:07 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xn0vkx4jw.fsf@kfs2.cua.dk> References: <5xbscpg7zl.fsf@kfs2.cua.dk> <200204112243.g3BMhmI01190@rum.cs.yale.edu> <5xd6x5i7ps.fsf@kfs2.cua.dk> <5x4rih12b2.fsf@kfs2.cua.dk> <200204121846.g3CIkZY16909@rum.cs.yale.edu> <5xofgoobzr.fsf@kfs2.cua.dk> <200204122021.g3CKLh217680@rum.cs.yale.edu> <5xu1qd29od.fsf@kfs2.cua.dk> <200204162018.g3GKI3S24358@aztec.santafe.edu> <5x662rxog2.fsf@kfs2.cua.dk> <200204181846.g3IIk2K00596@aztec.santafe.edu> <5xk7r4mwqs.fsf@kfs2.cua.dk> <200204191842.g3JIgnV01056@aztec.santafe.edu> <5x8z7juyxf.fsf@kfs2.cua.dk> <200204201727.g3KHRvu01477@aztec.santafe.edu> <5xwuv11f7v.fsf@kfs2.cua.dk> <200204222236.g3MMamv02091@aztec.santafe.edu> <5xbscahe51.fsf@kfs2.cua.dk> <200204241755.g3OHtBZ03352@aztec.santafe.edu> <5xlmbaefru.fsf@kfs2.cua.dk> <200204272241.g3RMfNd05496@aztec.santafe.edu> <200204300518.g3U5ILu06523@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1020231024 14969 127.0.0.1 (1 May 2002 05:30:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 1 May 2002 05:30:24 +0000 (UTC) Cc: Kai.Grossjohann@CS.Uni-Dortmund.DE, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 172mh5-0003tK-00 for ; Wed, 01 May 2002 07:30:23 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 172mlf-0001jA-00 for ; Wed, 01 May 2002 07:35:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 172lpr-0001fU-00; Wed, 01 May 2002 00:35:23 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 172eAg-0001Oz-00; Tue, 30 Apr 2002 16:24:22 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id E6E0D7C035; Tue, 30 Apr 2002 20:24:19 +0000 (GMT) Original-To: rms@gnu.org In-Reply-To: <200204300518.g3U5ILu06523@aztec.santafe.edu> Original-Lines: 42 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3468 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3468 Richard Stallman writes: > What exactly is the emulation-mode-minor-map-alist suggestion? The basic emulation-mode-map-alists functionality is simply a way to allow packages like cua and viper to install and manage their own keymap alists independent of minor-mode-map-alist: It is a list of alists with the same format and interpretation as minor-mode-map-alist. The documentation for emulation-mode-map-alists is as follows: List of keymap alists to use for emulations modes. It is intended for modes or packages using multiple minor-mode keymaps. Each element is a keymap alist just like `minor-mode-map-alist', and it is used the same way. The "active" keymaps in this alist are used before `minor-mode-map-alist' but after `minor-mode-overriding-map-alist'. The second - independent - part of the proposed functionality was to allow more complex expressions to select the active keymaps in the minor-mode-map-alist (and emulation-mode-map-alists): The following minor-mode-map-alist documentation describes this added functionality: Alist of keymaps to use for minor modes. Each element looks like (VARIABLE . KEYMAP); KEYMAP is used to read key sequences and look up bindings iff VARIABLE's value is non-nil. Alternatively, an element may look like (lambda . FORM) where FORM is evaluated and should return either nil or a cons (SYMBOL . KEYMAP); in this case, KEYMAP is used unconditionally and SYMBOL is displayed by `describe-bindings' as the variable controlling KEYMAP. If two active keymaps bind the same key, the keymap appearing earlier in the list takes precedence. -- Kim F. Storm http://www.cua.dk