I downloaded nxhtml and unzip it. I then put this in my .emacs file.
(add-to-list 'load-path "~/nxhtml/util")
(require 'mumamo-fun)
(setq mumamo-chunk-coloring 'submode-colored)
(add-to-list 'auto-mode-alist '("\\.rhtml\\'" . eruby-nxhtml-mumamo-mode))
(add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . eruby-nxhtml-mumamo-mode))
When I open an .html.erb file it does not have the proper mode set(and therefore improper syntax highlighting). I know the require statement is running correctly b/c I can manually set aquamacs to eruby-nxhtml-mumamo-mode and if I comment out the require line I can't even switch to that mode. I have even tried replacing the eruby...-mode with other modes like c++-mode and other modes I know work and that doesn't work either.
So is my problem with the regex? I am not sure. Any help would be appreciated.
Try the following:
(add-to-list 'auto-mode-alist '("\\.rhtml?$" . eruby-nxhtml-mumamo-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\.erb$" . eruby-nxhtml-mumamo-mode))
It appears you had an escaped comma at the end of your expressions.
I don't know if the lack of the 'l' in your header was intentional or not, but the question mark should account for it either way. The dollar sign anchors the expression to the end of the string, and are nominally optional, but it's nice to be explicit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With