Nick Roberts <[EMAIL PROTECTED]> 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.
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug