How to set nxhtml-mumamo in file

Asked by allan

I just started using nxhtml, and I typically direct emacs to choose the correct mode using modespecifiers at the top of the file. (http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html)

So, as an example, for my perlscripts I typically add a hint at the top of the file:
#!/usr/bin/env perl
# -*- cperl -*-

I tried <?php // -*- mode: nxhtml-mumamo -*-
but that didn't work. Are multi modes different somehow?

Thanks
Allan

Question information

Language:
English Edit question
Status:
Solved
For:
nXhtml Edit question
Assignee:
No assignee Edit question
Solved by:
lborgman
Solved:
Last query:
Last reply:
Revision history for this message
Best lborgman (lennart-borgman) said :
#1

Hi allan,

Yes, multi major modes are different, but that is not the trouble here. It is rather an unnecessary optimization someone made long ago. If you look at the message you get it says

   Ignoring unknown mode `nxhtml-mumamo-mode'

So someone saved you from typing the five characters "-mode" ... ;-) -- I will try to get this changed in Emacs.

But anyway there is perhaps a much better way to handle this. I have added something I call "Major Mode Priorities". This reorders the list Emacs uses to choose major modes. This reordering is done according to the option majmodpri-mode-priorities. In this list nxhtml-mumamo has higher priority than php-mode.

You can find "Major Mode Priorities" in the nXhtml menu under "Tools". Note that there is to ways to do the reordering: manually from the menus, or by customizing the option majmodpri-sort-after-load.

Revision history for this message
allan (allan-peda) said :
#2

Thanks lborgman, that solved my question.

Revision history for this message
lborgman (lennart-borgman) said :
#3

After some discussion on Emacs Devel I decided to use "-mumamo-mode" for instead of "-mumamo" for multi major modes.