aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-08-11 06:17:43 +0000
committerRichard M. Stallman1993-08-11 06:17:43 +0000
commit2a5fa27beb0bd95868c2ebdb7dd7eeac79f745b1 (patch)
tree959f469c7bf35365ef5130800e18d3fb95d9ebb9
parent915cfd1f4df26c37c1062fa069a991ceffcee81a (diff)
downloademacs-2a5fa27beb0bd95868c2ebdb7dd7eeac79f745b1.tar.gz
emacs-2a5fa27beb0bd95868c2ebdb7dd7eeac79f745b1.zip
(mouse-set-point): Use event-end, not event-start.
-rw-r--r--lisp/mouse.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 76d2828cddc..d8a6efc5f56 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -91,11 +91,13 @@ This command must be bound to a mouse click."
91 (split-window-horizontally 91 (split-window-horizontally
92 (min (max new-width first-col) last-col)))))) 92 (min (max new-width first-col) last-col))))))
93 93
94(defun mouse-set-point (click) 94(defun mouse-set-point (event)
95 "Move point to the position clicked on with the mouse. 95 "Move point to the position clicked on with the mouse.
96This must be bound to a mouse click." 96This should be bound to a mouse click event type."
97 (interactive "e") 97 (interactive "e")
98 (let ((posn (event-start click))) 98 ;; Use event-end in case called from mouse-drag-region.
99 ;; If EVENT is a click, event-end and event-start give same value.
100 (let ((posn (event-end event)))
99 (and (window-minibuffer-p (posn-window posn)) 101 (and (window-minibuffer-p (posn-window posn))
100 (not (minibuffer-window-active-p (posn-window posn))) 102 (not (minibuffer-window-active-p (posn-window posn)))
101 (error "Minibuffer window is not active")) 103 (error "Minibuffer window is not active"))
@@ -105,7 +107,7 @@ This must be bound to a mouse click."
105 107
106(defun mouse-set-region (click) 108(defun mouse-set-region (click)
107 "Set the region to the text that the mouse is dragged over. 109 "Set the region to the text that the mouse is dragged over.
108This must be bound to a mouse drag event." 110This should be bound to a mouse drag event."
109 (interactive "e") 111 (interactive "e")
110 (let ((posn (event-start click)) 112 (let ((posn (event-start click))
111 (end (event-end click))) 113 (end (event-end click)))