   "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))

  (let ((map (make-sparse-keymap)))
    (define-key map [backspace] 'haml-electric-backspace)
    (define-key map "\C-?" 'haml-electric-backspace)
    (define-key map "\C-\M-f" 'haml-forward-sexp)
    (define-key map "\C-\M-b" 'haml-backward-sexp)
    (define-key map "\C-\M-u" 'haml-up-list)
    (define-key map "\C-\M-d" 'haml-down-list)
    (define-key map "\C-C\C-k" 'haml-kill-line-and-indent)
    map))

;;;###autoload

  (kill-line 1)
  (haml-reindent-region-by (* -1 haml-indent-offset)))

(defun haml-indent-string ()
  "Return the indentation string for `haml-indent-offset'."
  (mapconcat 'identity (make-list haml-indent-offset " ") ""))

;; Setup/Activation

(provide 'haml-mode)
