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: Mon, 11 Sep 2006 11:48:48 +0200 Message-ID: <85r6yiivi7.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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1157968167 4089 80.91.229.2 (11 Sep 2006 09:49:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Sep 2006 09:49:27 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 11 11:49:25 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 1GMiPf-00040W-UA for ged-emacs-devel@m.gmane.org; Mon, 11 Sep 2006 11:49:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMiPe-0006sL-Iw for ged-emacs-devel@m.gmane.org; Mon, 11 Sep 2006 05:49:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GMiPR-0006ru-0b for emacs-devel@gnu.org; Mon, 11 Sep 2006 05:48:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GMiPP-0006ri-UO for emacs-devel@gnu.org; Mon, 11 Sep 2006 05:48:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GMiPP-0006rf-R7 for emacs-devel@gnu.org; Mon, 11 Sep 2006 05:48:55 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GMiQe-0000en-S7 for emacs-devel@gnu.org; Mon, 11 Sep 2006 05:50:12 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1GMiPO-0003zl-DZ; Mon, 11 Sep 2006 05:48:54 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 38BD21C40B5C; Mon, 11 Sep 2006 11:48:49 +0200 (CEST) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Mon\, 11 Sep 2006 10\:52\:33 +0200") 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:59667 Archived-At: storm@cua.dk (Kim F. Storm) writes: > David Kastrup writes: > >> Well, it does not seem just as easy as that. I now can't start >> RefTeX anymore without getting the error: >> >> Debugger entered--Lisp error: (wrong-type-argument sequencep mouse-2) >> key-binding([(shift mouse-2)]) > > Should be fixed now. Hm, looks like it works now. I have removed string-key-binding from help.el (it is no longer necessary) and the results appear fine to me. Since we want to get good testing for the key-binding stuff, I'll check this change to help.el in. I am still not convinced that the overriding keymap thingies are properly dealt with, but I'll have to come up with a test case involving them before complaining. key-binding in its new incantation should also be used in mouse.el to get the bindings for `follow-link' and similar. I had posted an API proposal for `key-binding' previously, but it suffered from not realizing the difference between events, and keysequences made from events (`key-binding' can't be used to look up events, and I am less than certain that it should). So we probably should either a) add an additional optional parameter BASE-KEY which, when non-NIL, will replace KEY for all purposes of lookup except determining the keymaps to use when KEY is a key-sequence based on an event. b) have a function `event-replace-key' or something with a better name which will take a key sequence based on an event and swap out the basic event (but maybe _not_ its modifiers since they can play a part in which keymap to use) and swap out the `down-mouse-2' or similar with `follow-link'. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum