[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15900: 24.3.50; foreground-color-at-point returns wrong results
From: |
Lars Ingebrigtsen |
Subject: |
bug#15900: 24.3.50; foreground-color-at-point returns wrong results |
Date: |
Fri, 22 Apr 2022 15:30:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
> `foreground-color-at-point' doesn't return the expected result when
> there are several faces at point present.
>
> For example, on the red subject in a Gnus article buffer, or on a blue
> link in w3m, it returns "black". Looking at the code, I see that
> `foreground-color-at-point' uses
>
> (face-at-point)
>
> i.e., it looks only at one face and disregards the others. This is
> especially meaningless when this first face doesn't specify any
> foreground at all.
It looks like this was fixed a couple years later in this commit:
commit 7ccedcb486ee4e37da54dd82a8557c80616d9467
Author: Artur Malabarba <bruce.connor.am@gmail.com>
AuthorDate: Fri Oct 30 15:00:37 2015 +0000
* lisp/faces.el: Refactor common code and fix a bug
(faces--attribute-at-point): New function. Fix a bug when the
face at point is a list of faces and the desired attribute is not
on the first one.
(foreground-color-at-point, background-color-at-point): Use it.
And I've verified that (foreground-color-at-point) seems to return
sensible results in the test cases in Emacs 29, so I'm closing this bug
report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#15900: 24.3.50; foreground-color-at-point returns wrong results,
Lars Ingebrigtsen <=