I like to use highlighting when working with emacs. But I don't like some of the default settings. I recently installed emacs 24.4 on my iMac. I really don't like all the highlighting of math expressions such as
$5$
I used to do something like
(fset 'tex-font-lock-syntactice-face-function 'ignore)
or
(fset 'tex-math-face 'ignore)
but that no longer works.
How can I disable highlight for math expressions but keep most everything else?
tex-mode.el
and I commented out(,(concat "\\$\\$?\\(?:[^$\\{}]\\|\\\\.\\|{" (funcall inbraces-re (concat "{" (funcall inbraces-re "{[^}]*}") "*}")) "*}\\)+\\$?\\$") (0 tex-math-face))
in my own personal custom version because I don't use math. If you don't want to comment out the source, then you might be interested in coping the current setting oftex-font-lock-keywords-1
, and commenting out that section and setting the new portion -- e.g.,(setq tex-font-lock-keywords-1 [EVERYTHING EXCEPT WHAT SHOULD BE STRICKEN])
If you are using AUCTeX, I don't know.tex-mode.el
Most people treat the source code as sacred and use things like(setq . . .
instead of touching the source. I like to create my own libraries for things I use every day (like writing documents for business, etc.), starting by copying the source code, and then I modify the daylights out of the source.C-h m
and see whether the mode is defined intex-site
(AUCTeX) ortex-mode
(basic).) Do you want to turn off highlighting just for$…$
or for everything such as math environments?