Mercurial > emacs
comparison lisp/avoid.el @ 17436:2a9fdbfcb993
Add defgroup; use defcustom for user vars.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 13 Apr 1997 07:51:54 +0000 |
parents | 15b18d794b75 |
children | b686f7cb6849 |
comparison
equal
deleted
inserted
replaced
17435:b104a6fb7fa3 | 17436:2a9fdbfcb993 |
---|---|
67 | 67 |
68 ;;; Code: | 68 ;;; Code: |
69 | 69 |
70 (provide 'avoid) | 70 (provide 'avoid) |
71 | 71 |
72 (defgroup avoid nil | |
73 "Make mouse pointer stay out of the way of editing." | |
74 :prefix "mouse-avoidance-" | |
75 :group 'mouse) | |
76 | |
77 | |
72 (defvar mouse-avoidance-mode nil | 78 (defvar mouse-avoidance-mode nil |
73 "Value is t or a symbol if the mouse pointer should avoid the cursor. | 79 "Value is t or a symbol if the mouse pointer should avoid the cursor. |
74 See function `mouse-avoidance-mode' for possible values. Changing this | 80 See function `mouse-avoidance-mode' for possible values. Changing this |
75 variable is NOT the recommended way to change modes; use that function | 81 variable is NOT the recommended way to change modes; use that function |
76 instead.") | 82 instead.") |
77 | 83 |
78 (defvar mouse-avoidance-nudge-dist 15 | 84 (defcustom mouse-avoidance-nudge-dist 15 |
79 "*Average distance that mouse will be moved when approached by cursor. | 85 "*Average distance that mouse will be moved when approached by cursor. |
80 Only applies in mouse-avoidance-mode `jump' and its derivatives. | 86 Only applies in mouse-avoidance-mode `jump' and its derivatives. |
81 For best results make this larger than `mouse-avoidance-threshold'.") | 87 For best results make this larger than `mouse-avoidance-threshold'." |
82 | 88 :type 'integer |
83 (defvar mouse-avoidance-nudge-var 10 | 89 :group 'avoid) |
84 "*Variability of `mouse-avoidance-nudge-dist' (which see).") | 90 |
85 | 91 (defcustom mouse-avoidance-nudge-var 10 |
86 (defvar mouse-avoidance-animation-delay .01 | 92 "*Variability of `mouse-avoidance-nudge-dist' (which see)." |
87 "Delay between animation steps, in seconds.") | 93 :type 'integer |
88 | 94 :group 'avoid) |
89 (defvar mouse-avoidance-threshold 5 | 95 |
96 (defcustom mouse-avoidance-animation-delay .01 | |
97 "Delay between animation steps, in seconds." | |
98 :type 'number | |
99 :group 'avoid) | |
100 | |
101 (defcustom mouse-avoidance-threshold 5 | |
90 "*Mouse-pointer's flight distance. | 102 "*Mouse-pointer's flight distance. |
91 If the cursor gets closer than this, the mouse pointer will move away. | 103 If the cursor gets closer than this, the mouse pointer will move away. |
92 Only applies in mouse-avoidance-modes `animate' and `jump'.") | 104 Only applies in mouse-avoidance-modes `animate' and `jump'." |
105 :type 'integer | |
106 :group 'avoid) | |
93 | 107 |
94 ;; Internal variables | 108 ;; Internal variables |
95 (defvar mouse-avoidance-state nil) | 109 (defvar mouse-avoidance-state nil) |
96 (defvar mouse-avoidance-pointer-shapes nil) | 110 (defvar mouse-avoidance-pointer-shapes nil) |
97 (defvar mouse-avoidance-n-pointer-shapes 0) | 111 (defvar mouse-avoidance-n-pointer-shapes 0) |