diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-05-29 16:38:06 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-05-29 16:38:06 +0000 |
commit | ba81b532e537cde5920d217fc4211d765886583d (patch) | |
tree | 82cd75c4418a1532212b413c017907d896fdd0da /lisp/tooltip.el | |
parent | 8eb1dc02a11982d9d7fdc85fc2cc1f1a30586692 (diff) | |
download | emacs-ba81b532e537cde5920d217fc4211d765886583d.tar.gz |
(tooltip-mouse-motions-active): New variable.
(tooltip-activate-mouse-motions): Don't kill track-mouse local
if it was not made by us.
Diffstat (limited to 'lisp/tooltip.el')
-rw-r--r-- | lisp/tooltip.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 7bdc5320626..79504156b64 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el @@ -299,16 +299,21 @@ With ARG, turn tooltip mode on if and only if ARG is positive." (tooltip-activate-mouse-motions nil)) (setq buffers (cdr buffers)))))) +(defvar tooltip-mouse-motions-active nil + "Locally t in a buffer if tooltip processing of mouse motion is enabled.") (defun tooltip-activate-mouse-motions (activatep) "Activate/deactivate mouse motion events for the current buffer. ACTIVATEP non-nil means activate mouse motion events." (if activatep (progn + (make-local-variable 'tooltip-mouse-motions-active) + (setq tooltip-mouse-motions-active t) (make-local-variable 'track-mouse) (setq track-mouse t)) - (kill-local-variable 'track-mouse))) - + (when tooltip-mouse-motions-active + (kill-local-variable 'tooltip-mouse-motions-active) + (kill-local-variable 'track-mouse)))) (defun tooltip-mouse-motion (event) "Command handler for mouse movement events in `global-map'." |