defunkt / coffee-mode

Emacs Major Mode for CoffeeScript
http://ozmm.org/posts/coffee_mode.html
574 stars 147 forks source link

Literal JS should be differently colored / indented / behaved #309

Closed tigerhawkvok closed 9 years ago

tigerhawkvok commented 9 years ago

Right now, it's just wrongly colored and behaves badly.

Regions fenced in by

# now a block of literal javascript
`
// JS Code
`

Should just be treated as a text string, with boring colors, rather than it breaking syntax highlighting the rest of the way down.

syohex commented 9 years ago

Is #310 OK ?

tigerhawkvok commented 9 years ago

@syohex yep

syohex commented 9 years ago

@tigerhawkvok I have reverted this change because someone does not want this feature. Please add following configuration for highlighting embedded Javascript as string.

(defun my/coffee-mode-hook ()
  (modify-syntax-entry ?` "\"" coffee-mode-syntax-table))
(add-hook 'coffee-mode-hook 'my/coffee-mode-hook)