 
 (defmacro jade-line-as-string ()
   "Returns the current line as a string."
-  `(buffer-substring (point-at-bol) (point-at-eol)))
-
+  `(buffer-substring-no-properties (point-at-bol) (point-at-eol)))
 
 (defun jade-empty-line-p ()
   "If line is empty or not."
   (= (point-at-eol) (point-at-bol)))
 
 (defun jade-blank-line-p ()
-  "If line contains only spaces."
-  (string-match-p "^[ ]*$" (jade-line-as-string)))
+  "Returns t when line contains only whitespace chars, nil otherwise."
+  (string-match-p "^\\s-*$" (jade-line-as-string)))
 
 ;; command to comment/uncomment text
 (defun jade-comment-dwim (arg)

      (next-line)
      (end-of-line))))

(defvar jade-mode-map (make-sparse-keymap))

;; mode declaration


  ;; modify the keymap
  (define-key jade-mode-map [remap comment-dwim] 'jade-comment-dwim)
  (define-key jade-mode-map [tab] 'jade-indent)
  (define-key jade-mode-map [backtab] 'jade-unindent)
  (define-key jade-mode-map (kbd "RET") 'jade-newline-and-indent)

  ;; highlight syntax
  (setq font-lock-defaults '(jade-font-lock-keywords)))


;;;###autoload
(add-to-list 'auto-mode-alist '("\\.jade$" . jade-mode))

(provide 'jade-mode)
;;; jade-mode.el ends here

