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: [lennart.borgman@gmail.com: C-h k does not catch text properies keymaps] Date: Mon, 05 Mar 2007 22:21:48 +0100 Message-ID: <85r6s3jsib.fsf@lola.goethe.zz> References: <87r6s3zp63.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173129740 9570 80.91.229.12 (5 Mar 2007 21:22:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Mar 2007 21:22:20 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 05 22:22:08 2007 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 1HOKdE-0007Xd-4c for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 22:22:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOKdD-0003zS-JK for ged-emacs-devel@m.gmane.org; Mon, 05 Mar 2007 16:22:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HOKd1-0003zD-AN for emacs-devel@gnu.org; Mon, 05 Mar 2007 16:21:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HOKcy-0003z0-TM for emacs-devel@gnu.org; Mon, 05 Mar 2007 16:21:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HOKcy-0003yx-OY for emacs-devel@gnu.org; Mon, 05 Mar 2007 16:21:52 -0500 Original-Received: from mail-in-10.arcor-online.net ([151.189.21.50]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HOKcx-00019g-DG; Mon, 05 Mar 2007 16:21:51 -0500 Original-Received: from mail-in-01-z2.arcor-online.net (mail-in-05-z2.arcor-online.net [151.189.8.17]) by mail-in-10.arcor-online.net (Postfix) with ESMTP id BB8267CB55; Mon, 5 Mar 2007 22:21:49 +0100 (CET) Original-Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id AF0C22DAB53; Mon, 5 Mar 2007 22:21:49 +0100 (CET) Original-Received: from lola.goethe.zz (dslb-084-061-068-107.pools.arcor-ip.net [84.61.68.107]) by mail-in-10.arcor-online.net (Postfix) with ESMTP id 8C32BBC5E1; Mon, 5 Mar 2007 22:21:49 +0100 (CET) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id AD8211C460D3; Mon, 5 Mar 2007 22:21:48 +0100 (CET) In-Reply-To: <87r6s3zp63.fsf@stupidchicken.com> (Chong Yidong's message of "Mon\, 05 Mar 2007 10\:27\:16 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-detected-kernel: 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:67373 Archived-At: Chong Yidong writes: > Richard Stallman writes: > >> Would someone please debug this and ack? > > Didn't David Kastrup rewrite the key-binding code a few months ago, to > handle this case? The "problem" is more with `describe-key'. However: >> (defun temp-test-mouse-ctrl-h-k() >> (interactive) >> (switch-to-buffer-other-window (get-buffer-create "test mouse buffer")) >> (goto-char (point-max)) >> (let ((map (make-sparse-keymap)) >> (txt "click here")) >> (define-key map [mouse-1] '(lambda() >> "This is the lambda for mouse-1" >> (interactive) >> (message "lambda for mouse-1 here"))) >> (define-key map [f2] '(lambda() >> "This is the lambda for f2" >> (interactive) >> (message "lambda for f2 here"))) >> (put-text-property 0 (length txt) 'face '(:underline t :foreground >> "red") txt) >> (put-text-property 0 (length txt) 'mouse-face 'highlight txt) >> (put-text-property 0 (length txt) 'keymap map txt) >> (insert "\n" txt) >> )) >> >> Do >> >> M-x temp-test-mouse-ctrl-h-k >> C-h k >> >> and then click the red underlined text with mouse button 1. It will say >> >> at that spot runs the command mouse-drag-region >> >> which is not correct. Actually, it _is_ correct. Do M-x debug-on-entry RET mouse-drag-region RET and you'll find that clicking at that spot indeed first runs mouse-drag-region. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum