Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using emacs for most of my programming work. I've installed nXhtml just for using it with PHP and Django templates. The way in which I eneble nXhtml mode in my .emacs is:

(load "~/.emacs.d/nxhtml/autostart.el")
(setq mumamo-background-colors nil) 
(add-to-list 'auto-mode-alist '("\\.html$" . django-html-mumamo-mode)

Unfortunately mode is enabled all time from the very start of emacs in spite of a type of the file. Is there any way for enabling it only when needed, just for .html, .php files? Thanks!

share|improve this question
I also find this behaviour quite annoying. However, I don't have a vague idea how to change it. =/ nXhtml starts everywhere, and I can't make it enabled only on certain types of pages. – aL3xa Jul 23 '11 at 7:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.