diff options
| author | Richard M. Stallman | 1998-02-06 21:56:29 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-02-06 21:56:29 +0000 |
| commit | 59fed268c3e527ada2155d6b297153754a210b12 (patch) | |
| tree | e33de0bc7ed5d09d6eb5aa584ad1f19e5b4fbf7a | |
| parent | 35c8b898625307b8e8228265daa57ed2a9b18e12 (diff) | |
| download | emacs-59fed268c3e527ada2155d6b297153754a210b12.tar.gz emacs-59fed268c3e527ada2155d6b297153754a210b12.zip | |
(mouse-avoidance-fancy-hook): Do nothing if button is down.
(mouse-avoidance-exile-hook, mouse-avoidance-banish-hook): Likewise.
| -rw-r--r-- | lisp/avoid.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/avoid.el b/lisp/avoid.el index 1c7ece39272..1d80ed9f8c1 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el | |||
| @@ -267,6 +267,10 @@ redefine this function to suit your own tastes." | |||
| 267 | 267 | ||
| 268 | (defun mouse-avoidance-banish-hook () | 268 | (defun mouse-avoidance-banish-hook () |
| 269 | (if (and (not executing-kbd-macro) ; don't check inside macro | 269 | (if (and (not executing-kbd-macro) ; don't check inside macro |
| 270 | ;; Don't check while mouse is down. | ||
| 271 | (not (and (consp last-input-event) | ||
| 272 | (symbolp (car last-input-event)) | ||
| 273 | (memq 'down (event-modifiers (car last-input-event))))) | ||
| 270 | (mouse-avoidance-kbd-command (this-command-keys))) | 274 | (mouse-avoidance-kbd-command (this-command-keys))) |
| 271 | (mouse-avoidance-banish-mouse))) | 275 | (mouse-avoidance-banish-mouse))) |
| 272 | 276 | ||
| @@ -274,6 +278,9 @@ redefine this function to suit your own tastes." | |||
| 274 | ;; For exile mode, the state is nil when the mouse is in its normal | 278 | ;; For exile mode, the state is nil when the mouse is in its normal |
| 275 | ;; position, and set to the old mouse-position when the mouse is in exile. | 279 | ;; position, and set to the old mouse-position when the mouse is in exile. |
| 276 | (if (and (not executing-kbd-macro) | 280 | (if (and (not executing-kbd-macro) |
| 281 | (not (and (consp last-input-event) | ||
| 282 | (symbolp (car last-input-event)) | ||
| 283 | (memq 'down (event-modifiers (car last-input-event))))) | ||
| 277 | (mouse-avoidance-kbd-command (this-command-keys))) | 284 | (mouse-avoidance-kbd-command (this-command-keys))) |
| 278 | (let ((mp (mouse-position))) | 285 | (let ((mp (mouse-position))) |
| 279 | (cond ((and (not mouse-avoidance-state) | 286 | (cond ((and (not mouse-avoidance-state) |
| @@ -293,6 +300,9 @@ redefine this function to suit your own tastes." | |||
| 293 | (defun mouse-avoidance-fancy-hook () | 300 | (defun mouse-avoidance-fancy-hook () |
| 294 | ;; Used for the "fancy" modes, ie jump et al. | 301 | ;; Used for the "fancy" modes, ie jump et al. |
| 295 | (if (and (not executing-kbd-macro) ; don't check inside macro | 302 | (if (and (not executing-kbd-macro) ; don't check inside macro |
| 303 | (not (and (consp last-input-event) | ||
| 304 | (symbolp (car last-input-event)) | ||
| 305 | (memq 'down (event-modifiers (car last-input-event))))) | ||
| 296 | (mouse-avoidance-kbd-command (this-command-keys)) | 306 | (mouse-avoidance-kbd-command (this-command-keys)) |
| 297 | (mouse-avoidance-too-close-p (mouse-position))) | 307 | (mouse-avoidance-too-close-p (mouse-position))) |
| 298 | (let ((old-pos (mouse-position))) | 308 | (let ((old-pos (mouse-position))) |