From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hunter Newsgroups: gmane.emacs.bugs Subject: Re: Info tooltip for *Menu items Date: Wed, 16 Mar 2005 01:42:53 -0500 Message-ID: <4237D56D.1020407@comcast.net> References: <001f01c52984$24a12690$0200a8c0@sedrcw11488> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1110956588 26410 80.91.229.2 (16 Mar 2005 07:03:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Mar 2005 07:03:08 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 16 08:03:07 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DBSYV-0007Lp-RR for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Mar 2005 08:03:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBSoY-0003na-3Y for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Mar 2005 02:19:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DBSnW-0003Kf-Tl for bug-gnu-emacs@gnu.org; Wed, 16 Mar 2005 02:18:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DBSnH-0003Hq-L7 for bug-gnu-emacs@gnu.org; Wed, 16 Mar 2005 02:18:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DBSnG-0003Dc-KC for bug-gnu-emacs@gnu.org; Wed, 16 Mar 2005 02:18:14 -0500 Original-Received: from [204.127.202.64] (helo=sccrmhc13.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DBSFH-0001Z6-En for bug-gnu-emacs@gnu.org; Wed, 16 Mar 2005 01:43:07 -0500 Original-Received: from [192.168.42.3] (pcp08774087pcs.mtlrel01.nj.comcast.net[68.36.32.221]) by comcast.net (sccrmhc13) with ESMTP id <2005031606430301600heo08e>; Wed, 16 Mar 2005 06:43:03 +0000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en Original-To: Lennart Borgman In-Reply-To: <001f01c52984$24a12690$0200a8c0@sedrcw11488> X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geb-bug-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.bugs:10928 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:10928 Lennart Borgman wrote: > The tooltip I get for *Menu items in Info is only "mouse-1: go to ". Did I > break something or do you see the same as I see? I see the same in (emacs)Top, for menu entries with empty node names (* Distrib::). Menu entries with non-empty node names (* Files: Basic Files) show useful tooltips ("mouse-1: go to Basic Files"). I tracked this behavior down to lisp/info.el Info-fontify-node: ;; Fontify menu items ... 'help-echo (if (match-end 3) (concat "mouse-2: go to " (match-string 3)) "mouse-2: go to this node") When the menu entry has an empty node name, the node name match (match-string 3) is "", not nil. This is submatch 1 of Info-following-node-name-re and is guaranteed to be non-nil. To fix this, the if should test match-string, not match-end. The correct test is found 10 lines down in (let ((node (if...)))). My suggested patch follows. -Dave *** info.el 16 Mar 2005 00:34:14 -0500 1.420 --- info.el 16 Mar 2005 00:34:59 -0500 *************** *** 3793,3801 **** (add-text-properties (match-beginning 1) (match-end 1) (list ! 'help-echo (if (match-end 3) ! (concat "mouse-2: go to " (match-string 3)) ! "mouse-2: go to this node") 'mouse-face 'highlight))) (when (or not-fontified-p fontify-visited-p) (add-text-properties --- 3793,3801 ---- (add-text-properties (match-beginning 1) (match-end 1) (list ! 'help-echo (if (equal (match-string 3) "") ! "mouse-2: go to this node" ! (concat "mouse-2: go to " (match-string 3))) 'mouse-face 'highlight))) (when (or not-fontified-p fontify-visited-p) (add-text-properties