405 |
(start-event-window (posn-window start)) |
(start-event-window (posn-window start)) |
406 |
(start-event-frame (window-frame start-event-window)) |
(start-event-frame (window-frame start-event-window)) |
407 |
(start-nwindows (count-windows t)) |
(start-nwindows (count-windows t)) |
|
(old-selected-window (selected-window)) |
|
408 |
(minibuffer (frame-parameter nil 'minibuffer)) |
(minibuffer (frame-parameter nil 'minibuffer)) |
409 |
should-enlarge-minibuffer event mouse y top bot edges wconfig growth) |
should-enlarge-minibuffer event mouse y top bot edges wconfig growth) |
410 |
(track-mouse |
(track-mouse |
552 |
(start-event-frame (window-frame (car (car (cdr start-event))))) |
(start-event-frame (window-frame (car (car (cdr start-event))))) |
553 |
(start-event-window (car (car (cdr start-event)))) |
(start-event-window (car (car (cdr start-event)))) |
554 |
(start-nwindows (count-windows t)) |
(start-nwindows (count-windows t)) |
|
(old-selected-window (selected-window)) |
|
555 |
event mouse x left right edges wconfig growth |
event mouse x left right edges wconfig growth |
556 |
(which-side |
(which-side |
557 |
(or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame))) |
(or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame))) |
863 |
(start-point (posn-point start-posn)) |
(start-point (posn-point start-posn)) |
864 |
(start-window (posn-window start-posn)) |
(start-window (posn-window start-posn)) |
865 |
(start-window-start (window-start start-window)) |
(start-window-start (window-start start-window)) |
|
(start-frame (window-frame start-window)) |
|
866 |
(start-hscroll (window-hscroll start-window)) |
(start-hscroll (window-hscroll start-window)) |
867 |
(bounds (window-edges start-window)) |
(bounds (window-edges start-window)) |
868 |
(make-cursor-line-fully-visible nil) |
(make-cursor-line-fully-visible nil) |
896 |
(window-buffer start-window)) |
(window-buffer start-window)) |
897 |
(overlay-put mouse-drag-overlay 'window (selected-window))) |
(overlay-put mouse-drag-overlay 'window (selected-window))) |
898 |
(deactivate-mark) |
(deactivate-mark) |
899 |
;; end-of-range is used only in the single-click case. |
(let (event end end-point last-end-point) |
|
;; It is the place where the drag has reached so far |
|
|
;; (but not outside the window where the drag started). |
|
|
(let (event end end-point last-end-point (end-of-range (point))) |
|
900 |
(track-mouse |
(track-mouse |
901 |
(while (progn |
(while (progn |
902 |
(setq event (read-event)) |
(setq event (read-event)) |
918 |
;; point jumps in the direction away from START-POINT. |
;; point jumps in the direction away from START-POINT. |
919 |
(goto-char start-point) |
(goto-char start-point) |
920 |
(goto-char end-point) |
(goto-char end-point) |
|
(if (zerop (% click-count 3)) |
|
|
(setq end-of-range (point))) |
|
921 |
(let ((range (mouse-start-end start-point (point) click-count))) |
(let ((range (mouse-start-end start-point (point) click-count))) |
922 |
(move-overlay mouse-drag-overlay (car range) (nth 1 range)))) |
(move-overlay mouse-drag-overlay (car range) (nth 1 range)))) |
923 |
|
|
927 |
((null mouse-row)) |
((null mouse-row)) |
928 |
((< mouse-row top) |
((< mouse-row top) |
929 |
(mouse-scroll-subr start-window (- mouse-row top) |
(mouse-scroll-subr start-window (- mouse-row top) |
930 |
mouse-drag-overlay start-point) |
mouse-drag-overlay start-point)) |
|
;; Without this, point tends to jump back to the starting |
|
|
;; position where the mouse button was pressed down. |
|
|
(setq end-of-range (overlay-start mouse-drag-overlay))) |
|
931 |
((>= mouse-row bottom) |
((>= mouse-row bottom) |
932 |
(mouse-scroll-subr start-window (1+ (- mouse-row bottom)) |
(mouse-scroll-subr start-window (1+ (- mouse-row bottom)) |
933 |
mouse-drag-overlay start-point) |
mouse-drag-overlay start-point))))))))) |
|
(setq end-of-range (overlay-end mouse-drag-overlay)))))))))) |
|
934 |
|
|
935 |
;; In case we did not get a mouse-motion event |
;; In case we did not get a mouse-motion event |
936 |
;; for the final move of the mouse before a drag event |
;; for the final move of the mouse before a drag event |
945 |
;; point jumps in the direction away from START-POINT. |
;; point jumps in the direction away from START-POINT. |
946 |
(goto-char start-point) |
(goto-char start-point) |
947 |
(goto-char end-point) |
(goto-char end-point) |
|
(if (zerop (% click-count 3)) |
|
|
(setq end-of-range (point))) |
|
948 |
(let ((range (mouse-start-end start-point (point) click-count))) |
(let ((range (mouse-start-end start-point (point) click-count))) |
949 |
(move-overlay mouse-drag-overlay (car range) (nth 1 range)))) |
(move-overlay mouse-drag-overlay (car range) (nth 1 range)))) |
950 |
|
|
1478 |
(start-posn (event-start start-event)) |
(start-posn (event-start start-event)) |
1479 |
(start-point (posn-point start-posn)) |
(start-point (posn-point start-posn)) |
1480 |
(start-window (posn-window start-posn)) |
(start-window (posn-window start-posn)) |
|
(start-frame (window-frame start-window)) |
|
1481 |
(bounds (window-edges start-window)) |
(bounds (window-edges start-window)) |
1482 |
(top (nth 1 bounds)) |
(top (nth 1 bounds)) |
1483 |
(bottom (if (window-minibuffer-p start-window) |
(bottom (if (window-minibuffer-p start-window) |
2418 |
(make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1") |
(make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1") |
2419 |
(provide 'mldrag) |
(provide 'mldrag) |
2420 |
|
|
2421 |
;;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 |
;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 |
2422 |
;;; mouse.el ends here |
;;; mouse.el ends here |