From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: karl@freefriends.org (Karl Berry) Newsgroups: gmane.emacs.help Subject: Re: turning colors off Date: Tue, 12 Feb 2008 18:08:21 -0600 Message-ID: <200802130008.m1D08LK12059@f7.net> References: <47B0BD39.2000501@palm.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1202878460 20614 80.91.229.12 (13 Feb 2008 04:54:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Feb 2008 04:54:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: rich.pixley@palm.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 13 05:54:43 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JP9dn-0008Qg-Mw for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Feb 2008 05:54:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JP9dK-0005on-7V for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Feb 2008 23:54:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JP5An-00063l-Jq for help-gnu-emacs@gnu.org; Tue, 12 Feb 2008 19:08:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JP5An-00063V-2b for help-gnu-emacs@gnu.org; Tue, 12 Feb 2008 19:08:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JP5Am-00063S-QA for help-gnu-emacs@gnu.org; Tue, 12 Feb 2008 19:08:24 -0500 Original-Received: from server1.f7.net ([64.34.169.74] helo=f7.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JP5Am-0001rn-D1 for help-gnu-emacs@gnu.org; Tue, 12 Feb 2008 19:08:24 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: help-gnu-emacs@gnu.org Original-Received: (from karl@localhost) by f7.net (8.11.7-20030920/8.11.7) id m1D08LK12059; Tue, 12 Feb 2008 18:08:21 -0600 In-Reply-To: <47B0BD39.2000501@palm.com> X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Tue, 12 Feb 2008 23:53:13 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51474 Archived-At: I'm having a lot of trouble with recent versions of emacs which try to use color as a means of syntax highlighting. Me too. I also wanted to turn off faces (bold, etc.), which look especially bad in a tty emacs. I'm sure many people must like this, but I find them illegible mostly due to contrast issues. Me too. Is there some way I can shut this off globally? My experience was that (global-font-lock 0) is insufficient to do what I want. (There is a long thread on emacs-devel about it when I reported this in August 2007.) The best approach for me was suggested by Juri Linkov (jurta.org), which is to explicitly reset all faces, except for the mode line. Here is the code, mostly written by him. Hope this helps. karl ;; Kill all faces except mode lines (defun my-faces-fix (&optional frame) "Fix defined faces." (interactive) ;; Check if this function is called by `custom-define-hook' from ;; `custom-declare-face' where the variable `face' is bound locally. (when (boundp 'face) (dolist (face (face-list)) (unless (string-match "^mode-line" (symbol-name face)) ;; Reset all face attributes (modify-face face))))) ;; ;; 1. Fix existing faces (let ((face t)) (my-faces-fix)) ;; ;; 2. Call `my-faces-fix' every time some new face gets defined (add-to-list 'custom-define-hook 'my-faces-fix) ;; for mode line background under X. (set-face-attribute 'mode-line nil :background "white") ;; Juri needed this for tty, but I don't seem to: ;(set-face-attribute 'mode-line nil :inverse-video t)