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: Wed, 13 Sep 2006 21:49:58 +0200 Message-ID: <8564frh7h5.fsf@lola.goethe.zz> References: <87slj1hybl.fsf@stupidchicken.com> <85pse5cbqw.fsf@lola.goethe.zz> <87zmd7yjq4.fsf@furball.mit.edu> <85pse3n99c.fsf@lola.goethe.zz> <87r6yjxh7k.fsf@furball.mit.edu> <85venuc27c.fsf@lola.goethe.zz> <85r6yiivi7.fsf@lola.goethe.zz> <85hczdbdv2.fsf@lola.goethe.zz> <85mz959kkw.fsf@lola.goethe.zz> <85irjs4tda.fsf@lola.goethe.zz> <85ejug4pl4.fsf@lola.goethe.zz> <85k648kwy7.fsf@lola.goethe.zz> <85irjsj8s7.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158177049 30730 80.91.229.2 (13 Sep 2006 19:50:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Sep 2006 19:50:49 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 13 21:50:48 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 1GNakV-0008Fw-8q for ged-emacs-devel@m.gmane.org; Wed, 13 Sep 2006 21:50:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNakU-0006QQ-SL for ged-emacs-devel@m.gmane.org; Wed, 13 Sep 2006 15:50:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNakK-0006QL-IT for emacs-devel@gnu.org; Wed, 13 Sep 2006 15:50:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNakK-0006Q6-4H for emacs-devel@gnu.org; Wed, 13 Sep 2006 15:50:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNakJ-0006Pn-So for emacs-devel@gnu.org; Wed, 13 Sep 2006 15:50:07 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GNam6-0002yt-I0 for emacs-devel@gnu.org; Wed, 13 Sep 2006 15:51:58 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1GNakB-0000qM-JS; Wed, 13 Sep 2006 15:49:59 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 2763B1C40B5C; Wed, 13 Sep 2006 21:49:59 +0200 (CEST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Wed\, 13 Sep 2006 15\:25\:06 -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:59801 Archived-At: Richard Stallman writes: > There is one concern that I have: the type of the "location" > argument. This currently is a key sequence. But it might make > more sense to turn this into the "location" data structure that > `event-start' and/or `event-end' return. This would make it > much easier to feed lookup-key with data produced from, say, > `posn-at-x-y'. > > That seems like a good idea. (We call that a "position".) Yes, I already noticed and changed this accordingly. It actually shrinked the size of the code. > In order to get this data easier, it might make sense to define a > convenience function. > > (defun key-event (key) > "Return event from moused-base key sequence KEY." > (and (vectorp key) > (if (consp (aref key 0)) > (aref key 0) > (and > (symbolp (aref key 0)) > (> (length key) 1) > (consp (aref key 1)) > (aref key 1))))) > > I have nothing against it, but do we really need it? > Is there a place that needs to call this, outside of the code > of Fkey_binding itself? There will be several places in help.el and possibly mouse.el which will need to do this operation after I finished adapting them to do the right thing in all cases. This can be decided when I am preparing the patches for those files. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum