[Top][All Lists]

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

Re: How do I change a font color in Perl mode?

From: Eli Zaretskii
Subject: Re: How do I change a font color in Perl mode?
Date: Wed, 4 Oct 2000 08:33:31 +0200 (IST)

On Tue, 3 Oct 2000, Todd Wells wrote:

> I have the perl font lock mode enabled with syntax highlighting.  I need to
> change at least one of the colors--- it uses a light yellow font for
> variables by default and it's very difficult for me to see against the white
> background.  On my windows box the default colors are fine, but when I built
> emacs on my linux box, the defaults aren't ideal.

You need to customize one or more of the faces used by font-lock.  The
command `list-faces-display' displays all the faces currently defined
in the Emacs session.  You can change the color of each face by typing

        M-x set-face-foreground RET FACE RET COLOR RET

(and the same for background, use set-face-background).  Here, FACE
and COLOR are, respectively, the name of the face you want to modify
and the color you want it to use.

Alternatively, you can use "M-x customize-face RET FACE RET" to invoke
the Customize package, where changes may be seen and done more

> I looked through the FAQ and online manual (for a good 20 minutes, much too
> long), but couldn't find what I was looking for

The FAQ is the wrong place to look for such an info, at least not as
the first option.  The order I recommend is this:

    C-h a TOPIC RET
    M-x apropos RET TOPIC RET
    C-h i emacs RET i TOPIC RET
    C-h i emacs RET s TOPIC RET
    C-h F

(Here, TOPIC is the name of the topic you are looking for.)  Note that
the FAQ is the last resort.

> I love Emacs so far, but the learning curve is so
> steep... and because it's so powerful it makes it difficult to locate info
> on how to do some things that should be simple.

Part of Emacs power is the extensive documentation which is designed
to make it easy to find things efficiently.  Each time you cannot find
something using the above methods in resonable time, please submit to
gnu.emacs.bug a bug report for documentation, stating all the details
of your attempts to search the docs.

> Thanks for any help you can provide.  I'd also like to make this change
> permanent if possible (if there's something I can put in my .emacs or
> something?)

(set-face-foreground FACE COLOR)

If you use Customize, it will place the necessary commands in your
.emacs for you, if you click on "save for future sessions".

reply via email to

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