comparison lisp/packages/avoid.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 9ee227acff29
children 1ce6082ce73f
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
70 70
71 ;;; Code: 71 ;;; Code:
72 72
73 (provide 'avoid) 73 (provide 'avoid)
74 74
75 ;;;###autoload
76 (defvar mouse-avoidance-mode nil 75 (defvar mouse-avoidance-mode nil
77 "Value is t or a symbol if the mouse pointer should avoid the cursor. 76 "Value is t or a symbol if the mouse pointer should avoid the cursor.
78 See function `mouse-avoidance-mode' for possible values. Changing this 77 See function `mouse-avoidance-mode' for possible values. Changing this
79 variable is NOT the recommended way to change modes; use that function 78 variable is NOT the recommended way to change modes; use that function
80 instead.") 79 instead.")
118 (setq row (count-lines beg pos)) 117 (setq row (count-lines beg pos))
119 (cons (selected-window) (cons col row)))) 118 (cons (selected-window) (cons col row))))
120 119
121 ;(defun mouse-avoidance-point-position-test () 120 ;(defun mouse-avoidance-point-position-test ()
122 ; (interactive) 121 ; (interactive)
123 ; (message (format "point=%s mouse=%s" 122 ; (message "point=%s mouse=%s"
124 ; (cdr (mouse-avoidance-point-position)) 123 ; (cdr (mouse-avoidance-point-position))
125 ; (cdr (mouse-position))))) 124 ; (cdr (mouse-position))))
126 125
127 (defun mouse-avoidance-set-mouse-position (pos) 126 (defun mouse-avoidance-set-mouse-position (pos)
128 ;; Carefully set mouse position to given position (X . Y) 127 ;; Carefully set mouse position to given position (X . Y)
129 ;; Ideally, should check if X,Y is in the current frame, and if not, 128 ;; Ideally, should check if X,Y is in the current frame, and if not,
130 ;; leave the mouse where it was. However, this is currently 129 ;; leave the mouse where it was. However, this is currently
365 ; minor-mode-alist))) 364 ; minor-mode-alist)))
366 ;;XEmacs: do it right. 365 ;;XEmacs: do it right.
367 ;;;###autoload 366 ;;;###autoload
368 (add-minor-mode 'mouse-avoidance-mode " Avoid") 367 (add-minor-mode 'mouse-avoidance-mode " Avoid")
369 368
370 ;;; avoid.el ends here 369 ;;; End of avoid.el