aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-07-24 11:05:40 +0000
committerEli Zaretskii2001-07-24 11:05:40 +0000
commita9f7310463adf8c9ef4ae402fc17bfcae5fd5c5f (patch)
tree7886e9488b1c8f982d05dfbeaf8fdeb6769f8c7e
parentf018895322f32670a2277198dc008c7cb48e2f95 (diff)
downloademacs-a9f7310463adf8c9ef4ae402fc17bfcae5fd5c5f.tar.gz
emacs-a9f7310463adf8c9ef4ae402fc17bfcae5fd5c5f.zip
(mouse-avoidance-too-close-p): If the frame lacks a
tool-bar-lines parameter, behave as if its value were zero. (mouse-avoidance-set-pointer-shape): Don't do anything if x-pointer-shape is not boundp.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/avoid.el10
2 files changed, 14 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d27973d115a..b6c7f227671 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12001-07-24 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * avoid.el (mouse-avoidance-too-close-p): If the frame lacks a
4 tool-bar-lines parameter, behave as if its value were zero.
5 (mouse-avoidance-set-pointer-shape): Don't do anything if
6 x-pointer-shape is not boundp.
7
12001-07-23 Francesco Potorti` <pot@gnu.org> 82001-07-23 Francesco Potorti` <pot@gnu.org>
2 9
3 * uniquify.el: Overall speedup changes when using many buffers. 10 * uniquify.el: Overall speedup changes when using many buffers.
diff --git a/lisp/avoid.el b/lisp/avoid.el
index 2aa2b28f1c3..4bc59de14a7 100644
--- a/lisp/avoid.el
+++ b/lisp/avoid.el
@@ -131,8 +131,9 @@ Only applies in mouse-avoidance-modes `animate' and `jump'."
131 131
132(defsubst mouse-avoidance-set-pointer-shape (shape) 132(defsubst mouse-avoidance-set-pointer-shape (shape)
133 "Set the shape of the mouse pointer to SHAPE." 133 "Set the shape of the mouse pointer to SHAPE."
134 (setq x-pointer-shape shape) 134 (when (boundp 'x-pointer-shape)
135 (set-mouse-color nil)) 135 (setq x-pointer-shape shape)
136 (set-mouse-color nil)))
136 137
137(defun mouse-avoidance-point-position () 138(defun mouse-avoidance-point-position ()
138 "Return the position of point as (FRAME X . Y). 139 "Return the position of point as (FRAME X . Y).
@@ -179,6 +180,8 @@ Acceptable distance is defined by `mouse-avoidance-threshold'."
179 (let* ((frame (car mouse)) 180 (let* ((frame (car mouse))
180 (mouse-y (cdr (cdr mouse))) 181 (mouse-y (cdr (cdr mouse)))
181 (tool-bar-lines (frame-parameter nil 'tool-bar-lines))) 182 (tool-bar-lines (frame-parameter nil 'tool-bar-lines)))
183 (or tool-bar-lines
184 (setq tool-bar-lines 0))
182 (if (and mouse-y (< mouse-y tool-bar-lines)) 185 (if (and mouse-y (< mouse-y tool-bar-lines))
183 nil 186 nil
184 (let ((point (mouse-avoidance-point-position)) 187 (let ((point (mouse-avoidance-point-position))
@@ -386,7 +389,8 @@ definition of \"random distance\".)"
386 (run-with-idle-timer 0.1 t 'mouse-avoidance-fancy-hook)) 389 (run-with-idle-timer 0.1 t 'mouse-avoidance-fancy-hook))
387 (setq mouse-avoidance-mode mode 390 (setq mouse-avoidance-mode mode
388 mouse-avoidance-state (cons 0 0) 391 mouse-avoidance-state (cons 0 0)
389 mouse-avoidance-old-pointer-shape x-pointer-shape)) 392 mouse-avoidance-old-pointer-shape
393 (and (boundp 'x-pointer-shape) x-pointer-shape)))
390 ((eq mode 'exile) 394 ((eq mode 'exile)
391 (setq mouse-avoidance-timer 395 (setq mouse-avoidance-timer
392 (run-with-idle-timer 0.1 t 'mouse-avoidance-exile-hook)) 396 (run-with-idle-timer 0.1 t 'mouse-avoidance-exile-hook))