[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Colour selection in shr
From: |
Wolfgang Jenkner |
Subject: |
Re: Colour selection in shr |
Date: |
Wed, 05 Nov 2014 12:40:40 +0100 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) |
On Tue, Nov 04 2014, Stefan Monnier wrote:
>> Again, I have no idea what you mean by that. How would you use
>> `font-lock-mode' to put colours on an HTML document based on CSS?
>
> I'm not suggesting to use font-lock-keywords to put the colors.
> I'm suggesting to use the `font-lock-mode' setting (a boolean variable)
> to decide whether to do highlighting or not.
>
> You could even do it dynamically/automatically by using the
> `font-lock-face' instead of the `face' property.
The thread was about turning off colours while preserving other face
attributes, I think. But using `font-lock-face' for colour settings and
`face' for the rest doesn't work for this, viz. with the following code
snippet, "bar" appears underlined but not coloured.
(with-current-buffer (generate-new-buffer "*test*")
(insert "foobarquux")
(put-text-property 1 7 'face '(:underline t))
(put-text-property 4 11 'font-lock-face '(:foreground "red"))
(font-lock-mode)
(pop-to-buffer (current-buffer)))
Wolfgang
- Re: Colour selection in shr, (continued)
- Re: Colour selection in shr, Lars Magne Ingebrigtsen, 2014/11/03
- Re: Colour selection in shr, Yoni Rabkin, 2014/11/03
- Re: Colour selection in shr, Lars Magne Ingebrigtsen, 2014/11/03
- Re: Colour selection in shr, Yoni Rabkin, 2014/11/03
- Re: Colour selection in shr, Stefan Monnier, 2014/11/04
- Re: Colour selection in shr, Lars Magne Ingebrigtsen, 2014/11/04
- Re: Colour selection in shr, Stefan Monnier, 2014/11/04
- Re: Colour selection in shr, Lars Magne Ingebrigtsen, 2014/11/04
- Re: Colour selection in shr, Yoni Rabkin, 2014/11/04
- Re: Colour selection in shr, Stefan Monnier, 2014/11/04
- Re: Colour selection in shr,
Wolfgang Jenkner <=
- Re: Colour selection in shr, Stefan Monnier, 2014/11/03
- Re: Colour selection in shr, Lars Magne Ingebrigtsen, 2014/11/03
- Re: Colour selection in shr, Yoni Rabkin, 2014/11/13
- Re: Colour selection in shr, Lars Magne Ingebrigtsen, 2014/11/13
Re: "Readability" feature in eww, RĂ¼diger Sonderfeld, 2014/11/03
Re: "Readability" feature in eww, Rasmus, 2014/11/03