                      vimgolf-pause
                      vimgolf-quit)))))
 
+(defun vimgolf-capturable-dangling-keystroke-p ()
+  (member this-command
+          '(calc-dispatch)))
+
 (defun vimgolf-capture-keystroke ()
   (vimgolf-with-saved-command-environment
    (when (vimgolf-capturable-keystroke-p)

       (insert (key-description (this-command-keys)))
       (insert " ")))))

(defun vimgolf-capture-keystrokes ()
  (add-hook 'pre-command-hook 'vimgolf-capture-keystroke))

(defun vimgolf-stop-capture-keystrokes ()
  (remove-hook 'pre-command-hook 'vimgolf-capture-keystroke))

(defun vimgolf-right-solution ()
  (message "Hurray!")

    (vimgolf-mode t)))

(defun vimgolf-kill-existing-session ()
  (when (get-buffer vimgolf-start-buffer-name) (kill-buffer vimgolf-start-buffer-name))
  (when (get-buffer vimgolf-work-buffer-name) (kill-buffer vimgolf-work-buffer-name))
  (when (get-buffer vimgolf-end-buffer-name) (kill-buffer vimgolf-end-buffer-name))
  (when (get-buffer vimgolf-keystrokes-buffer-name) (kill-buffer vimgolf-keystrokes-buffer-name))
  (when (get-buffer vimgolf-keystrokes-log-buffer-name) (kill-buffer vimgolf-keystrokes-log-buffer-name)))

;;;###autoload
(defun vimgolf (challenge-id)
