From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Customizing key bindings (was: Re: [CVS] f7, f8 bound..) Date: Sun, 08 Sep 2002 08:54:33 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200208271621.g7RGLNm30516@rum.cs.yale.edu> <5xhehfe3aj.fsf@kfs2.cua.dk> <874rdfaytt.fsf@pot.cnuce.cnr.it> <5xvg5sh06u.fsf@kfs2.cua.dk> <20020830235528.GA13207@gnu.org> <87ofbji88u.fsf@emacswiki.org> <87sn0scb0b.fsf@emacswiki.org> <87bs7ama8g.fsf@emacswiki.org> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1031489768 28257 127.0.0.1 (8 Sep 2002 12:56:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 8 Sep 2002 12:56:08 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from hermes.netfonds.no ([80.91.224.195]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17o1bh-0007LU-00 for ; Sun, 08 Sep 2002 14:56:06 +0200 Original-Received: from mail-relay.eunet.no (mail-relay.eunet.no [193.71.71.242]) by hermes.netfonds.no (8.12.1/8.12.1) with ESMTP id g88Cu99e007433 for ; Sun, 8 Sep 2002 14:56:09 +0200 (CEST) Original-Received: from quimby.gnus.org (quimby.gnus.org [80.91.224.244]) by mail-relay.eunet.no (8.12.2/8.12.2/GN) with ESMTP id g88Cu8Rb087581 for ; Sun, 8 Sep 2002 14:56:08 +0200 (CEST) (envelope-from emacs-devel-admin@gnu.org) Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17o2B9-0001cC-00 for ; Sun, 08 Sep 2002 15:32:43 +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 17o1bg-0007Ov-00; Sun, 08 Sep 2002 08:56:04 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17o1aG-0007Hf-00 for emacs-devel@gnu.org; Sun, 08 Sep 2002 08:54:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17o1aE-0007HF-00 for emacs-devel@gnu.org; Sun, 08 Sep 2002 08:54:35 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17o1aE-0007Gb-00 for emacs-devel@gnu.org; Sun, 08 Sep 2002 08:54:34 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 17o1aD-00064R-00; Sun, 08 Sep 2002 08:54:33 -0400 Original-To: alex@emacswiki.org In-reply-to: <87bs7ama8g.fsf@emacswiki.org> (message from Alex Schroeder on Sat, 07 Sep 2002 11:15:27 +0200) 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:7710 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7710 It looks basically good now. (defvar custom-global-keymap (let ((map (make-sparse-keymap))) (set-keymap-parent map global-map) map) It looks like that is no longer used for anything. Is it obsolete? (defmacro defkeymap (symbol map doc &rest args) "Define SYMBOL to be a keymap with value MAP. DOC is the keymap documentation." ;; It is better not to use backquote in this file, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. (nconc (list 'custom-declare-keymap (list 'quote symbol) (list 'quote map) doc) args)) It would be better to generate a defvar plus whatever other stuff you need. ;; remove all keys no longer in bindings (mapc (lambda (bind) (unless (assoc (car bind) bindings) (custom-remove-key sym (read-kbd-macro (car bind))))) old-bindings) I think that comment doesn't match the code. The code removes all the bindings in the previous list of customizations.