   "Run the last stored command in visual mode given CURSOR and REGION."
   (let* ((cmd (emc-get-command-name))
          (region (emc-get-cursor-region cursor))
+         (region-type (emc-get-region-type region))
          (repeat-type (evil-get-command-property cmd :repeat)))
     (when emc-debug (message "CMD-VISUAL %s" cmd))
     (cond ((or (eq cmd 'exchange-point-and-mark)

    (overlay-put overlay 'priority 98)
    overlay))

(defun emc-make-region-overlay (mark point)
  "Make a visual region overlay from MARK to POINT."
  (let* ((start (if (< mark point) mark point))
         (end (if (< mark point) point mark))
         (overlay (make-overlay start end nil nil nil)))
    (overlay-put overlay 'face 'emc-region-face)
    (overlay-put overlay 'type 'emc-fake-region)
    (overlay-put overlay 'priority 99)
    (overlay-put overlay 'mark mark)
    (overlay-put overlay 'point point)
    overlay))

(defun emc-remove-all-overlays ()

  (interactive)
  (remove-overlays)
  (setq emc-cursor-list nil))

(defun emc-get-region-type (region)
  "Return the REGION's type."
  (when region (overlay-get region 'type)))

(defun emc-get-region-mark (region)
  "Return the REGION's mark."
