From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Francis Belliveau Newsgroups: gmane.emacs.help Subject: Problem with CC mode hooks and font-locking Date: Mon, 26 Nov 2018 20:06:55 -0500 Message-ID: <5FC1FE19-E1AE-49EB-9D42-4D0B3E22E34E@comcast.net> References: <5B8BFDC9-A07B-48FE-8C97-1BB0B84E5577@gmail.com> <865zxruycx.fsf@zoho.com> <875zxr7zke.fsf@portable.galex-713.eu> <00997cf4-4577-49d4-b48d-79e6a46b0211@googlegroups.com> <28B5D5A6-4E84-455C-BA8E-84AC0C5BD454@comcast.net> <83h8gftwxb.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1543280729 14911 195.159.176.226 (27 Nov 2018 01:05:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Nov 2018 01:05:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 27 02:05:25 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRRoa-0003kd-W3 for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Nov 2018 02:05:25 +0100 Original-Received: from localhost ([::1]:39555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRRqh-0002B6-8L for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Nov 2018 20:07:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRRqE-0002Aq-30 for help-gnu-emacs@gnu.org; Mon, 26 Nov 2018 20:07:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRRqA-0005fg-VM for help-gnu-emacs@gnu.org; Mon, 26 Nov 2018 20:07:06 -0500 Original-Received: from resqmta-ch2-10v.sys.comcast.net ([2001:558:fe21:29:69:252:207:42]:50172) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRRqA-0005dx-Oy for help-gnu-emacs@gnu.org; Mon, 26 Nov 2018 20:07:02 -0500 Original-Received: from resomta-ch2-15v.sys.comcast.net ([69.252.207.111]) by resqmta-ch2-10v.sys.comcast.net with ESMTP id RRopgnmUFzXYcRRq5gc6mn; Tue, 27 Nov 2018 01:06:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1543280817; bh=jxnNVKbI25JFRdX9CTS9/WpgH8EINy0m0RaDrEjbkiM=; h=Received:Received:From:Content-Type:Mime-Version:Subject:Date:To: Message-Id; b=K2gAC9lsNZ9lXIth/Z1TbSQA44KEHUTYwwmGHZYuFbJrWI39jhcjnFiNBocOP/J4V V7Pmof2i/xRBoMMcjq9HuIsFmO+k9Zc4rkhdMN6533E34jx+HhcKII6harDOuV0E2q xytW6cvsnTXxwJnl4ehOn0F4D6Pyrwd2GFZrPMjlb9YM5Idyzbx4jmZcsM8cLJ08xL 5wjAUjhCki3ao0fVPYQrBn1y9cDQ1B2QXsuyzsLWgZVTOavZ89RHuvVU1cPnwLMHcl I9J46OIIrHmphQskQRWLeyw+R4h9fTtWYcc7pirfcYuLQDLPwrtOaKnJhuxL6Q+vH0 hPaTNv2mw1/Xw== Original-Received: from [IPv6:2601:190:580:9c44:a0d7:3871:7179:1aac] ([IPv6:2601:190:580:9c44:a0d7:3871:7179:1aac]) by resomta-ch2-15v.sys.comcast.net with ESMTPSA id RRq4gnl2lV5JBRRq4gGcMb; Tue, 27 Nov 2018 01:06:57 +0000 In-Reply-To: <83h8gftwxb.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.9.1) X-CMAE-Envelope: MS4wfMIHZMENwN42jcFysPRgf8hEefvgM5JE38VyU7MTbFM18zbfn+T4k0BJZqoSUGctQXjLWRlQTsyJwuv34qqHf2MWx5kg930M8npvCoCPVUk2VmWLvu20 j33P1yCFbaeVvUm6eNLRa9+EFuiNZpnB6EUT/LrRNk3lC/lkW+0vnrCHqKGPWxDEuJz8UR6WVf3Q8sbuywjZc6/gA5JQhubxWDUaSCYfQdF58IqI4toka+NB GRvNHSpd+FHgF+7pohCEZtApGmL20pXbPfF3bxi8NcfyC5ebDP8jSyanUygyUuC7 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:558:fe21:29:69:252:207:42 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118766 Archived-At: 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=