GNU bug report logs -
#15900
24.3.50; foreground-color-at-point returns wrong results
Previous Next
Full log
View this message in rfc822 format
Hello,
> > I think he means that the value of property `face' (whether from
> > a text property or an overlay property) can be a list of faces.
Indeed. Plus, I want to look at the font-lock-face property.
> Yes, but then you get all that list in a single call to
> get-char-property, right? So where's the difficulty in collecting
> "all the faces at point"?
There's no difficulty. Eli, did you ever read the code snip I had
included? Here it is again:
(cl-some
(lambda (face) (not (memq (face-foreground face nil t)
`(nil
,(face-attribute 'default :foreground)
"unspecified-fg" "unspecified-bg"))))
(cl-mapcan (lambda (face-or-list) (if (facep face-or-list)
(list face-or-list)
face-or-list))
(list
(get-text-property (point) 'face)
(get-text-property (point) 'font-lock-face))))
I think what you mean, and what I do in the code, are quite the same
(except for the predicate maybe). I appreciate your help, but please
tell me if the snipped is ok or if you mean something else, and if so,
what. I've just the feeling that we to talk at cross-purposes.
Thanks,
Michael.
This bug report was last modified 3 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.