diff options
| author | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-03-21 12:42:16 -0400 |
| commit | cafdcef32d55cbb44389d7e322e7f973cbb72dfd (patch) | |
| tree | 7ee0c41ea8a589650ce6f4311fb10e61a63807b9 /lisp/avoid.el | |
| parent | a08a25d7aaf251aa18f2ef747be53734bc55cae9 (diff) | |
| parent | 4e05e67e4cd0bc1b0a4ef3176a4d0d91c6b3738e (diff) | |
| download | emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.tar.gz emacs-cafdcef32d55cbb44389d7e322e7f973cbb72dfd.zip | |
Merge from trunk
Diffstat (limited to 'lisp/avoid.el')
| -rw-r--r-- | lisp/avoid.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/avoid.el b/lisp/avoid.el index fe47a0c4a33..038927105ec 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el | |||
| @@ -76,7 +76,7 @@ | |||
| 76 | 76 | ||
| 77 | ;;;###autoload | 77 | ;;;###autoload |
| 78 | (defcustom mouse-avoidance-mode nil | 78 | (defcustom mouse-avoidance-mode nil |
| 79 | "Activate mouse avoidance mode. | 79 | "Activate Mouse Avoidance mode. |
| 80 | See function `mouse-avoidance-mode' for possible values. | 80 | See function `mouse-avoidance-mode' for possible values. |
| 81 | Setting this variable directly does not take effect; | 81 | Setting this variable directly does not take effect; |
| 82 | use either \\[customize] or the function `mouse-avoidance-mode'." | 82 | use either \\[customize] or the function `mouse-avoidance-mode'." |
| @@ -85,8 +85,7 @@ use either \\[customize] or the function `mouse-avoidance-mode'." | |||
| 85 | (mouse-avoidance-mode (or value 'none))) | 85 | (mouse-avoidance-mode (or value 'none))) |
| 86 | :initialize 'custom-initialize-default | 86 | :initialize 'custom-initialize-default |
| 87 | :type '(choice (const :tag "none" nil) (const banish) (const jump) | 87 | :type '(choice (const :tag "none" nil) (const banish) (const jump) |
| 88 | (const animate) (const exile) (const proteus) | 88 | (const animate) (const exile) (const proteus)) |
| 89 | ) | ||
| 90 | :group 'avoid | 89 | :group 'avoid |
| 91 | :require 'avoid | 90 | :require 'avoid |
| 92 | :version "20.3") | 91 | :version "20.3") |
| @@ -94,7 +93,7 @@ use either \\[customize] or the function `mouse-avoidance-mode'." | |||
| 94 | 93 | ||
| 95 | (defcustom mouse-avoidance-nudge-dist 15 | 94 | (defcustom mouse-avoidance-nudge-dist 15 |
| 96 | "Average distance that mouse will be moved when approached by cursor. | 95 | "Average distance that mouse will be moved when approached by cursor. |
| 97 | Only applies in Mouse-Avoidance mode `jump' and its derivatives. | 96 | Only applies in Mouse Avoidance mode `jump' and its derivatives. |
| 98 | For best results make this larger than `mouse-avoidance-threshold'." | 97 | For best results make this larger than `mouse-avoidance-threshold'." |
| 99 | :type 'integer | 98 | :type 'integer |
| 100 | :group 'avoid) | 99 | :group 'avoid) |
| @@ -112,7 +111,7 @@ For best results make this larger than `mouse-avoidance-threshold'." | |||
| 112 | (defcustom mouse-avoidance-threshold 5 | 111 | (defcustom mouse-avoidance-threshold 5 |
| 113 | "Mouse-pointer's flight distance. | 112 | "Mouse-pointer's flight distance. |
| 114 | If the cursor gets closer than this, the mouse pointer will move away. | 113 | If the cursor gets closer than this, the mouse pointer will move away. |
| 115 | Only applies in mouse-avoidance-modes `animate' and `jump'." | 114 | Only applies in Mouse Avoidance modes `animate' and `jump'." |
| 116 | :type 'integer | 115 | :type 'integer |
| 117 | :group 'avoid) | 116 | :group 'avoid) |
| 118 | 117 | ||
| @@ -183,7 +182,7 @@ Acceptable distance is defined by `mouse-avoidance-threshold'." | |||
| 183 | mouse-avoidance-threshold)))))) | 182 | mouse-avoidance-threshold)))))) |
| 184 | 183 | ||
| 185 | (defun mouse-avoidance-banish-destination () | 184 | (defun mouse-avoidance-banish-destination () |
| 186 | "The position to which Mouse-Avoidance mode `banish' moves the mouse. | 185 | "The position to which Mouse Avoidance mode `banish' moves the mouse. |
| 187 | You can redefine this if you want the mouse banished to a different corner." | 186 | You can redefine this if you want the mouse banished to a different corner." |
| 188 | (let* ((pos (window-edges))) | 187 | (let* ((pos (window-edges))) |
| 189 | (cons (- (nth 2 pos) 2) | 188 | (cons (- (nth 2 pos) 2) |
| @@ -278,6 +277,7 @@ redefine this function to suit your own tastes." | |||
| 278 | (defun mouse-avoidance-ignore-p () | 277 | (defun mouse-avoidance-ignore-p () |
| 279 | (let ((mp (mouse-position))) | 278 | (let ((mp (mouse-position))) |
| 280 | (or (not (frame-pointer-visible-p)) ; The pointer is hidden | 279 | (or (not (frame-pointer-visible-p)) ; The pointer is hidden |
| 280 | (not cursor-type) ; There's no cursor | ||
| 281 | executing-kbd-macro ; don't check inside macro | 281 | executing-kbd-macro ; don't check inside macro |
| 282 | (null (cadr mp)) ; don't move unless in an Emacs frame | 282 | (null (cadr mp)) ; don't move unless in an Emacs frame |
| 283 | (not (eq (car mp) (selected-frame))) | 283 | (not (eq (car mp) (selected-frame))) |
| @@ -332,7 +332,7 @@ redefine this function to suit your own tastes." | |||
| 332 | 332 | ||
| 333 | ;;;###autoload | 333 | ;;;###autoload |
| 334 | (defun mouse-avoidance-mode (&optional mode) | 334 | (defun mouse-avoidance-mode (&optional mode) |
| 335 | "Set cursor avoidance mode to MODE. | 335 | "Set Mouse Avoidance mode to MODE. |
| 336 | MODE should be one of the symbols `banish', `exile', `jump', `animate', | 336 | MODE should be one of the symbols `banish', `exile', `jump', `animate', |
| 337 | `cat-and-mouse', `proteus', or `none'. | 337 | `cat-and-mouse', `proteus', or `none'. |
| 338 | 338 | ||
| @@ -352,7 +352,7 @@ Effects of the different modes: | |||
| 352 | 352 | ||
| 353 | Whenever the mouse is moved, the frame is also raised. | 353 | Whenever the mouse is moved, the frame is also raised. |
| 354 | 354 | ||
| 355 | \(see `mouse-avoidance-threshold' for definition of \"too close\", | 355 | \(See `mouse-avoidance-threshold' for definition of \"too close\", |
| 356 | and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for | 356 | and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for |
| 357 | definition of \"random distance\".)" | 357 | definition of \"random distance\".)" |
| 358 | (interactive | 358 | (interactive |