From: Alan Chen Date: 2002-01-10T09:17:47+09:00 Subject: eruby and emacs mmm-mode Just thought I'd share this neat little hint for those of you that are creating eruby files with emacs. There's a emacs mode availiable called mmm-mode. It allows you to have a major mode and a submode active. For my eruby files, I have SGML-mode active with ruby-mode between the <% and %> marks. Its nice. The following is what I'm running locally to configure mmm. I'm using the Debian testing distro with apt provided emacs21 and mmm-mode. # this line in my .emacs, prepend your desired path (load "add-my-mmm-mode.el") # the add-my-mmm-mode.el file (require 'mmm-auto) (setq mmm-global-mode 'maybe) (mmm-add-classes '((eruby :submode ruby-mode ; :face mmm-declaration-submode-face :front "<%[=]?" :back "%>"))) ;(mmm-add-mode-ext-class MODE EXTENSION CLASS) (mmm-add-mode-ext-class 'sgml-mode "\\.rhtml$" 'eruby) Have fun, -- alan