 Hitting C-k C-k C-k here will killall three lines, and then C-y
 will insert them back verbatim."
   (interactive)
-  (shm/reparse)
-  (when (looking-at "[ ]+$")
-    (delete-region (point) (line-end-position)))
-  (cond
-   ((and (= (point) (line-end-position))
-         (not (looking-at "\n[^ ]")))
-    (let ((column (current-column)))
-      (delete-region (point)
-                     (save-excursion (forward-line 1)
-                                     (goto-char (+ (line-beginning-position)
-                                                   column))))
-      (shm-kill-to-end-of-line t)))
-   ((shm-current-node) (shm-kill-to-end-of-line))
-   (t (kill-line))))
+  (shm-with-fallback
+   kill-line
+   (shm/reparse)
+   (when (looking-at "[ ]+$")
+     (delete-region (point) (line-end-position)))
+   (cond
+    ((and (= (point) (line-end-position))
+          (not (looking-at "\n[^ ]")))
+     (let ((column (current-column)))
+       (delete-region (point)
+                      (save-excursion (forward-line 1)
+                                      (goto-char (+ (line-beginning-position)
+                                                    column))))
+       (shm-kill-to-end-of-line t)))
+    ((shm-current-node) (shm-kill-to-end-of-line))
+    (t (kill-line)))))
 
 (defun shm/kill-node ()
   "Kill the current node."

  (interactive)
  (if (bound-and-true-p god-local-mode)
      (god-mode-self-insert)
      (cond
       ((looking-back "[^a-zA-Z0-9_]case")
        (let ((start (save-excursion (forward-char -1)
                                     (search-backward-regexp "[^a-zA-Z0-9_]")
                                     (forward-char 1)
                                     (point)))
              (template "case  of
  _ -> undefined"))
          (shm-adjust-dependents (point) (- start (point)))
          (delete-region start (point))
          (shm-adjust-dependents (point) (length (car (last (split-string template "\n")))))
          (shm-insert-indented
           (lambda ()
             (insert template)))
          (forward-char 5)))
       ((looking-back "[^a-zA-Z0-9_]if")
        (let ((start (save-excursion (forward-char -1)
                                     (search-backward-regexp "[^a-zA-Z0-9_]")
                                     (forward-char 1)
                                     (point)))
              (template (if (looking-at "$")
                            "if \n   then undefined\n   else undefined"
                          "if  then undefined else undefined")))
          (shm-adjust-dependents (point) (- start (point)))
          (delete-region start (point))
          (shm-adjust-dependents (point) (length (car (last (split-string template "\n")))))
          (shm-insert-indented
           (lambda ()
             (insert template)))
          (forward-char 3)))
       (t (shm-insert-string " ")))))

(defun shm/double-quote ()
  "Insert double quotes.



;; Macros

(defmacro shm-with-fallback (fallback &rest body)
  "Perform the given action unless we're in a comment, in which
  case run the fallback function insteaad."
  `(if (shm-in-comment)
       (call-interactively ',fallback)
     (progn ,@body)))


;; Internal mode functions

(defun shm-mode-start ()
