GNU bug report logs - #25525
25.1.90; add color highlighting to css mode

Previous Next

Package: emacs;

Reported by: Tom Tromey <tom <at> tromey.com>

Date: Wed, 25 Jan 2017 08:08:01 UTC

Severity: wishlist

Tags: patch

Found in version 25.1.90

Done: Tom Tromey <tom <at> tromey.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tom Tromey <tom <at> tromey.com>
To: Tom Tromey <tom <at> tromey.com>
Cc: 25525 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#25525: 25.1.90; add color highlighting to css mode
Date: Wed, 25 Jan 2017 16:34:00 -0700
>>>>> "Tom" == Tom Tromey <tom <at> tromey.com> writes:

Tom> It seemed simpler to always set the :foreground, but I can experiment
Tom> with :distant-foreground instead.

I gave this a try.  I think the code in this patch works better than
:distant-foreground.

One case where it is better is the CSS color "purple", aka #800080.

In my theme the foreground color is black.  My patch picks white as the
foreground, but the Emacs chooses not to use a distant-foreground, but
rather keep a black foreground.

You can compare these two cases by evalling:

(progn
  (insert (propertize
	   "hello\n"
	   'font-lock-face '(:background "#800080" :foreground "black"
					 :distant-foreground "white")))
  (insert (propertize
	   "hello\n"
	   'font-lock-face '(:background "#800080" :foreground "white"))))

I find the latter much more readable.

Tom




This bug report was last modified 8 years and 80 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.