Multi Mode is an implementation of the approach referred to in Emacs’ TODO. It probably only works in Emacs 21 and later.
- I have been using it with Emacs 23 with no issue. It also has 2009 in its copyright notice, so it seems like it is still being updated.
See also its uses in noweb.el and haskell-latex.el in the same directory.
Multiple Major Modes for XEmacs by JerryChen.
See EmacsLispAndLaTeX for an example.
Does two-mode-mode run on Emacs 23? I have tested it and it doesn’t change between modes.
I got it to work by changing the following:
- (if (string= to-mode mode-name) + (if (string= to-mode major-mode)
Seems to need the following in emacs 24 since make-local hook has been removed:
- (make-local-hook 'post-command-hook)
This is a built-in feature in Emacs. Indirect buffers feature does not exactly give multiple major modes in the same logical buffer but it gives user two (or more) different buffers which have their textual content linked together. To clone a buffer use
‘C-x 4 c’ and then use different major modes in the clones. See the Emacs reference manual for more information about indirect buffers. See IndirectBuffers.
Major Mode for PHP templates. Features: Syntax Highligthing and indentation according to the type of bloc ( PHP/ASPX/JSP/HTML/JS/CSS). Maintained by François-Xavier Bois. For PHP templates files.
What a shame that there are multiple multiple mode modes. As soon as you need mode X that requires multiple mode M1, while already using another mode which uses multiple mode M2, you’re loading far more than you need to. Just because TIMTOWTDI (sorry for the perl-ism) doesn’t mean you must do it more than one way.