   "Marks the next Haml sexp, but puts the mark at the end of the
 last line of the sexp rather than the first non-whitespace
 character of the next line."
-  (mark-sexp)
+  (let ((forward-sexp-function 'haml-forward-sexp))
+    (mark-sexp))
   (set-mark
    (save-excursion
      (goto-char (mark))

          (bolp)
          (looking-at "^[ \t]+$"))
      (backward-delete-char arg)
    (let ((ci (current-column)))
      (beginning-of-line)
      (if haml-backspace-backdents-nesting
          (haml-mark-sexp-but-not-next-line)
        (set-mark (save-excursion (end-of-line) (point))))
      (haml-reindent-region-by (* (- arg) haml-indent-offset))
      (back-to-indentation)
      (pop-mark))))

(defun haml-kill-line-and-indent ()
  "Kill the current line, and re-indent all lines nested beneath it."

  (set-syntax-table haml-mode-syntax-table)
  (set (make-local-variable 'indent-line-function) 'haml-indent-line)
  (set (make-local-variable 'indent-region-function) 'haml-indent-region)
  (setq indent-tabs-mode nil)
  (setq font-lock-defaults '((haml-font-lock-keywords) nil t)))

