From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: local keymap patch for key-binding Date: Sat, 09 Sep 2006 17:15:19 +0200 Message-ID: <85pse5cbqw.fsf@lola.goethe.zz> References: <87slj1hybl.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1157814943 23020 80.91.229.2 (9 Sep 2006 15:15:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Sep 2006 15:15:43 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 09 17:15:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GM4YT-00013d-Mq for ged-emacs-devel@m.gmane.org; Sat, 09 Sep 2006 17:15:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GM4YT-00016J-4j for ged-emacs-devel@m.gmane.org; Sat, 09 Sep 2006 11:15:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GM4YD-000117-Tg for emacs-devel@gnu.org; Sat, 09 Sep 2006 11:15:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GM4YD-00010O-G8 for emacs-devel@gnu.org; Sat, 09 Sep 2006 11:15:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GM4YD-00010B-DL for emacs-devel@gnu.org; Sat, 09 Sep 2006 11:15:21 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GM4Z3-0003JM-Sg for emacs-devel@gnu.org; Sat, 09 Sep 2006 11:16:13 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1GM4YC-00072s-Ua; Sat, 09 Sep 2006 11:15:21 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 88F1D1C40B5C; Sat, 9 Sep 2006 17:15:19 +0200 (CEST) Original-To: Chong Yidong In-Reply-To: <87slj1hybl.fsf@stupidchicken.com> (Chong Yidong's message of "Sat\, 09 Sep 2006 11\:08\:46 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:59595 Archived-At: Chong Yidong writes: > I have written a patch to address the following item in FOR-RELEASE: > > ** Make key-binding use the maps specified by positions given in > the events. > > If a vector is passed to key-binding, and the first element of the > vector looks like a valid click event, and the position specified by > that click event contains a `keymap' property, then we look in that > keymap first. > > Any objections to checking this in? It does too little. Check out what read-key-sequence (defined in keyboard.c) does with regard to mouse events (EVENT_HAS_PARAMETERS). The problem is that read-key-sequence does such a load of other stuff that it is hard to extract the material and transfer it to key-binding. The problem is that keymaps may be provided by text properties and overlays, and by keymap properties on strings that display as the display or before-string or after-string properties of text properties or overlays. So one really wants to steal the logic from read-key-sequence without stealing most of the complications... Basically (lookup-binding (read-key-sequence)) should arrive at the same conclusion as that which read-key-sequence stores in the read_key_sequence_cmd variable as a side effect. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum