;ELC ;;; compiled by rms@mole.gnu.ai.mit.edu on Fri Jun 17 09:47:40 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/avoid.el ;;; emacs version 19.25.3. ;;; 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"))) (error "`/gd/gnu/emacs/19.0/lisp/avoid.el' was compiled for Emacs 19")) (provide (quote avoid)) (defvar mouse-avoidance-mode nil "\ 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-nudge-dist 15 "\ *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-var 10 "\ *Variability of `mouse-avoidance-nudge-dist' (which see).") (defvar mouse-avoidance-animation-delay .01 "\ Delay between animation steps, in seconds.") (defvar mouse-avoidance-threshold 5 "\ *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'.") (byte-code "!!!‡" [boundp mouse-avoidance-state nil mouse-avoidance-pointer-shapes mouse-avoidance-n-pointer-shapes 0] 2) (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 "\ Return the position of point as (FRAME X . Y). Analogous to mouse-position."]) (byte-code "\"\"" [defalias mouse-avoidance-set-mouse-position #[(pos) "  ! \f@\fA#)Ň" [selected-frame f raise-frame set-mouse-position pos t] 4] 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]] 3) (defalias 'mouse-avoidance-banish-destination #[nil " SB" [frame-width 0] 2 "\ 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."]) (byte-code "\"\"#\"" [defalias mouse-avoidance-banish-mouse #[nil " !" [mouse-avoidance-set-mouse-position mouse-avoidance-banish-destination] 2] mouse-avoidance-delta #[(cur delta dist var min max) " Z\n[ [\\]\n[ \\\n [\\\f Z\n \\^ ZW.\f ZV<N\nWN`\nW`\nq\nWq\nW \n W\n ," [min cur dist var max R2 L2 R1 L1 nil delta 0] 6] put byte-optimizer byte-compile-inline-expand mouse-avoidance-nudge-mouse #[nil " @ A@ !@Z \n \f  Z [\f[\\] [\f\\ \f[\\\n Z \f\\^ ZW]\n ZVmWWWWW.\n A !AZ \n \f  Z [\f[\\] [\f\\ \f[\\\n Z \f\\^ ZW.\n ZV>PWPbWbsWsWW.\n@\\A\\B== \"AX @_!\\ 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 assoc mouse-color frame-parameters color i 1 mouse-avoidance-set-mouse-position round .1 1.0 mouse-avoidance-random-shape x-pointer-shape set-mouse-color sit-for mouse-avoidance-animation-delay] 7]] 4) (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 "\ 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."]) (byte-code "\"\"\"" [defalias mouse-avoidance-banish-hook #[nil "? ! " [executing-kbd-macro mouse-avoidance-kbd-command this-command-keys mouse-avoidance-banish-mouse] 2] 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] mouse-avoidance-fancy-hook #[nil "?. !. !.  @=?- @ A@ AA$)" [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 set-mouse-position] 5]] 3) (defalias 'mouse-avoidance-kbd-command #[(key) "!Çō" [key nil vectorp t done (byte-code " G\nW H<\" T*LJ" [0 key l i throw done nil t] 4)] 2 "\ 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-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 "\ 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\".)" (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)