diff options
| author | Stefan Monnier | 2005-09-19 18:51:54 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-09-19 18:51:54 +0000 |
| commit | f002506f6e93913116f01802465f3bdef9db52cb (patch) | |
| tree | 63c754a173aad8a4afc79822543adb43ea6c145b | |
| parent | fac3f386dedbb45bd04d543ebfccd45a58eddb04 (diff) | |
| download | emacs-f002506f6e93913116f01802465f3bdef9db52cb.tar.gz emacs-f002506f6e93913116f01802465f3bdef9db52cb.zip | |
(mouse-drag-mode-line-1, mouse-drag-vertical-line):
Delete unused var `old-selected-window'.
(mouse-drag-region-1): Delete unused vars `start-frame' `end-of-range'.
(mouse-drag-secondary): Delete unused var `start-frame'.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/mouse.el | 23 |
2 files changed, 11 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b4e1c8cbca..4ed37707b96 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2005-09-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * mouse.el (mouse-drag-mode-line-1, mouse-drag-vertical-line): | ||
| 4 | Delete unused var `old-selected-window'. | ||
| 5 | (mouse-drag-region-1): Delete unused vars `start-frame' `end-of-range'. | ||
| 6 | (mouse-drag-secondary): Delete unused var `start-frame'. | ||
| 7 | |||
| 1 | 2005-09-19 Emanuele Giaquinta <emanuele.giaquinta@gmail.com> (tiny change) | 8 | 2005-09-19 Emanuele Giaquinta <emanuele.giaquinta@gmail.com> (tiny change) |
| 2 | 9 | ||
| 3 | * term/rxvt.el (terminal-init-rxvt): Add entry for [end]. | 10 | * term/rxvt.el (terminal-init-rxvt): Add entry for [end]. |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 3b591694cfe..c570c1a2e43 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -405,7 +405,6 @@ MODE-LINE-P non-nil means dragging a mode line; nil means a header line." | |||
| 405 | (start-event-window (posn-window start)) | 405 | (start-event-window (posn-window start)) |
| 406 | (start-event-frame (window-frame start-event-window)) | 406 | (start-event-frame (window-frame start-event-window)) |
| 407 | (start-nwindows (count-windows t)) | 407 | (start-nwindows (count-windows t)) |
| 408 | (old-selected-window (selected-window)) | ||
| 409 | (minibuffer (frame-parameter nil 'minibuffer)) | 408 | (minibuffer (frame-parameter nil 'minibuffer)) |
| 410 | should-enlarge-minibuffer event mouse y top bot edges wconfig growth) | 409 | should-enlarge-minibuffer event mouse y top bot edges wconfig growth) |
| 411 | (track-mouse | 410 | (track-mouse |
| @@ -553,7 +552,6 @@ resized by dragging their header-line." | |||
| 553 | (start-event-frame (window-frame (car (car (cdr start-event))))) | 552 | (start-event-frame (window-frame (car (car (cdr start-event))))) |
| 554 | (start-event-window (car (car (cdr start-event)))) | 553 | (start-event-window (car (car (cdr start-event)))) |
| 555 | (start-nwindows (count-windows t)) | 554 | (start-nwindows (count-windows t)) |
| 556 | (old-selected-window (selected-window)) | ||
| 557 | event mouse x left right edges wconfig growth | 555 | event mouse x left right edges wconfig growth |
| 558 | (which-side | 556 | (which-side |
| 559 | (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame))) | 557 | (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame))) |
| @@ -865,7 +863,6 @@ at the same position." | |||
| 865 | (start-point (posn-point start-posn)) | 863 | (start-point (posn-point start-posn)) |
| 866 | (start-window (posn-window start-posn)) | 864 | (start-window (posn-window start-posn)) |
| 867 | (start-window-start (window-start start-window)) | 865 | (start-window-start (window-start start-window)) |
| 868 | (start-frame (window-frame start-window)) | ||
| 869 | (start-hscroll (window-hscroll start-window)) | 866 | (start-hscroll (window-hscroll start-window)) |
| 870 | (bounds (window-edges start-window)) | 867 | (bounds (window-edges start-window)) |
| 871 | (make-cursor-line-fully-visible nil) | 868 | (make-cursor-line-fully-visible nil) |
| @@ -899,10 +896,7 @@ at the same position." | |||
| 899 | (window-buffer start-window)) | 896 | (window-buffer start-window)) |
| 900 | (overlay-put mouse-drag-overlay 'window (selected-window))) | 897 | (overlay-put mouse-drag-overlay 'window (selected-window))) |
| 901 | (deactivate-mark) | 898 | (deactivate-mark) |
| 902 | ;; end-of-range is used only in the single-click case. | 899 | (let (event end end-point last-end-point) |
| 903 | ;; It is the place where the drag has reached so far | ||
| 904 | ;; (but not outside the window where the drag started). | ||
| 905 | (let (event end end-point last-end-point (end-of-range (point))) | ||
| 906 | (track-mouse | 900 | (track-mouse |
| 907 | (while (progn | 901 | (while (progn |
| 908 | (setq event (read-event)) | 902 | (setq event (read-event)) |
| @@ -924,8 +918,6 @@ at the same position." | |||
| 924 | ;; point jumps in the direction away from START-POINT. | 918 | ;; point jumps in the direction away from START-POINT. |
| 925 | (goto-char start-point) | 919 | (goto-char start-point) |
| 926 | (goto-char end-point) | 920 | (goto-char end-point) |
| 927 | (if (zerop (% click-count 3)) | ||
| 928 | (setq end-of-range (point))) | ||
| 929 | (let ((range (mouse-start-end start-point (point) click-count))) | 921 | (let ((range (mouse-start-end start-point (point) click-count))) |
| 930 | (move-overlay mouse-drag-overlay (car range) (nth 1 range)))) | 922 | (move-overlay mouse-drag-overlay (car range) (nth 1 range)))) |
| 931 | 923 | ||
| @@ -935,14 +927,10 @@ at the same position." | |||
| 935 | ((null mouse-row)) | 927 | ((null mouse-row)) |
| 936 | ((< mouse-row top) | 928 | ((< mouse-row top) |
| 937 | (mouse-scroll-subr start-window (- mouse-row top) | 929 | (mouse-scroll-subr start-window (- mouse-row top) |
| 938 | mouse-drag-overlay start-point) | 930 | mouse-drag-overlay start-point)) |
| 939 | ;; Without this, point tends to jump back to the starting | ||
| 940 | ;; position where the mouse button was pressed down. | ||
| 941 | (setq end-of-range (overlay-start mouse-drag-overlay))) | ||
| 942 | ((>= mouse-row bottom) | 931 | ((>= mouse-row bottom) |
| 943 | (mouse-scroll-subr start-window (1+ (- mouse-row bottom)) | 932 | (mouse-scroll-subr start-window (1+ (- mouse-row bottom)) |
| 944 | mouse-drag-overlay start-point) | 933 | mouse-drag-overlay start-point))))))))) |
| 945 | (setq end-of-range (overlay-end mouse-drag-overlay)))))))))) | ||
| 946 | 934 | ||
| 947 | ;; In case we did not get a mouse-motion event | 935 | ;; In case we did not get a mouse-motion event |
| 948 | ;; for the final move of the mouse before a drag event | 936 | ;; for the final move of the mouse before a drag event |
| @@ -957,8 +945,6 @@ at the same position." | |||
| 957 | ;; point jumps in the direction away from START-POINT. | 945 | ;; point jumps in the direction away from START-POINT. |
| 958 | (goto-char start-point) | 946 | (goto-char start-point) |
| 959 | (goto-char end-point) | 947 | (goto-char end-point) |
| 960 | (if (zerop (% click-count 3)) | ||
| 961 | (setq end-of-range (point))) | ||
| 962 | (let ((range (mouse-start-end start-point (point) click-count))) | 948 | (let ((range (mouse-start-end start-point (point) click-count))) |
| 963 | (move-overlay mouse-drag-overlay (car range) (nth 1 range)))) | 949 | (move-overlay mouse-drag-overlay (car range) (nth 1 range)))) |
| 964 | 950 | ||
| @@ -1492,7 +1478,6 @@ The function returns a non-nil value if it creates a secondary selection." | |||
| 1492 | (start-posn (event-start start-event)) | 1478 | (start-posn (event-start start-event)) |
| 1493 | (start-point (posn-point start-posn)) | 1479 | (start-point (posn-point start-posn)) |
| 1494 | (start-window (posn-window start-posn)) | 1480 | (start-window (posn-window start-posn)) |
| 1495 | (start-frame (window-frame start-window)) | ||
| 1496 | (bounds (window-edges start-window)) | 1481 | (bounds (window-edges start-window)) |
| 1497 | (top (nth 1 bounds)) | 1482 | (top (nth 1 bounds)) |
| 1498 | (bottom (if (window-minibuffer-p start-window) | 1483 | (bottom (if (window-minibuffer-p start-window) |
| @@ -2433,5 +2418,5 @@ and selects that window." | |||
| 2433 | (make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1") | 2418 | (make-obsolete 'mldrag-drag-vertical-line 'mouse-drag-vertical-line "21.1") |
| 2434 | (provide 'mldrag) | 2419 | (provide 'mldrag) |
| 2435 | 2420 | ||
| 2436 | ;;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 | 2421 | ;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 |
| 2437 | ;;; mouse.el ends here | 2422 | ;;; mouse.el ends here |