[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25525: 25.1.90; add color highlighting to css mode
From: |
Tom Tromey |
Subject: |
bug#25525: 25.1.90; add color highlighting to css mode |
Date: |
Wed, 25 Jan 2017 16:34:00 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.90 (gnu/linux) |
>>>>> "Tom" == Tom Tromey <tom@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
bug#25525: 25.1.90; add color highlighting to css mode, Glenn Morris, 2017/01/25
bug#25525: 25.1.90; add color highlighting to css mode, Simen Heggestøyl, 2017/01/25