
(global-set-key [left] 'd-movement-left)

(defun d-movement-left ()
  (interactive)
  (if (not (d-movement--is-correct-mode))
      (backward-char)
    (if (> (current-column) 0)
        (backward-char 1)
      (beep))))

(global-set-key [right] 'd-movement-right)

(defun d-movement-right ()
  (interactive)
  (forward-char 1))

(provide 'd-movement-leftright)
