help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with CC mode hooks and font-locking


From: Francis Belliveau
Subject: Problem with CC mode hooks and font-locking
Date: Mon, 26 Nov 2018 20:06:55 -0500

I know that I am likely in the minority, but I find all those colors in my code 
distracting so I wish to turn it all off.
The documentation says how to turn it on, but that is the default and my 
attempts to turn it off have met with failure.

First, I am running a pre-built download of emacs Version 26.1 (9.0) on OS-X 
Version 10.13.6

My first attempt was to place  the line
(global-font-lock-mode nil)
in my .emacs file.  That did not work.

Then I placed it into my c-initialization-hook function.
At first, that seemed to work for a .h file, but not a .cpp, or .java, file.  
What is strange here is that both the .h and .cpp claim to be running "C++ 
mode".
However, it seems to function differently depending on the order that files are 
loaded.  The first file opened (.h, .cpp or .java) is not colored, but the next 
two are colorized.

At this point I am confused since this should not be a toggling function call, 
and it should only be getting called once any way.

I had also placed it into the various "load each time" hooks with funny results 
that could have also been due to the order that I was loading files.

The documentation seems to indicate that just putting it in my .emacs file 
should be all that is necessary to take effect globally, but since it does not 
seem to work that way I am asking what is the correct mechanism to turn this 
off?

Your help will be greatly appreciated.
Fran


reply via email to

[Prev in Thread] Current Thread [Next in Thread]