emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in tooltip handling


From: Nick Roberts
Subject: Re: Bug in tooltip handling
Date: Sun, 2 Jul 2006 16:12:26 +1200 (NZST)

 > I'm not quite sure if this is a bug or a intended change in tooltip
 > handling, but here I go.
 > 
 > Supporting own tooltips in Emacs 21 was basically a matter of:
 > 
 > ,----
 > | (defun my-tooltip-mode (&optional arg)
 > |     ;; [snip]
 > |     (tooltip-mode 1)
 > |     (add-hook 'tooltip-hook 'my-tooltip-function)
 > |     (make-local-variable 'track-mouse)
 > |     (setq track-mouse on))
                           ^^^  t?

I don't think this is the right way to use track-mouse anyway
.
 > | (defun my-tooltip-function (event)
 > |     (interactive "e")
 > |     ;; process event...
 > |     (tooltip-show "Huzzah!"))
 > `----

This didn't seem to work very well on Emacs 21 when I tried it.  Also there's
no mechanism to remove my-tooltip-function from tooltip-hook.

You can get it to work as before by using:

  (defun my-tooltip-mode (&optional arg)
       ;; [snip]
       (gud-tooltip-mode 1)
        ^^^

 > This convenient approach (used for example by dictionary-el) doesn't
 > work anymore in Emacs 22. 

dictionary-el isn't part of Emacs 22.  I have split GUD tooltips (which use
track-mouse from ordinary ones (which don't).  This means that they can
be toggled independently.  At some stage, if other packages want to use
tooltips in the way GUD does, that part could be split out of gud.el.
It would need to be documented so that they could be used in a way that
doesn't interfere with existing use, as your example does.

 >                             If I set `track-mouse' to a non-nil value,
 > even the standard tooltips which worked before (e.g. the modeline help
 > tooltips) don't work anymore.

track-mouse is a variable, not a user uption for tooltips.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]