diff options
| author | Chong Yidong | 2006-12-02 21:47:02 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-12-02 21:47:02 +0000 |
| commit | a9d0154753823698c01d9f628bc66951e31dfecf (patch) | |
| tree | 693fba68b74cdc9c064b2b7a93eac880ec1c36a2 | |
| parent | 8a6137df3a5c5d017dd239ce7fe8bc48292bc6a3 (diff) | |
| download | emacs-a9d0154753823698c01d9f628bc66951e31dfecf.tar.gz emacs-a9d0154753823698c01d9f628bc66951e31dfecf.zip | |
(mouse-drag-track): Suppress automatic hscrolling for initial down
event.
| -rw-r--r-- | lisp/mouse.el | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 23a2cab4740..b60552f1183 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -925,7 +925,11 @@ should only be used by mouse-drag-region." | |||
| 925 | (click-count (1- (event-click-count start-event))) | 925 | (click-count (1- (event-click-count start-event))) |
| 926 | (remap-double-click (and on-link | 926 | (remap-double-click (and on-link |
| 927 | (eq mouse-1-click-follows-link 'double) | 927 | (eq mouse-1-click-follows-link 'double) |
| 928 | (= click-count 1)))) | 928 | (= click-count 1))) |
| 929 | ;; Suppress automatic hscrolling, because that is a nuisance | ||
| 930 | ;; when setting point near the right fringe (but see below). | ||
| 931 | (automatic-hscrolling-saved automatic-hscrolling) | ||
| 932 | (automatic-hscrolling nil)) | ||
| 929 | (setq mouse-selection-click-count click-count) | 933 | (setq mouse-selection-click-count click-count) |
| 930 | ;; In case the down click is in the middle of some intangible text, | 934 | ;; In case the down click is in the middle of some intangible text, |
| 931 | ;; use the end of that text, and put it in START-POINT. | 935 | ;; use the end of that text, and put it in START-POINT. |
| @@ -946,6 +950,11 @@ should only be used by mouse-drag-region." | |||
| 946 | (memq (car-safe event) '(switch-frame select-window)))) | 950 | (memq (car-safe event) '(switch-frame select-window)))) |
| 947 | (if (memq (car-safe event) '(switch-frame select-window)) | 951 | (if (memq (car-safe event) '(switch-frame select-window)) |
| 948 | nil | 952 | nil |
| 953 | ;; Automatic hscrolling did not occur during the call to | ||
| 954 | ;; `read-event'; but if the user subsequently drags the | ||
| 955 | ;; mouse, go ahead and hscroll. | ||
| 956 | (let ((automatic-hscrolling automatic-hscrolling-saved)) | ||
| 957 | (redisplay)) | ||
| 949 | (setq end (event-end event) | 958 | (setq end (event-end event) |
| 950 | end-point (posn-point end)) | 959 | end-point (posn-point end)) |
| 951 | (if (numberp end-point) | 960 | (if (numberp end-point) |