summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-06-08 05:16:47 +0000
committerRichard M. Stallman <rms@gnu.org>1993-06-08 05:16:47 +0000
commit0f2e5ba78d8e6571d2f2b8858429f724ed767d32 (patch)
tree210f66922c6fe2b0fe44191eeb594ddb05e901e9 /lisp/mouse.el
parentf91dc1be7dcc50b6908d473e8cd24fcbfcd524e3 (diff)
downloademacs-0f2e5ba78d8e6571d2f2b8858429f724ed767d32.tar.gz
(mouse-drag-region-1): Un-comment-out this function.
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el60
1 files changed, 30 insertions, 30 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 80a7c0436f8..5f2a0e9a694 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -128,36 +128,36 @@ This must be bound to a button-down mouse event."
;; Turn off the old mark when we set up an empty region.
(setq deactivate-mark t)))
-;;;Nice hack, but too slow.
-;;;(defun mouse-drag-region-1 (click)
-;;; "Set the region to the text that the mouse is dragged over.
-;;;This must be bound to a button-down mouse event."
-;;; (interactive "e")
-;;; (let (newmark)
-;;; (let ((posn (event-start click))
-;;; done event omark (mark-active t))
-;;; (select-window (posn-window posn))
-;;; (setq omark (and mark-active (mark)))
-;;; (if (numberp (posn-point posn))
-;;; (goto-char (posn-point posn)))
-;;; ;; Set mark temporarily, so highlighting does what we want.
-;;; (set-marker (mark-marker) (point))
-;;; (track-mouse
-;;; (while (not done)
-;;; (setq event (read-event))
-;;; (if (eq (car-safe event) 'mouse-movement)
-;;; (goto-char (posn-point (event-start event)))
-;;; ;; Exit when we get the drag event; ignore that event.
-;;; (setq done t))))
-;;; (if (/= (mark) (point))
-;;; (setq newmark (mark)))
-;;; ;; Restore previous mark status.
-;;; (if omark (set-marker (mark-marker) omark)))
-;;; ;; Now, if we dragged, set the mark at the proper place.
-;;; (if newmark
-;;; (push-mark newmark t)
-;;; ;; Turn off the old mark when we set up an empty region.
-;;; (setq deactivate-mark t))))
+;;;Nice hack, but too slow, so not normally in use.
+(defun mouse-drag-region-1 (click)
+ "Set the region to the text that the mouse is dragged over.
+This must be bound to a button-down mouse event."
+ (interactive "e")
+ (let (newmark)
+ (let ((posn (event-start click))
+ done event omark (mark-active t))
+ (select-window (posn-window posn))
+ (setq omark (and mark-active (mark)))
+ (if (numberp (posn-point posn))
+ (goto-char (posn-point posn)))
+ ;; Set mark temporarily, so highlighting does what we want.
+ (set-marker (mark-marker) (point))
+ (track-mouse
+ (while (not done)
+ (setq event (read-event))
+ (if (eq (car-safe event) 'mouse-movement)
+ (goto-char (posn-point (event-start event)))
+ ;; Exit when we get the drag event; ignore that event.
+ (setq done t))))
+ (if (/= (mark) (point))
+ (setq newmark (mark)))
+ ;; Restore previous mark status.
+ (if omark (set-marker (mark-marker) omark)))
+ ;; Now, if we dragged, set the mark at the proper place.
+ (if newmark
+ (push-mark newmark t t)
+ ;; Turn off the old mark when we set up an empty region.
+ (setq deactivate-mark t))))
(defun mouse-set-mark (click)
"Set mark at the position clicked on with the mouse.