diff options
| author | Richard M. Stallman | 1994-10-01 07:30:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-01 07:30:18 +0000 |
| commit | a94c7fcc9c4f1837563aee9fbcf7999769955cc9 (patch) | |
| tree | c185367733e951c5ecf311db1fdbc7dfcf77d91a | |
| parent | a0efd88707070f9fef57ab8309ae2d6650e1301d (diff) | |
| download | emacs-a94c7fcc9c4f1837563aee9fbcf7999769955cc9.tar.gz emacs-a94c7fcc9c4f1837563aee9fbcf7999769955cc9.zip | |
(mouse-secondary-click-count): New variable.
(mouse-secondary-save-then-kill, mouse-drag-secondary):
Use mouse-secondary-click-count, not mouse-selection-click-count.
| -rw-r--r-- | lisp/mouse.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index eb67ef7ee35..7ae15deb57f 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -636,6 +636,8 @@ If you do this twice in the same position, the selection is killed." | |||
| 636 | ;; May be nil. | 636 | ;; May be nil. |
| 637 | (defvar mouse-secondary-overlay nil) | 637 | (defvar mouse-secondary-overlay nil) |
| 638 | 638 | ||
| 639 | (defvar mouse-secondary-click-count 0) | ||
| 640 | |||
| 639 | ;; A marker which records the specified first end for a secondary selection. | 641 | ;; A marker which records the specified first end for a secondary selection. |
| 640 | ;; May be nil. | 642 | ;; May be nil. |
| 641 | (defvar mouse-secondary-start nil) | 643 | (defvar mouse-secondary-start nil) |
| @@ -694,7 +696,7 @@ This must be bound to a button-down mouse event." | |||
| 694 | (click-count (1- (event-click-count start-event)))) | 696 | (click-count (1- (event-click-count start-event)))) |
| 695 | (save-excursion | 697 | (save-excursion |
| 696 | (set-buffer (window-buffer start-window)) | 698 | (set-buffer (window-buffer start-window)) |
| 697 | (setq mouse-selection-click-count click-count) | 699 | (setq mouse-secondary-click-count click-count) |
| 698 | (or mouse-secondary-overlay | 700 | (or mouse-secondary-overlay |
| 699 | (setq mouse-secondary-overlay | 701 | (setq mouse-secondary-overlay |
| 700 | (make-overlay (point) (point)))) | 702 | (make-overlay (point) (point)))) |
| @@ -825,14 +827,14 @@ again. If you do this twice in the same position, it kills the selection." | |||
| 825 | (error "Wrong buffer")) | 827 | (error "Wrong buffer")) |
| 826 | (save-excursion | 828 | (save-excursion |
| 827 | (set-buffer (window-buffer (posn-window posn))) | 829 | (set-buffer (window-buffer (posn-window posn))) |
| 828 | (if (> (mod mouse-selection-click-count 3) 0) | 830 | (if (> (mod mouse-secondary-click-count 3) 0) |
| 829 | (if (not (and (eq last-command 'mouse-secondary-save-then-kill) | 831 | (if (not (and (eq last-command 'mouse-secondary-save-then-kill) |
| 830 | (equal click-posn | 832 | (equal click-posn |
| 831 | (car (cdr-safe (cdr-safe mouse-save-then-kill-posn)))))) | 833 | (car (cdr-safe (cdr-safe mouse-save-then-kill-posn)))))) |
| 832 | ;; Find both ends of the object selected by this click. | 834 | ;; Find both ends of the object selected by this click. |
| 833 | (let* ((range | 835 | (let* ((range |
| 834 | (mouse-start-end click-posn click-posn | 836 | (mouse-start-end click-posn click-posn |
| 835 | mouse-selection-click-count))) | 837 | mouse-secondary-click-count))) |
| 836 | ;; Move whichever end is closer to the click. | 838 | ;; Move whichever end is closer to the click. |
| 837 | ;; That's what xterm does, and it seems reasonable. | 839 | ;; That's what xterm does, and it seems reasonable. |
| 838 | (if (< (abs (- click-posn (overlay-start mouse-secondary-overlay))) | 840 | (if (< (abs (- click-posn (overlay-start mouse-secondary-overlay))) |
| @@ -858,7 +860,7 @@ again. If you do this twice in the same position, it kills the selection." | |||
| 858 | (overlay-start mouse-secondary-overlay) | 860 | (overlay-start mouse-secondary-overlay) |
| 859 | (overlay-end mouse-secondary-overlay)) | 861 | (overlay-end mouse-secondary-overlay)) |
| 860 | (setq mouse-save-then-kill-posn nil) | 862 | (setq mouse-save-then-kill-posn nil) |
| 861 | (setq mouse-selection-click-count 0) | 863 | (setq mouse-secondary-click-count 0) |
| 862 | (delete-overlay mouse-secondary-overlay))) | 864 | (delete-overlay mouse-secondary-overlay))) |
| 863 | (if (and (eq last-command 'mouse-secondary-save-then-kill) | 865 | (if (and (eq last-command 'mouse-secondary-save-then-kill) |
| 864 | mouse-save-then-kill-posn | 866 | mouse-save-then-kill-posn |