Permalink
Browse files

Fix syntax highlighting for variables containing keywords bounded by

underscores.

eg my_new_var was being highlighted in multiple colors.
  • Loading branch information...
1 parent 7e25b68 commit 1c8aea383f8dc6c32b3bec69b3ceb0363cf5f55f @chellmuth chellmuth committed Sep 23, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 coffee-mode.el
View
@@ -676,6 +676,9 @@ line? Returns `t' or `nil'. See the README for more details."
;; code for syntax highlighting
(setq font-lock-defaults '((coffee-font-lock-keywords)))
+ ;; treat "_" as part of a word
+ (modify-syntax-entry ?_ "w" coffee-mode-syntax-table)
+
;; perl style comment: "# ..."
(modify-syntax-entry ?# "< b" coffee-mode-syntax-table)
(modify-syntax-entry ?\n "> b" coffee-mode-syntax-table)

0 comments on commit 1c8aea3

Please sign in to comment.