In pretty much every mode, whenever the word 'fix' occurs, whether its in a comment or not, it gets highlighted in a very visible way. I'm not sure what's causing this, and would like to turn it off. How do I do that?
What you are seeing is probably a font lock customization that one can add to their
I have the following that highlights the occurrences of
font-lock-warning-face face. But I have bound this to happen only in a particular major mode hook (i.e. only when a particular major mode is active).
(font-lock-add-keywords nil '(("\\b\\(FIXME\\|TODO\\|BUG\\)\\b" 1 font-lock-warning-face t)))
My gut feeling is that you have a similar
(font-lock-add-keywords nil '(("\\b\\(FIX\\|... statement somewhere in your
I would do a recursive grep of
FIX\\\\ in the emacs setup folder ( which usually is
~/.emacs.d ) to find the location of that statement.
Put point (the cursor) on the word
fix and do C-u C-x = (
what-cursor-position). In the buffer that comes up, look for a section that looks like this:
There are text properties here: face font-lock-comment-face fontified t
Move point to whatever it says instead of
font-lock-comment-face (you can use TAB to navigate there), and hit RET. You can also click the name of the face with the mouse.
This will bring up a
*Help* buffer showing you properties of the face in question. The first line will look something like this:
Face: font-lock-comment-face (sample) (customize this face)
To modify the face, click
customize this face. You will probably want to change the "Foreground" and "Background" properties. When you are done, click "Apply and Save" to make the changes permanent.
Here is another way to find out what's going on:
Quit Emacs and start it again via
emacs -Q. The
-Qflag tells Emacs to refrain from loading any customizations. If
fixis not being highlighted any more, this means that the problem is coming from your personal customizations (or from a third-party package you are using).
Recursively bisect your init-file: Start by commenting out half of it, restart Emacs, and see if
fixgets highlighted. If it does, you know that the code that's causing the highlighting is in the portion of the code that is currently not commented out (and vice versa). Repeat the process for the portion of the code you know contains the offending code: Comment out half of it, and see if the problem persists. Keep going until you have narrowed the problem down to a small chunk of code. Add the offending code to your question if you need more assistance with it.
To comment out a chunk of code, put it in a region and hit M-; (bound to
comment-dwimby default). If a region is already commented out, you can use the same command to uncomment it.