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: Getting the click position in a string Date: Thu, 27 Apr 2006 20:33:37 +0200 Message-ID: <858xpqkgvy.fsf@lola.goethe.zz> 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> <87r73j6mav.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1146162866 1675 80.91.229.2 (27 Apr 2006 18:34:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Apr 2006 18:34:26 +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 20:34:24 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 1FZBJW-00071F-Hs for ged-emacs-devel@m.gmane.org; Thu, 27 Apr 2006 20:34:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZBJW-0001ka-1b for ged-emacs-devel@m.gmane.org; Thu, 27 Apr 2006 14:34:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FZBJL-0001kN-J3 for emacs-devel@gnu.org; Thu, 27 Apr 2006 14:33:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FZBJL-0001jt-5o for emacs-devel@gnu.org; Thu, 27 Apr 2006 14:33:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZBJK-0001jV-Vq for emacs-devel@gnu.org; Thu, 27 Apr 2006 14:33:55 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FZBMI-0003RB-VP for emacs-devel@gnu.org; Thu, 27 Apr 2006 14:36:59 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FZBJJ-00048k-2E; Thu, 27 Apr 2006 14:33:53 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 743541D1FFCC; Thu, 27 Apr 2006 20:33:37 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: <87r73j6mav.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 27 Apr 2006 12:05:08 -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:53507 Archived-At: Stefan Monnier writes: >> 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). If it accepted an event instead of a keymap, that would be reasonably convenient. There is a certain danger that this extension would be obscure: people might not know where to look for it in general. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum