In Emacs, how to stop nxthml to mess with my backg

2019-03-15 15:37发布

问题:

I just started to use nxhtml, and I opened PHP file, it looks just really awful. I usually set black background-color, but PHP/nxhtml mode, background-color is set to light blue, and I don't know how to change it. How can I change it? Is there any good site to learn nxhtml mode?

回答1:

Adding this line:

(setq mumamo-background-colors nil)

to your .emacs(or equivalent) will disable all background colors coming from mumamo. I personally use zen-color-theme and the combination with mumamo's background colors was simply unbearable so I disabled them altogether.



回答2:

A possibly better way is to customize mumamo-chunk-coloring. This is an integer that you can set to only color chunks with depth greater than that. Default is 0 so all chunks are colored.

Another possibility is to use mumamo-no-chunk-coloring. This is a minor mode you can turn on for a buffer to avoid chunk coloring in that particular buffer. (This is in the nXhtml menu under "nXhtml / Multiple Major Modes / Remove Chunk Colors Temporarily.)

Another solution (which I would welcome) is to include the chunk coloring in the color themes so they will not clash with them. Since I think that the coloring provides useful information for most users I think that would be the best.

(PS: If you do not use colors you can show chunk dividing hints in the margins if you want too.)



回答3:

IIRC, this is inherited from mumamo (multiple major modes). Try customizing the "mumamo-background-chunk-major" face (M-x customize-face mumamo-background-chunk-major RET). Un-tick the over-ridden properties to make it inherit from your default background face.

Or for more details on mumamo display, M-x customize-group mumamo-display RET



回答4:

This is what i have put on my .emacs to override the blue color:

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(mumamo-background-chunk-major ((((class color) (min-colors 8)) (:background "white")))))