From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: weber Newsgroups: gmane.emacs.help Subject: Re: I can't turn off colors in emacs! Date: Thu, 11 Oct 2007 12:34:46 -0000 Organization: http://groups.google.com Message-ID: <1192106086.496121.290060@v3g2000hsg.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1192106524 14533 80.91.229.12 (11 Oct 2007 12:42:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2007 12:42:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 11 14:42:03 2007 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 1IfxMV-0005eO-D8 for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2007 14:41:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfxMP-0004h9-Ga for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2007 08:41:53 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v3g2000hsg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 93 Original-NNTP-Posting-Host: 201.21.201.198 Original-X-Trace: posting.google.com 1192106086 29042 127.0.0.1 (11 Oct 2007 12:34:46 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 11 Oct 2007 12:34:46 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 stargate.datacom:3128 (squid/2.6.STABLE5) Complaints-To: groups-abuse@google.com Injection-Info: v3g2000hsg.googlegroups.com; posting-host=201.21.201.198; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:152832 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:48334 Archived-At: On Oct 9, 4:00 pm, Schlake wrote: > A computer center I use frequently upgraded their RedHat boxes, and > now emacs claims to be 22.0.990.1. All of a sudden emacs gas gone > wacky with colors appearing for all kinds of words and symbols > rendering it pretty much unusable. I've tried a variety of things to > get it fixed, but I have to admit defeat. > > Starting emacs with --color=no is a resounding failure. There are > absolutely no colors anymore, but text that would be colored is now > boldfaced and inversed, making it even more unusable than emacs with > colors. Plus, with that option I can't use colors if/when I want > them. > > Another possible solution is (global-font-lock-mode nil). It does > most of what I want. Colors go away in most buffers, and I don't get > boldfaced or inversed video anymore! This is a great solution except > for the part about "most buffers". The minibuffer is the worst > offender of buffers that ignore the global font lock mode, but compile > mode does as well. I'm sure there are others which I haven't > discovered yet. > > I tried messing with font-lock-maximum-size, as well as making a mode > hook to turn off font lock mode in all modes, but neither met with > success defeating font lock mode in the minibuffer. > > Previous pain with font lock mode from 2003 was initially solved by > making a huge list of set-face-foregrounds to keep all the modes from > being anything other than white. I dislike this solution a lot, and > would rather not have to resort to it again. I fixed the 2003 font > lock problems with (setq inhibit-default-init t), but that doesn't > work anymore. > > Does anyone know how to disable font lock mode? > > -- > -- Schlake > > This is my gmail account, I can also be reached at schl...@nmt.edu, if > the TCC is working. Schake, take a look at color-theme-retro-green. It works for me, setting everything to green on black. I'm pasting the code, from colortheme.el, below. You can see you don't need to list every face. Also check the orange theme, which is made from the retro-greeen. You can make a retro-white just the same :) (defun color-theme-retro-green (&optional color func) "Plain green on black faces for those longing for the good old days." (interactive) ;; Build a list of faces without parameters (let ((old-faces (face-list)) (faces) (face) (foreground (or color "green"))) (dolist (face old-faces) (cond ((memq face '(bold bold-italic)) (add-to-list 'faces `(,face (( t (:bold t)))))) ((memq face '(italic underline show-paren-mismatch-face)) (add-to-list 'faces `(,face (( t (:underline t)))))) ((memq face '(modeline modeline-buffer-id modeline-mousable modeline-mousable-minor-mode highlight region secondary-selection show-paren-match-face)) (add-to-list 'faces `(,face (( t (:foreground "black" :background ,foreground :inverse t)))))) (t (add-to-list 'faces `(,face (( t (nil)))))))) (color-theme-install (append (list (or func 'color-theme-retro-green) (list (cons 'foreground-color foreground) (cons 'background-color "black") (cons 'mouse-color foreground) (cons 'cursor-color foreground) (cons 'border-color foreground) (cons 'background-mode 'dark))) faces)))) (defun color-theme-retro-orange () "Plain orange on black faces for those longing for the good old days." (interactive) (color-theme-retro-green "orange" 'color-theme-retro-orange)) HTH, weber