I did want, however to be able to have pretty hilit19 colors (if you don't use emacs19, you're out of luck, sorry). So, I redefined html-mode to be the same as fundamental-mode, but with a different name, as follows:
(defun html-mode () "Mkgray's html mode" (interactive) (setq major-mode 'html-mode) (setq mode-name "HTML") (run-hooks 'funamental-mode-hook))And then enabled hilit19 stuff:
(setq hilit-mode-enable-list '(not text-mode) hilit-background-mode 'dark hilit-inhibit-hooks nil hilit-inhibit-rebinding nil) (require 'hilit19)Then I added some pretty colors (the fun part). Specifically:
; HTML stuff (hilit-add-pattern "&[^;]+;" "" 'green 'html-mode nil) (hilit-add-pattern "<[Ii][mM][Gg] *[^>]+>" "" 'yellow 'html-mode nil) (hilit-add-pattern "<[hH][1-6]>" "" 'red 'html-mode nil) (hilit-add-pattern "[hH][1-6]>" "" 'hex-c44 'html-mode nil) (hilit-add-pattern "[hH][Rr][Ee][Ff] *= *\"[^\"]+\"" "" 'hex-28c 'html-mode nil) (hilit-add-pattern "<[aA] *[^>]+>" "" 'hex-55e 'html-mode nil) (hilit-add-pattern "[Aa]>" "" 'hex-33c 'html-mode nil) (hilit-add-pattern "[^>]+>" "" 'hex-c7c 'html-mode nil) (hilit-add-pattern "<[^>]+>" "" 'hex-b3b 'html-mode nil)Now, when I edit html, it looks nice in a way that is useful to me! My page about me now looks colorful in emacs [image].
Have fun.