(require 'mmm-auto)
(setq mmm-submode-decoration-level 2)
(mmm-add-group
'fancy-html
'((html-erb
:submode ruby-mode
:match-face (("<%#" . mmm-comment-submode-face)
("<%=" . mmm-output-submode-face)
("<%" . mmm-code-submode-face))
:front "<%[#=]?"
:back "%>"
:insert ((?% erb-code nil @ "<%" @ " " _ " " @ "%>" @)
(?# erb-comment nil @ "<%#" @ " " _ " " @ "%>" @)
(?= erb-expression nil @ "<%=" @ " " _ " " @ "%>" @)))))
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil fancy-html))
--
Best regards,
Dmitry Galinsky
http://dima-exe.ru
There was a thread about this a few days ago.
I use the rhtml mode from the rinari project:
http://rinari.rubyforge.org/
I'm only using the rhtml mode from rinari, and using emacs-on-rails
for everything else. It would be nice if those two project would
consider merging.
--
Peter Jones
http://pmade.com
Peter,
As I understand it, from a discussion at RubyConf, the same person is
maintaining both projects, so maybe there's hope of that in the
future.
- Clinton R. Nixon
(autoload 'rhtml-mode "rhtml-mode" "RHTML" t)
(add-to-list 'auto-mode-alist '("\\.rhtml$" . rhtml-mode))
(add-to-list 'auto-mode-alist '("\\.html\.erb$" . rhtml-mode))