   (setq mode-name "Stylus")
   (setq major-mode 'stylus-mode)
 
+  ;; highlight syntax
+  (setq font-lock-defaults '(stylus-font-lock-keywords))
+
+  ;; comments
+  (modify-syntax-entry ?\/ ". 124b")
+  (modify-syntax-entry ?* ". 23")
+  (modify-syntax-entry ?\n "> b")
+  (set (make-local-variable 'comment-start) "//")
+  (set (make-local-variable 'comment-end) "")
+
   ;; default tab width
   (setq sws-tab-width 2)
   (make-local-variable 'indent-line-function)


  (setq indent-region-function 'sws-indent-region)


  ;; keymap
  (use-local-map stylus-mode-map)

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

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

     '("return" "if" "else" "unless" "for" "in" "true" "false")))
  "Stylus keywords.")

(defvar stylus-font-lock-keywords
  `(
    (,"^[ {2,}]+[a-z0-9_:\\-]+[ ]" 0 font-lock-variable-name-face)
    (,"\\(::?\\(root\\|nth-child\\|nth-last-child\\|nth-of-type\\|nth-last-of-type\\|first-child\\|last-child\\|first-of-type\\|last-of-type\\|only-child\\|only-of-type\\|empty\\|link\\|visited\\|active\\|hover\\|focus\\|target\\|lang\\|enabled\\|disabled\\|checked\\|not\\)\\)*" . font-lock-type-face) ;; pseudoSelectors
    (,(concat "[^_$]?\\<\\(" stylus-colours "\\)\\>[^_]?")
     0 font-lock-constant-face)
    (,(concat "[^_$]?\\<\\(" stylus-keywords "\\)\\>[^_]?")
     0 font-lock-keyword-face)
    (,"\\([0-9]+:?\\(em\\|ex\\|px\\|mm\\|cm\\|in\\|pt\\|pc\\|deg\\|rad\\|grad\\|ms\\|s\\|Hz\\|kHz\\|rem\\|%\\)\\)" 0 font-lock-constant-face)
    (,"#\\w+" 0 font-lock-keyword-face)
    (,"$\\w+" 0 font-lock-variable-name-face)
    ))

(defun stylus-region-for-sexp ()
  "Selects the current sexp as the region"
