[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in tooltip handling
From: |
Tassilo Horn |
Subject: |
Re: Bug in tooltip handling |
Date: |
Wed, 05 Jul 2006 12:04:14 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Nick Roberts <address@hidden> writes:
> The example that you gave at the start didn't toggle anything: it just
> added a function to tooltip-hook.
Right, sorry. It would have been better to poste the complete minor mode
function.
--8<---------------cut here---------------start------------->8---
(defun rdictcc-tooltip-mode (&optional arg)
"Display tooltips with the translations of the word under the
mouse pointer."
(interactive "P")
(require 'tooltip)
(require 'gud) ;; The tooltips are currently part of GUD
(let ((val (if arg
(> (prefix-numeric-value arg) 0)
(not rdictcc-tooltip-mode))))
(if val
;; Switch tooltip mode on
(progn
(make-local-variable 'rdictcc-tooltip-mode)
(setq rdictcc-tooltip-mode val)
(make-local-variable 'tooltip-delay)
(setq tooltip-delay rdictcc-tooltip-delay)
(gud-tooltip-mode 1)
(add-hook 'tooltip-hook
'rdictcc-translate-word-open-tooltip t t)
(make-local-variable 'track-mouse)
(setq track-mouse val))
;; Switch tooltip mode off
(kill-local-variable 'rdictcc-tooltip-mode)
(kill-local-variable 'tooltip-delay)
(kill-local-variable 'track-mouse)
(remove-hook 'tooltip-hook
'rdictcc-translate-word-open-tooltip t))))
--8<---------------cut here---------------end--------------->8---
> Anyway, I'll look at splitting out the functionality after the
> release.
Thanks a lot.
> The pretest is meant to be imminent, but the last one for Emacs 21
> took about a year, so I wouldn't hold your breath.
No problem. I'll be patient.
Bye,
Tassilo
--
My opinions may have changed, but not the fact that I am right.
- Re: Bug in tooltip handling, Nick Roberts, 2006/07/02
- Re: Bug in tooltip handling, Leon, 2006/07/02
- Re: Bug in tooltip handling, Tassilo Horn, 2006/07/03
- Re: Bug in tooltip handling, Nick Roberts, 2006/07/03
- Re: Bug in tooltip handling, Tassilo Horn, 2006/07/04
- Re: Bug in tooltip handling, Nick Roberts, 2006/07/04
- Re: Bug in tooltip handling, Tassilo Horn, 2006/07/04
- Re: Bug in tooltip handling, Nick Roberts, 2006/07/04
- Re: Bug in tooltip handling, Tassilo Horn, 2006/07/05
- Re: Bug in tooltip handling, Nick Roberts, 2006/07/05
- Re: Bug in tooltip handling,
Tassilo Horn <=