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

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

Re: I can't turn off colors in emacs!


From: weber
Subject: Re: I can't turn off colors in emacs!
Date: Thu, 11 Oct 2007 12:34:46 -0000
User-agent: G2/1.0

On Oct 9, 4:00 pm, Schlake <schlake+gm...@gmail.com> 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



reply via email to

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