From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Getting the click position in a string Date: Thu, 27 Apr 2006 12:05:08 -0400 Message-ID: <87r73j6mav.fsf-monnier+emacs@gnu.org> References: <85fyk2ugle.fsf@lola.goethe.zz> <85fyk0rbrk.fsf@lola.goethe.zz> <853bg0r1ms.fsf@lola.goethe.zz> <85y7xspkgk.fsf@lola.goethe.zz> <87ejzk8mmv.fsf-monnier+emacs@gnu.org> <85r73jkyqf.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 1146154058 31613 80.91.229.2 (27 Apr 2006 16:07:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Apr 2006 16:07:38 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 27 18:07:35 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 1FZ91h-0001N8-9u for ged-emacs-devel@m.gmane.org; Thu, 27 Apr 2006 18:07:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZ91g-00088C-Oj for ged-emacs-devel@m.gmane.org; Thu, 27 Apr 2006 12:07:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FZ8zX-0007DV-RQ for emacs-devel@gnu.org; Thu, 27 Apr 2006 12:05:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FZ8zW-0007Bt-I1 for emacs-devel@gnu.org; Thu, 27 Apr 2006 12:05:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZ8zW-0007Bn-E8 for emacs-devel@gnu.org; Thu, 27 Apr 2006 12:05:18 -0400 Original-Received: from [209.226.175.184] (helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FZ92J-00036J-Vc; Thu, 27 Apr 2006 12:08:12 -0400 Original-Received: from alfajor ([70.55.144.118]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060427160508.CAHX10262.tomts22-srv.bellnexxia.net@alfajor>; Thu, 27 Apr 2006 12:05:08 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 2A75DD91CF; Thu, 27 Apr 2006 12:05:08 -0400 (EDT) Original-To: David Kastrup In-Reply-To: <85r73jkyqf.fsf@lola.goethe.zz> (David Kastrup's message of "Thu, 27 Apr 2006 14:08:08 +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:53505 Archived-At: > Factoring the keymap and partial keymaps out into a separate function > would probably not be trivial. But even if code reuse might not be > practical, I think that something like posn-key-binding should be > implemented in keyboard.c so that there is some guarantee it will > deliver the same results. I think it only makes sense to write it in the C code if the resulting code can be shared with Fread_key_sequence. Until such a reorg is done, it'd be good to provide the function in subr.el along the other posn-* functions. But in order not to make it appear like an "accessor function", maybe it'd be better to name it differently, e.g. "posn-lookup-key-binding". Of course, another way to do it is to change `key-binding' so that it accepts a `posn' argument (and/or an event argument). Stefan