;ELC   
;;; compiled by kwzh@hal.gnu.ai.mit.edu on Mon Jun  5 23:34:35 1995
;;; from file /gd/gnu/emacs/19.0/lisp/avoid.el
;;; emacs version 19.28.93.2.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.28.90")))
    (error "`avoid.el' was compiled for Emacs 19.29 or later"))


(provide (quote avoid))
#@223 Value is t or a symbol if the mouse pointer should avoid the cursor.
See function `mouse-avoidance-mode' for possible values.  Changing this
variable is NOT the recommended way to change modes; use that function 
instead.
(defvar mouse-avoidance-mode nil (#$ . 497))
#@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'.
(defvar mouse-avoidance-nudge-dist 15 (#$ . -771))
#@59 *Variability of `mouse-avoidance-nudge-dist' (which see).
(defvar mouse-avoidance-nudge-var 10 (#$ . -1031))
#@44 Delay between animation steps, in seconds.
(defvar mouse-avoidance-animation-delay 0.01 (#$ . 1146))
#@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'.
(defvar mouse-avoidance-threshold 5 (#$ . -1254))
(byte-code "ÀÁ!„ ÂÁBÀÄ!„ ÂÄBÀÅ!„  ÆÅBÂ‡" [boundp mouse-avoidance-state nil current-load-list mouse-avoidance-pointer-shapes mouse-avoidance-n-pointer-shapes 0] 2)
#@46 Set the shape of the mouse pointer to SHAPE.
(defalias 'mouse-avoidance-set-pointer-shape #[(shape) "ÂÃ!‡" [shape x-pointer-shape set-mouse-color nil] 2 (#$ . 1649)])
(put (quote mouse-avoidance-set-pointer-shape) (quote byte-optimizer) (quote byte-compile-inline-expand))
#@77 Return the position of point as (FRAME X . Y).
Analogous to mouse-position.
(defalias 'mouse-avoidance-point-position #[nil "À Â	!ÄÅ	!e]Æ`Ç È BÇ SÉ	!ÊBÀ &Ì @A@\\A@AA@\\+BB‡" [selected-window w window-edges edges compute-motion window-start (0 . 0) window-width window-height window-hscroll 0 list selected-frame] 8 (#$ . 1930)])
(defalias 'mouse-avoidance-set-mouse-position #[(pos) "À Â	!ˆÃ	\f@\fA#ˆ)Å‡" [selected-frame f raise-frame set-mouse-position pos t] 4])
(defalias 'mouse-avoidance-too-close-p #[(mouse) "À \n@	@=…* \nA@…* Ã\nA@	A@Z!\fW…* Ã\nAA	AAZ!\fW)‡" [mouse-avoidance-point-position point mouse abs mouse-avoidance-threshold] 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 "À SÁB‡" [frame-width 0] 2 (#$ . 2595)])
(defalias 'mouse-avoidance-banish-mouse #[nil "ÀÁ !‡" [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\\^	ZWƒ. ÉÉ\f	ZVƒ< ÉÉƒN \nWƒN ‚¢ ƒ` \nWƒ` \n‚¢ ƒq \nËWƒq ‚¢ ƒƒ \nWƒƒ ‚¢ ƒ“ \nWƒ“ \n‚¢ †¢ †¢ †¢ Ë,‡" [min cur dist var max R2 L2 R1 L1 nil delta 0] 6])
(put (quote mouse-avoidance-delta) (quote byte-optimizer) (quote byte-compile-inline-expand))
(defalias 'mouse-avoidance-nudge-mouse #[nil "À ‰@	A‰@Ä!@ZÈÉ \n\f	Z[\f[\\][\f\\\f[\\\n	Z\f\\^	ZWƒ] ÓÓ\n	ZVƒm ÓÓƒ Wƒ ‚Ö ƒ‘ Wƒ‘ ‚Ö ƒ¢ ÈWƒ¢ ‚Ö ƒ´ Wƒ´ ‚Ö ƒÆ WƒÆ ‚Ö †Ö †Ö †Ö È.\nAÄ!AZÈÕ \n\f	Z[\f[\\][\f\\\f[\\\n	Z\f\\^	ZWƒ.ÓÓ\n	ZVƒ>ÓÓƒPWƒP‚§ƒbWƒb‚§ƒsÈWƒs‚§ƒ…Wƒ…‚§ƒ—Wƒ—‚§†§†§†§È.\n@\\A\\BØ=„ÈÙ=ƒÚÜX…Ý@Þ_!\\AÞ_!\\B!ˆßà¥]\\Ù=ƒá ‰\"#äÓ!ˆ)å&!ˆ‚Ë)‚#Ý	A@\\	AA\\B!-‡" [mouse-position cur cur-frame cur-pos random mouse-avoidance-nudge-var mouse-avoidance-state mouse-avoidance-nudge-dist 0 frame-width max min var dist delta R2 L2 R1 L1 nil deltax frame-height deltay mouse-avoidance-mode animate proteus 0.0 i 1 mouse-avoidance-set-mouse-position round 0.10000000000000001 1.0 mouse-avoidance-random-shape shape x-pointer-shape set-mouse-color sit-for 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 "„ ÁÂÃÄÆ#\"‰GÈ!8‡" [mouse-avoidance-pointer-shapes mapcar #[(x) "À	!J‡" [intern x] 2] all-completions "x-pointer-" obarray (lambda (x) (and (boundp x) (integerp (symbol-value x)))) mouse-avoidance-n-pointer-shapes random] 7 (#$ . 4416)])
(defalias 'mouse-avoidance-banish-hook #[nil "?… ÁÂ !… Ã ‡" [executing-kbd-macro mouse-avoidance-kbd-command this-command-keys mouse-avoidance-banish-mouse] 2])
(defalias 'mouse-avoidance-exile-hook #[nil "?…D ÁÂ !…D Ã „  Æ\f!ƒ  \fÇ ‚C …C Æ!?…C \f@È =ƒ@ \fAÉ šƒ@ ÊA!ˆË‰)‡" [executing-kbd-macro mouse-avoidance-kbd-command this-command-keys mouse-position mp mouse-avoidance-state 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 "?…' ÁÂ !…' ÃÄ !…' Ä Æ ˆÇ @=?…& ÈÉ\")‡" [executing-kbd-macro mouse-avoidance-kbd-command this-command-keys mouse-avoidance-too-close-p mouse-position old-pos mouse-avoidance-nudge-mouse selected-frame apply set-mouse-position] 3])
#@120 Return t if the KEYSEQENCE is composed of keyboard events only.
Return nil if there are any lists in the key sequence.
(defalias 'mouse-avoidance-kbd-command #[(key) "„ Á‡Â!„ Ã‡ÄÅ�‡" [key nil vectorp t done (byte-code "À	G‰\nWƒ 	H<ƒ ÄÅÆ\"ˆT‰‚ *Ç‡" [0 key l i throw done nil t] 4)] 2 (#$ . 5749)])
#@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) "Á=ƒ ÂÃÄÅÇ\"\"ÃÈÅÇ\"\"ÃÉÅÇ\"\"Ê=ƒ2 Ç‚— Ì=„D Â=„D Í=ƒT ÎÆÉ\"ˆÏ‰B‚— Ñ=ƒh ÎÆÈ\"ˆÇ‚— Ò=„‰ Ó=„‰ „} ƒ‰ ƒ” Ô!ÏVƒ” ÎÆÄ\"ˆÒ‚— ÇÕ ‡" [mode cat-and-mouse animate delete mouse-avoidance-banish-hook append post-command-hook nil mouse-avoidance-exile-hook mouse-avoidance-fancy-hook none mouse-avoidance-mode jump proteus add-hook 0 mouse-avoidance-state exile banish t prefix-numeric-value force-mode-line-update] 5 (#$ . 6066) (list (intern (completing-read "Select cursor avoidance technique (SPACE for list): " (quote (("banish") ("exile") ("jump") ("animate") ("cat-and-mouse") ("proteus") ("none"))) nil t)))])
(byte-code "À	ž„\n Â	BÀ‡" [mouse-avoidance-mode minor-mode-alist (mouse-avoidance-mode " Avoid")] 2)
