From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Function for deleting a key binding in a sparse keymap Date: Mon, 12 Dec 2005 11:18:35 -0500 Message-ID: References: <3cc04a73cc1b1a.3cc1b1a3cc04a7@net.lu.se> <43987D21.4070200@student.lu.se> <4398C8F2.8060301@student.lu.se> <4399E538.2080909@student.lu.se> <439B688C.1090207@student.lu.se> <439CD53C.1070500@student.lu.se> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1134417446 1988 80.91.229.2 (12 Dec 2005 19:57:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Dec 2005 19:57:26 +0000 (UTC) Cc: storm@cua.dk, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 12 20:57:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EltlB-0004O0-DD for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2005 20:54:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eltlf-0001sG-Vz for ged-emacs-devel@m.gmane.org; Mon, 12 Dec 2005 14:55:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ElrBs-0000e2-Uh for emacs-devel@gnu.org; Mon, 12 Dec 2005 12:10:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Elqf8-0000Fk-NG for emacs-devel@gnu.org; Mon, 12 Dec 2005 11:36:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ElqPN-0004Mg-7X for emacs-devel@gnu.org; Mon, 12 Dec 2005 11:20:13 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ElqR7-0007iR-IJ for emacs-devel@gnu.org; Mon, 12 Dec 2005 11:22:01 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1ElqNn-0008Oi-Nz; Mon, 12 Dec 2005 11:18:35 -0500 Original-To: Lennart Borgman In-reply-to: <439CD53C.1070500@student.lu.se> (message from Lennart Borgman on Mon, 12 Dec 2005 02:41:16 +0100) 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:47553 Archived-At: If we want to write it in pseudo-Lisp, this is much more Lisp-like yet with much less nesting. (or (FIND-IN special-event-map) (if overriding-terminal-local-map (FIND-IN overriding-terminal-local-map) (if overriding-local-map (FIND-IN overriding-local-map) (or (FIND-IN (KEYMAP-PROPERTY-AT-POINT)) (FIND-IN-ANY EMULATION-MODE-MAP-ALISTS) (FIND-IN-ANY minor-mode-overriding-map-alist) (FIND-IN-ANY minor-mode-map-alist) (FIND-IN (LOCAL-MAP-PROPERTY-AT-POINT)) (FIND-IN (current-local-map))))) (FIND-IN (current-global-map))) However, we're writing English, not Polish. That's not necessary the best way to structure it in the manual. However, it might give ideas for how to do so in the manual. This pseudo-Lisp structure might give better ideas, since it has fewer levels of nesting of control constructs. (or (FIND-IN special-event-map) (cond (overriding-terminal-local-map (FIND-IN overriding-terminal-local-map)) (overriding-local-map (FIND-IN overriding-local-map)) (t (or (FIND-IN (KEYMAP-PROPERTY-AT-POINT)) (FIND-IN-ANY EMULATION-MODE-MAP-ALISTS) (FIND-IN-ANY minor-mode-overriding-map-alist) (FIND-IN-ANY minor-mode-map-alist) (FIND-IN (LOCAL-MAP-PROPERTY-AT-POINT)) (FIND-IN (current-local-map))))) (FIND-IN (current-global-map)))