              (acme-select-region)))
   (setq transient-mark-mode (cons 'only t))
   (setq acme-last-command 'none))
+
+;; called if mouse moves between button down and up
+(defun acme-drag-mouse-1 (click)
+  (interactive "e")
+  (if (eq acme-last-command 'none)
+      (mouse-set-region click))
+  (acme-mouse-1 click))
 
 (defun acme-select-region ()
   (let ((range (mouse-start-end (mark) (point) mouse-selection-click-count)))

      (mouse-set-point click))
  (setq transient-mark-mode (cons 'only t))
  (setq acme-last-command 'none))

;; called if mouse moves between button down and up
(defun acme-drag-mouse-1 (click)
  (interactive "e")
  (if (eq acme-last-command 'none)
      (mouse-set-region click))
  (acme-mouse-1 click))

(defun acme-double-mouse-1 (click)
  (interactive "e")

;; Clicks in the gutter/margin don't seem to work right

;; Sometimes the region is active after the command, when we don't
;; want it to be. Leads to large highlighted regions. Goes away after
;; a click.

(require 'cl)

