Next: , Previous: nXhtml-Mode, Up: Rhtml Setup

2.2.2 MuMaMo-Mode

MuMaMo-Mode allow Multiple Major Modes in a single Emacs buffer. For more information see

MuMaMo-Mode comes bundled with nXhtml-Mode, so to install it download nXhtml-Mode from To use MuMaMo-Mode when editing rhtml files, save the resulting directory into your elisp directory, then add the following to your Emacs init file (replacing “nxml-directory” with the name of your downloaded nxml directory).

     ;; MuMaMo-Mode for rhtml files
     (add-to-list 'load-path "~/path/to/your/elisp/nxml-directory/util")
     (require 'mumamo-fun)
     (setq mumamo-chunk-coloring 'submode-colored)
     (add-to-list 'auto-mode-alist '("\\.rhtml\\'" . eruby-html-mumamo))
     (add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . eruby-html-mumamo))