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 23:39:31 +0200 Message-ID: <854q0eitpo.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> <858xpqkgvy.fsf@lola.goethe.zz> <87irou4t8q.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 1146174010 13803 80.91.229.2 (27 Apr 2006 21:40:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Apr 2006 21:40:10 +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 23:40:07 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 1FZEDR-0006IR-Pg for ged-emacs-devel@m.gmane.org; Thu, 27 Apr 2006 23:40:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZEDQ-0004UE-Av for ged-emacs-devel@m.gmane.org; Thu, 27 Apr 2006 17:40:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FZEDD-0004SO-Rl for emacs-devel@gnu.org; Thu, 27 Apr 2006 17:39:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FZEDD-0004S9-ET for emacs-devel@gnu.org; Thu, 27 Apr 2006 17:39:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZEDD-0004S6-90 for emacs-devel@gnu.org; Thu, 27 Apr 2006 17:39:47 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FZEGD-0008Lk-1O for emacs-devel@gnu.org; Thu, 27 Apr 2006 17:42:53 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1FZEDC-00079y-Fa; Thu, 27 Apr 2006 17:39:46 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 6110A1D1FFCC; Thu, 27 Apr 2006 23:39:31 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: <87irou4t8q.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 27 Apr 2006 17:24:30 -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:53520 Archived-At: Stefan Monnier writes: >>> 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. > > XEmacs does it, AFAIK, and I don't find it particularly obscure. Well, XEmacs has opaque keymaps and/or events, I believe. For Emacs, both keymaps as well as events can be cons cells, so I am not sure eventp and keymapp will always be able to tell them apart. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum