summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-10-01 07:30:18 +0000
committerRichard M. Stallman <rms@gnu.org>1994-10-01 07:30:18 +0000
commita94c7fcc9c4f1837563aee9fbcf7999769955cc9 (patch)
treec185367733e951c5ecf311db1fdbc7dfcf77d91a /lisp/mouse.el
parenta0efd88707070f9fef57ab8309ae2d6650e1301d (diff)
downloademacs-a94c7fcc9c4f1837563aee9fbcf7999769955cc9.tar.gz
(mouse-secondary-click-count): New variable.
(mouse-secondary-save-then-kill, mouse-drag-secondary): Use mouse-secondary-click-count, not mouse-selection-click-count.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el10
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."
;; May be nil.
(defvar mouse-secondary-overlay nil)
+(defvar mouse-secondary-click-count 0)
+
;; A marker which records the specified first end for a secondary selection.
;; May be nil.
(defvar mouse-secondary-start nil)
@@ -694,7 +696,7 @@ This must be bound to a button-down mouse event."
(click-count (1- (event-click-count start-event))))
(save-excursion
(set-buffer (window-buffer start-window))
- (setq mouse-selection-click-count click-count)
+ (setq mouse-secondary-click-count click-count)
(or mouse-secondary-overlay
(setq mouse-secondary-overlay
(make-overlay (point) (point))))
@@ -825,14 +827,14 @@ again. If you do this twice in the same position, it kills the selection."
(error "Wrong buffer"))
(save-excursion
(set-buffer (window-buffer (posn-window posn)))
- (if (> (mod mouse-selection-click-count 3) 0)
+ (if (> (mod mouse-secondary-click-count 3) 0)
(if (not (and (eq last-command 'mouse-secondary-save-then-kill)
(equal click-posn
(car (cdr-safe (cdr-safe mouse-save-then-kill-posn))))))
;; Find both ends of the object selected by this click.
(let* ((range
(mouse-start-end click-posn click-posn
- mouse-selection-click-count)))
+ mouse-secondary-click-count)))
;; Move whichever end is closer to the click.
;; That's what xterm does, and it seems reasonable.
(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."
(overlay-start mouse-secondary-overlay)
(overlay-end mouse-secondary-overlay))
(setq mouse-save-then-kill-posn nil)
- (setq mouse-selection-click-count 0)
+ (setq mouse-secondary-click-count 0)
(delete-overlay mouse-secondary-overlay)))
(if (and (eq last-command 'mouse-secondary-save-then-kill)
mouse-save-then-kill-posn