[Top][All Lists]

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

Re: Displaying TABS vs SPACES

From: Micha Feigin
Subject: Re: Displaying TABS vs SPACES
Date: Thu, 10 Jun 2004 10:09:46 +0300
User-agent: Mutt/1.5.6+20040523i

On Wed, Jun 09, 2004 at 05:11:44PM -0700, exits funnel wrote:
> > I forgot the fontlock entry, this is the full entry:
> > 
> > (custom-set-faces
> >  '(my-tab-face            ((((class color))
> > (:background "gray10"))) t)
> >  '(my-trailing-space-face ((((class color))
> > (:background "gray10"))) t))
> > 
> > (add-hook 'font-lock-mode-hook
> >   (function
> >     (lambda ()
> >       (setq font-lock-keywords
> >             (append font-lock-keywords
> >                     '(("\t+" (0 'my-tab-face t))
> >                       ("[ \t]+$" (0
> > 'my-trailing-space-face t))))))))
> Hey Micha,
> I'm finally back to this problem.  I added your code
> and it did something, but not what I'd hoped :) 
> Initially both cases showed up as black which didn't
> surprise me.  However I then changed 'gray10' in the
> tab-face to 'red10' but still both spaces and tabs
> were showing up as black squares.  My immediate
> problem is solved as I ended up using hexl-mode which
> isn't too user friendly but does allow me to
> differentiate the two.  A quick question though:  How
> could I discover what allowable values I could use
> other than 'gray10?'  I'm pretty new to emacs.  I read

See the next email for a probably better reference. but as a guideline
AFAIK the numbers are only available for gray and I think in jumps of 5
(maybe 10 for the middle ones), other colors you can specify by name
some of them have a dark version, so try red and darkred. another
option is to give the numerical representation. Its in hex values and
is of the form #123456 the first two numbers are for red, second two
for green and last two for blue, so dark red will probably be #100000

 '(my-tab-face            ((((class color)) (:background "#100000"))) t)
 '(my-trailing-space-face ((((class color)) (:background "gray5"))) t))

You may need to take the last \t out in the code if you want trailing
tabs to show in red also (just noticed it, didn't have time to check).

> the doc for custom-set-faces but it left me confused. 
> Thanks for taking the time to respond.
> -exits
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.

reply via email to

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