aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1996-09-25 03:27:04 +0000
committerRichard M. Stallman <[email protected]>1996-09-25 03:27:04 +0000
commitefc10c970d235ee7ba7eef65ece98e89295abcde (patch)
tree6e00897c4b3bd303fc30b3bd671441db2ead9288
parent84f6296af5844c709d004ce9ab135e698dbd21f3 (diff)
(mouse-drag-secondary): Make sure to return nil
if we don't make a selection.
-rw-r--r--lisp/mouse.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index ef41a38caa..de0735529f 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1021,7 +1021,8 @@ This must be bound to a mouse drag event."
(defun mouse-drag-secondary (start-event)
"Set the secondary selection to the text that the mouse is dragged over.
Highlight the drag area as you move the mouse.
-This must be bound to a button-down mouse event."
+This must be bound to a button-down mouse event.
+The function returns a non-nil value if it creates a secondary selection."
(interactive "e")
(mouse-minibuffer-check start-event)
(let* ((echo-keystrokes 0)
@@ -1092,9 +1093,6 @@ This must be bound to a button-down mouse event."
mouse-secondary-overlay start-point)))))))))
(if (consp event)
-;;; (eq (get (event-basic-type event) 'event-kind) 'mouse-click)
-;;; (eq (posn-window (event-end event)) start-window)
-;;; (numberp (posn-point (event-end event)))
(if (marker-position mouse-secondary-start)
(save-window-excursion
(delete-overlay mouse-secondary-overlay)
@@ -1102,7 +1100,8 @@ This must be bound to a button-down mouse event."
(select-window start-window)
(save-excursion
(goto-char mouse-secondary-start)
- (sit-for 1)))
+ (sit-for 1)
+ nil))
(x-set-selection
'SECONDARY
(buffer-substring (overlay-start mouse-secondary-overlay)