From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#15900: 24.3.50; foreground-color-at-point returns wrong results Date: Fri, 22 Apr 2022 15:30:39 +0200 Message-ID: <87bkwtxn28.fsf@gnus.org> References: <87siuyxvw7.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6846"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 15900@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 22 15:47:49 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nhtdV-0001bH-4Y for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Apr 2022 15:47:49 +0200 Original-Received: from localhost ([::1]:35830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhtdT-0006qk-Vg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Apr 2022 09:47:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhtNH-0001on-2z for bug-gnu-emacs@gnu.org; Fri, 22 Apr 2022 09:31:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhtNG-0001To-Pj for bug-gnu-emacs@gnu.org; Fri, 22 Apr 2022 09:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nhtNG-0003Ad-Km for bug-gnu-emacs@gnu.org; Fri, 22 Apr 2022 09:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Apr 2022 13:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15900 X-GNU-PR-Package: emacs Original-Received: via spool by 15900-submit@debbugs.gnu.org id=B15900.165063425211753 (code B ref 15900); Fri, 22 Apr 2022 13:31:02 +0000 Original-Received: (at 15900) by debbugs.gnu.org; 22 Apr 2022 13:30:52 +0000 Original-Received: from localhost ([127.0.0.1]:52029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhtN6-00033D-3Y for submit@debbugs.gnu.org; Fri, 22 Apr 2022 09:30:52 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:38770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhtN4-0002wr-8a for 15900@debbugs.gnu.org; Fri, 22 Apr 2022 09:30:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=p9vfrr5T1MniII0aeZ+39QlINItdcVfzCeRkSLheyz8=; b=HFeej2YYrF28PVwLQ98P029Ir0 jczNKkDNQbMWEAJQPzqWY5l9hDmfIKa2uAejQeDuIcqhzwN8k33T+hMkdLQzJ2mETkBDs0rvxjN3O 5dawog9lL447WtDB5/syBhaBNYUlcB9eGpk3q4k85CEGHvvzhNRdsV88ztnQRYBsnxkI=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nhtMv-0006th-T0; Fri, 22 Apr 2022 15:30:44 +0200 X-Now-Playing: ELpH's _Protection_: "Untitled" In-Reply-To: <87siuyxvw7.fsf@web.de> (Michael Heerdegen's message of "Fri, 15 Nov 2013 03:04:56 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230432 Archived-At: Michael Heerdegen 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 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