366

professional dilettante

Changing the appearance of Emacs MuMaMo (nxhtml/php)

If you don’t need an explanation of MuMaMo, here’s the gist – do  M-x customize-group [return] mumamo [return] This brings up the group customization options for MuMaMo. Among other things, you can change the definition of ‘MuMaMo Background Chunk Submode Face’ and ‘MuMaMo Background Chunk MajorMode Face’.  If you haven’t worked with Emacs Customization groups [...]

If you don’t need an explanation of MuMaMo, here’s the gist – do

 M-x customize-group [return]
mumamo [return]

This brings up the group customization options for MuMaMo. Among other things, you can change the definition of ‘MuMaMo Background Chunk Submode Face’ and ‘MuMaMo Background Chunk MajorMode Face’.  If you haven’t worked with Emacs Customization groups before, it can be confusing. But persevere, the settings you want are likely in there.  After you change the Face definition, you can then go down and choose which Face definition you want applied to the Submode and Major Mode.

On my Emacs, PHP blocks (and all Submode chunks) were in ‘dark green’.  Major blocks were in ‘Midnight Blue’. Now for Major blocks I am not applying any face, just ‘default’. And for Submode chunks I have #081010 ( just a bit lighter than the default black background).

More on MuMaMo

If you have Emacs nxhtml-mode installed, chances are Emacs has turned on

 mumamo

before. I know, that word looks crazy. It stands for ‘Multiple Major Modes’.  This is so that when you’re working with multiple languages in the same document, HTML and PHP for example, Emacs can show you where chunks of code begin and end.  Because Emacs has “Major modes” for both PHP and HTML, (php-mode and nxhtml-mode) it turns on

 mumamo

when it detects this. I assume the purpose of this is so you can have benefits of both major modes without choosing only one. And so that Emacs does not, by default, assume which major mode you’d like to work in.

3 Responses

You can follow the comments for this article with the RSS 2.0 feed.

Hi Proffesional Dilettante,

If you want to suggest some better default background chunk colors (especially for the dark background case) then please do.

I would be glad to include them in the nXhtml distribution.

1 Lennart October 30, 2009 8:07 pm

… (but please mail me, I will probably miss it if you only answer here, since there is no e-mail prenumeration)

2 Lennart October 30, 2009 8:08 pm

Nice instructions – especially the encouragement to go hunting for the settings; well worth it!

Thanks!

3 Steve Dowe March 18, 2010 11:59 am

Leave a Reply

Required fields are marked with an asterisk (*), you may use these tags in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam protection by WP Captcha-Free

Most Recent Post

It’s been a long time, I shouldn’t have left you, part 1 …

But now I’m back.All official like.I do social stuff again.I see my friends.I’m moving into my own place again.And all that adult shit.

Categories

Content © professional dilettante
Proudly powered by WordPress
Theme designed by Artisan Themes

Entries (RSS)
Comments (RSS)

22 queries.
0.500 seconds.