mmm-mode | Multiple Major Mode for Emacs | Mehr ...
MMM Mode is a minor mode for Emacs that allows Multiple Major Modes (hence the name) to coexist in one buffer. It is particularly well-suited to editing embedded code, such as Mason server-side Perl, or HTML output in CGI scripts.