aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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."
128 ;; Turn off the old mark when we set up an empty region. 128 ;; Turn off the old mark when we set up an empty region.
129 (setq deactivate-mark t))) 129 (setq deactivate-mark t)))
130 130
131;;;Nice hack, but too slow. 131;;;Nice hack, but too slow, so not normally in use.
132;;;(defun mouse-drag-region-1 (click) 132(defun mouse-drag-region-1 (click)
133;;; "Set the region to the text that the mouse is dragged over. 133 "Set the region to the text that the mouse is dragged over.
134;;;This must be bound to a button-down mouse event." 134This must be bound to a button-down mouse event."
135;;; (interactive "e") 135 (interactive "e")
136;;; (let (newmark) 136 (let (newmark)
137;;; (let ((posn (event-start click)) 137 (let ((posn (event-start click))
138;;; done event omark (mark-active t)) 138 done event omark (mark-active t))
139;;; (select-window (posn-window posn)) 139 (select-window (posn-window posn))
140;;; (setq omark (and mark-active (mark))) 140 (setq omark (and mark-active (mark)))
141;;; (if (numberp (posn-point posn)) 141 (if (numberp (posn-point posn))
142;;; (goto-char (posn-point posn))) 142 (goto-char (posn-point posn)))
143;;; ;; Set mark temporarily, so highlighting does what we want. 143 ;; Set mark temporarily, so highlighting does what we want.
144;;; (set-marker (mark-marker) (point)) 144 (set-marker (mark-marker) (point))
145;;; (track-mouse 145 (track-mouse
146;;; (while (not done) 146 (while (not done)
147;;; (setq event (read-event)) 147 (setq event (read-event))
148;;; (if (eq (car-safe event) 'mouse-movement) 148 (if (eq (car-safe event) 'mouse-movement)
149;;; (goto-char (posn-point (event-start event))) 149 (goto-char (posn-point (event-start event)))
150;;; ;; Exit when we get the drag event; ignore that event. 150 ;; Exit when we get the drag event; ignore that event.
151;;; (setq done t)))) 151 (setq done t))))
152;;; (if (/= (mark) (point)) 152 (if (/= (mark) (point))
153;;; (setq newmark (mark))) 153 (setq newmark (mark)))
154;;; ;; Restore previous mark status. 154 ;; Restore previous mark status.
155;;; (if omark (set-marker (mark-marker) omark))) 155 (if omark (set-marker (mark-marker) omark)))
156;;; ;; Now, if we dragged, set the mark at the proper place. 156 ;; Now, if we dragged, set the mark at the proper place.
157;;; (if newmark 157 (if newmark
158;;; (push-mark newmark t) 158 (push-mark newmark t t)
159;;; ;; Turn off the old mark when we set up an empty region. 159 ;; Turn off the old mark when we set up an empty region.
160;;; (setq deactivate-mark t)))) 160 (setq deactivate-mark t))))
161 161
162(defun mouse-set-mark (click) 162(defun mouse-set-mark (click)
163 "Set mark at the position clicked on with the mouse. 163 "Set mark at the position clicked on with the mouse.