# HG changeset patch # User Richard M. Stallman # Date 1022690286 0 # Node ID 04484b8dacdc7c21d47d3a564c0653ef783c90f6 # Parent 1739a350f81ce01854db28b67bfe0c54a1ecc8b4 (tooltip-mouse-motions-active): New variable. (tooltip-activate-mouse-motions): Don't kill track-mouse local if it was not made by us. diff -r 1739a350f81c -r 04484b8dacdc lisp/tooltip.el --- a/lisp/tooltip.el Wed May 29 16:36:55 2002 +0000 +++ b/lisp/tooltip.el Wed May 29 16:38:06 2002 +0000 @@ -299,16 +299,21 @@ (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'."