[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange behaviour of track-mouse and make-local-variable
From: |
Richard Stallman |
Subject: |
Re: Strange behaviour of track-mouse and make-local-variable |
Date: |
Mon, 27 May 2002 16:56:56 -0600 (MDT) |
Does this change fix it?
*** tooltip.el.~1.23.~ Sun May 12 12:43:49 2002
--- tooltip.el Mon May 27 16:11:40 2002
***************
*** 299,314 ****
(tooltip-activate-mouse-motions nil))
(setq buffers (cdr buffers))))))
(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 'track-mouse)
(setq track-mouse t))
! (kill-local-variable 'track-mouse)))
!
(defun tooltip-mouse-motion (event)
"Command handler for mouse movement events in `global-map'."
--- 299,319 ----
(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))
! (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'."