From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: mouse click on an overlay, using overlay `keymap' property Date: Tue, 18 Mar 2008 08:08:01 -0700 Message-ID: <002e01c88909$dcc5a330$0600a8c0@us.oracle.com> References: <001701c887bc$693c2590$0600a8c0@us.oracle.com> <47DF8B2D.4080002@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205852939 1889 80.91.229.12 (18 Mar 2008 15:08:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2008 15:08:59 +0000 (UTC) Cc: 'emacs- devel' To: "'martin rudalics'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 18 16:09:25 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JbdR8-0000Qe-QG for ged-emacs-devel@m.gmane.org; Tue, 18 Mar 2008 16:09:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbdQY-0006TP-Mm for ged-emacs-devel@m.gmane.org; Tue, 18 Mar 2008 11:08:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JbdQT-0006TK-VW for emacs-devel@gnu.org; Tue, 18 Mar 2008 11:08:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JbdQQ-0006T4-Ez for emacs-devel@gnu.org; Tue, 18 Mar 2008 11:08:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbdQQ-0006T0-63 for emacs-devel@gnu.org; Tue, 18 Mar 2008 11:08:26 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JbdQQ-0005VD-0V for emacs-devel@gnu.org; Tue, 18 Mar 2008 11:08:26 -0400 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m2IF8KJN018673; Tue, 18 Mar 2008 09:08:20 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m2I8kpY5018366; Tue, 18 Mar 2008 09:08:19 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3616986931205852882; Tue, 18 Mar 2008 08:08:02 -0700 Original-Received: from dradamslap1 (/141.144.65.37) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 18 Mar 2008 08:08:02 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <47DF8B2D.4080002@gmx.at> Thread-Index: AciI2tUgalWtHXDWQqqEr4X7oA8uiwALpxmA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:92890 Archived-At: > > how can foo be defined so that a first click on > > the displayed "xxxxxxxxx" calls bar? > > How 'bout > (defun foo (beg end) > (interactive "r") > (let ((overlay (make-overlay beg end))) > (overlay-put > overlay 'display > (propertize "xxxxxxxxx" 'face 'font-lock-constant-face > 'keymap foo-map)))) I was hoping that that would do the trick and help me understand, but it doesn't seem to change anything. (Does it work for you?) I'm using Emacs 22.1, FWIW. Is this a bug? Can someone please explain what's happening? Thx.