;ELC   
;;; Compiled by rms@psilocin.gnu.org on Sun Apr 19 23:54:21 1998
;;; from file /gd/gnu/emacs/lisp/avoid.el
;;; in Emacs version 20.2.91.4
;;; with bytecomp version 2.40
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`avoid.el' was compiled for Emacs 19.29 or later"))


(byte-code "\302\303!\210\304\303\305\306\307	\310&\207" [:prefix :group provide avoid custom-declare-group nil "Make mouse pointer stay out of the way of editing." "mouse-avoidance-" mouse] 8)
#@161 Activate mouse avoidance mode.  
See function `mouse-avoidance-mode' for possible values.
You must modify via \[customize] for this variable to have an effect.
(custom-declare-variable 'mouse-avoidance-mode 'nil '(#$ . 722) :set (lambda (symbol value) (mouse-avoidance-mode (or value 'none))) :initialize 'custom-initialize-default :type '(choice (const :tag "none" nil) (const banish) (const jump) (const animate) (const exile) (const proteus)) :group 'avoid :require 'avoid :version "20.3")
#@204 *Average distance that mouse will be moved when approached by cursor.
Only applies in mouse-avoidance-mode `jump' and its derivatives.
For best results make this larger than `mouse-avoidance-threshold'.
(custom-declare-variable 'mouse-avoidance-nudge-dist '15 '(#$ . -1222) :type 'integer :group 'avoid)
#@59 *Variability of `mouse-avoidance-nudge-dist' (which see).
(custom-declare-variable 'mouse-avoidance-nudge-var '10 '(#$ . -1532) :type 'integer :group 'avoid)
#@44 Delay between animation steps, in seconds.
(custom-declare-variable 'mouse-avoidance-animation-delay '0.01 '(#$ . 1696) :type 'number :group 'avoid)
#@166 *Mouse-pointer's flight distance.
If the cursor gets closer than this, the mouse pointer will move away.
Only applies in mouse-avoidance-modes `animate' and `jump'.
(custom-declare-variable 'mouse-avoidance-threshold '5 '(#$ . -1852) :type 'integer :group 'avoid)
(byte-code "\306\300!\204 \307\300	B\306\302!\204 \307\302	B\306\303!\204  \310\303	B\306\304!\204, \307\304	B\306\305!\2048 \307\305	B\307\207" [mouse-avoidance-state current-load-list mouse-avoidance-pointer-shapes mouse-avoidance-n-pointer-shapes mouse-avoidance-old-pointer-shape mouse-avoidance-timer boundp nil 0] 2)
#@46 Set the shape of the mouse pointer to SHAPE.
(defalias 'mouse-avoidance-set-pointer-shape #[(shape) "\302\303!\207" [shape x-pointer-shape set-mouse-color nil] 2 (#$ . 2457)])
(put 'mouse-avoidance-set-pointer-shape 'byte-optimizer 'byte-compile-inline-expand)
#@77 Return the position of point as (FRAME X . Y).
Analogous to mouse-position.
(defalias 'mouse-avoidance-point-position #[nil "\303 \304!\305\306!e]\307`\310 \311 B\310 S\312!\313B\303 &\314 	@\nA@\\	A@\nAA@\\+BB\207" [w edges list selected-window window-edges compute-motion window-start (0 . 0) window-width window-height window-hscroll 0 selected-frame] 8 (#$ . 2726)])
(defalias 'mouse-avoidance-set-mouse-position #[(pos) "\302 \303!\210\304	@	A#\210)\305\207" [f pos selected-frame raise-frame set-mouse-position t] 4])
(defalias 'mouse-avoidance-too-close-p #[(mouse) "\303 	@@=\205* 	A@\205* \304	A@A@Z!\nW\205* \304	AAAAZ!\nW)\207" [point mouse mouse-avoidance-threshold mouse-avoidance-point-position abs] 3])
#@146 The position to which mouse-avoidance-mode `banish' moves the mouse.
You can redefine this if you want the mouse banished to a different corner.
(defalias 'mouse-avoidance-banish-destination #[nil "\300 S\301B\207" [frame-width 0] 2 (#$ . 3465)])
(defalias 'mouse-avoidance-banish-mouse #[nil "\300\301 !\207" [mouse-avoidance-set-mouse-position mouse-avoidance-banish-destination] 2])
(defalias 'mouse-avoidance-delta #[(cur delta dist var min max) "	Z\n[[\\]\n[\\\n[\\\f	Z\n\\^	\n		ZW\203. \306\n\306	\f	ZV\203< \306\306\n\203N \nW\203N \n\202\242 	\203` 	W\203` \202\242 	\203q \307W\203q 	\202\242 \203\203 W\203\203 \202\242 \203\223 W\203\223 \202\242 \206\242 	\206\242 \206\242 \307,\207" [min cur dist var max R2 nil 0 L2 R1 L1 delta] 6])
(put 'mouse-avoidance-delta 'byte-optimizer 'byte-compile-inline-expand)
(defalias 'mouse-avoidance-nudge-mouse #[nil "\306 \211@A\211@\307!\f@Z\310\311 Z[[\\][\\[\\Z\\^ZW\203[ \312\312ZV\203k \312\312\203} W\203} \202\324 \203\217 W\203\217 \202\324 \203\240 \310W\203\240 \202\324 \203\262 W\203\262 \202\324 \203\304 W\203\304 \202\324 \206\324 \206\324 \206\324 \310.\n \nA\307!\fAZ\310\313 Z[[\\][\\[\\Z\\^ZW\203*\312\312ZV\203:\312\312\203LW\203L\202\243\203^W\203^\202\243\203o\310W\203o\202\243\203\201W\203\201\202\243\203\223W\203\223\202\243\206\243\206\243\206\243\310.\n!\f@ \\\fA!\\B\"\314=\204\301\"\315=\203\f\316##\317X\205\320\n@\321# _!\\\nA\321#!_!\\B!\210#\322\323\245]\\#\"\315=\203 \324 \211$%\325\312!\210)\326&!\210\202\304)\202\320A@ \\AA!\\B!-\207" [cur cur-frame cur-pos mouse-avoidance-nudge-var mouse-avoidance-state mouse-avoidance-nudge-dist mouse-position random 0 frame-width nil frame-height animate proteus 0.0 1 mouse-avoidance-set-mouse-position round 0.1 1.0 mouse-avoidance-random-shape set-mouse-color sit-for max min var dist delta R2 L2 R1 L1 deltax deltay mouse-avoidance-mode i shape x-pointer-shape mouse-avoidance-animation-delay] 7])
#@213 Return a random cursor shape.
This assumes that any variable whose name begins with x-pointer- and
has an integer value is a valid cursor shape.  You might want to
redefine this function to suit your own tastes.
(defalias 'mouse-avoidance-random-shape #[nil "\204 \303\304\305\306	\307#\"\211G\310\n!8\207" [mouse-avoidance-pointer-shapes obarray mouse-avoidance-n-pointer-shapes mapcar #[(x) "\301!J\207" [x intern] 2] all-completions "x-pointer-" (lambda (x) (and (boundp x) (integerp (symbol-value x)))) random] 7 (#$ . 5722)])
(defalias 'mouse-avoidance-banish-hook #[nil "?\2052 	:\205, 	@9\205, \303	@!	@\304>\206+ \305\n>\206+ \306\n>\206+ \307\n>)?\2052 \310 \207" [executing-kbd-macro last-input-event modifiers event-modifiers (mouse-movement scroll-bar-movement) click drag down mouse-avoidance-banish-mouse] 2])
(defalias 'mouse-avoidance-exile-hook #[nil "?\205h 	:\205, 	@9\205, \305	@!	@\306>\206+ \307\n>\206+ \310\n>\206+ \311\n>)?\205h \312 \f\204D \313!\203D \314 \202g \f\205g \313\f!?\205g @\315 =\203d A\316 \232\203d \317\fA!\210\320\211)\207" [executing-kbd-macro last-input-event modifiers mp mouse-avoidance-state event-modifiers (mouse-movement scroll-bar-movement) click drag down mouse-position mouse-avoidance-too-close-p mouse-avoidance-banish-mouse selected-frame mouse-avoidance-banish-destination mouse-avoidance-set-mouse-position nil] 2])
(defalias 'mouse-avoidance-fancy-hook #[nil "?\205K 	:\205, 	@9\205, \304	@!	@\305>\206+ \306\n>\206+ \307\n>\206+ \310\n>)?\205K \311\312 !\205K \312 \313 \210\314 @=?\205J \315\316\")\207" [executing-kbd-macro last-input-event modifiers old-pos event-modifiers (mouse-movement scroll-bar-movement) click drag down mouse-avoidance-too-close-p mouse-position mouse-avoidance-nudge-mouse selected-frame apply set-mouse-position] 3])
#@1122 Set cursor avoidance mode to MODE.
MODE should be one of the symbols `banish', `exile', `jump', `animate',
`cat-and-mouse', `proteus', or `none'.

If MODE is nil, toggle mouse avoidance between `none` and `banish'
modes.  Positive numbers and symbols other than the above are treated
as equivalent to `banish'; negative numbers and `-' are equivalent to `none'.

Effects of the different modes: 
 * banish: Move the mouse to the upper-right corner on any keypress.
 * exile: Move the mouse to the corner only if the cursor gets too close,
     and allow it to return once the cursor is out of the way.
 * jump: If the cursor gets too close to the mouse, displace the mouse
     a random distance & direction.
 * animate: As `jump', but shows steps along the way for illusion of motion.
 * cat-and-mouse: Same as `animate'.
 * proteus: As `animate', but changes the shape of the mouse pointer too.

Whenever the mouse is moved, the frame is also raised.

(see `mouse-avoidance-threshold' for definition of "too close",
and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for
definition of "random distance".)
(defalias 'mouse-avoidance-mode #[(&optional mode) "\306=\203 \307	\203 \310	!\210\311\n\312=\203! \211\313\311!\210)\314=\203, \311\202\221 \315=\204> \307=\204> \312=\203P \316\317\320\321#\322\211B\202\221 \323=\203d \316\324\320\325#\311\202\221 \326=\204\204 \320=\204\204 \204x \n\203\204 \203\217 \327!\322V\203\217 \316\330\320\331#\326\202\221 \311\332 \207" [mode mouse-avoidance-timer mouse-avoidance-mode mouse-avoidance-old-pointer-shape shape x-pointer-shape cat-and-mouse animate cancel-timer nil proteus set-mouse-color none jump run-with-idle-timer 0.1 t mouse-avoidance-fancy-hook 0 exile 0.1 mouse-avoidance-exile-hook banish prefix-numeric-value 0.1 mouse-avoidance-banish-hook force-mode-line-update mouse-avoidance-state] 5 (#$ . 7559) (list (intern (completing-read "Select cursor avoidance technique (SPACE for list): " '(("banish") ("exile") ("jump") ("animate") ("cat-and-mouse") ("proteus") ("none")) nil t)))])
(byte-code "\203 \300!\210\300\207" [mouse-avoidance-mode] 2)
