all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Info tooltip for *Menu items
@ 2005-03-15 17:26 Lennart Borgman
  2005-03-16  6:42 ` David Hunter
  2005-03-16  7:45 ` Juri Linkov
  0 siblings, 2 replies; 4+ messages in thread
From: Lennart Borgman @ 2005-03-15 17:26 UTC (permalink / raw)


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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Info tooltip for *Menu items
  2005-03-15 17:26 Info tooltip for *Menu items Lennart Borgman
@ 2005-03-16  6:42 ` David Hunter
  2005-03-18 15:46   ` Juri Linkov
  2005-03-16  7:45 ` Juri Linkov
  1 sibling, 1 reply; 4+ messages in thread
From: David Hunter @ 2005-03-16  6:42 UTC (permalink / raw)
  Cc: bug-gnu-emacs

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Info tooltip for *Menu items
  2005-03-15 17:26 Info tooltip for *Menu items Lennart Borgman
  2005-03-16  6:42 ` David Hunter
@ 2005-03-16  7:45 ` Juri Linkov
  1 sibling, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2005-03-16  7:45 UTC (permalink / raw)
  Cc: emacs-devel

"Lennart Borgman" <lennart.borgman.073@student.lu.se> writes:
> 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?

Thanks for the report.  This is fixed now to work as intended.

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Info tooltip for *Menu items
  2005-03-16  6:42 ` David Hunter
@ 2005-03-18 15:46   ` Juri Linkov
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2005-03-18 15:46 UTC (permalink / raw)
  Cc: lennart.borgman.073, bug-gnu-emacs

David Hunter <hunterd42@comcast.net> writes:
> 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...)))).

Thanks for the patch.  Due to provider's mail server problems
I just now started to receive Wednesday's messages.  Since
I was not able to see your patch until now, I already fixed this bug,
but slightly differently: I retained the condition for testing
for match-end for the case if for some reasons (match-end 3) is nil,
so code will not display "mouse-2: go to " in this case.

Could you debug and find fixes for other unfixed Emacs bugs?

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-18 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-15 17:26 Info tooltip for *Menu items Lennart Borgman
2005-03-16  6:42 ` David Hunter
2005-03-18 15:46   ` Juri Linkov
2005-03-16  7:45 ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.