comparison lisp/mouse.el @ 7901:28f9608f3c58

(mouse-drag-region): Bind last-command, not this-command.
author Karl Heuer <kwzh@gnu.org>
date Wed, 15 Jun 1994 03:55:42 +0000
parents 44680acb5d14
children ac4b606bcfa2
comparison
equal deleted inserted replaced
7900:60795e826dad 7901:28f9608f3c58
250 (numberp (posn-point (event-end event)))) 250 (numberp (posn-point (event-end event))))
251 (let ((fun (key-binding (vector (car event))))) 251 (let ((fun (key-binding (vector (car event)))))
252 (if (memq fun '(mouse-set-region mouse-set-point)) 252 (if (memq fun '(mouse-set-region mouse-set-point))
253 (if (not (= (overlay-start mouse-drag-overlay) 253 (if (not (= (overlay-start mouse-drag-overlay)
254 (overlay-end mouse-drag-overlay))) 254 (overlay-end mouse-drag-overlay)))
255 (let (this-command) 255 (let (last-command)
256 (push-mark (overlay-start mouse-drag-overlay) t t) 256 (push-mark (overlay-start mouse-drag-overlay) t t)
257 (goto-char (overlay-end mouse-drag-overlay)) 257 (goto-char (overlay-end mouse-drag-overlay))
258 (copy-region-as-kill (point) (mark t))) 258 (copy-region-as-kill (point) (mark t)))
259 (goto-char (overlay-end mouse-drag-overlay)) 259 (goto-char (overlay-end mouse-drag-overlay))
260 (setq this-command 'mouse-set-point)) 260 (setq this-command 'mouse-set-point))