 
   ;; modify the keymap
   (define-key jade-mode-map [remap comment-dwim] 'jade-comment-dwim)
-
-  ;; 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
-
   (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
+

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

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

;; mode declaration


(defmacro jade-line-as-string ()
  "Returns the current line as a string."
  `(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 ()
  "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)
