GNU bug report logs - #15900
24.3.50; foreground-color-at-point returns wrong results

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Fri, 15 Nov 2013 02:06:01 UTC

Severity: minor

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #59 received at 15900 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15900 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#15900: 24.3.50;
 foreground-color-at-point returns wrong results
Date: Sun, 17 Nov 2013 23:38:11 +0100
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.