From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#61521: "default" is now the first item returned from (font-faces), breaking various code. Date: Wed, 15 Feb 2023 14:11:55 +0000 Message-ID: <9e9ed8043fd6413e6183@heytings.org> References: <7fe5e80d-761f-cc2d-12a1-65b2b5781c39@umanwizard.com> <9e9ed8043f57226204db@heytings.org> <3b75cf10-6125-608c-a506-323ce09846c7@umanwizard.com> <9e9ed8043fd479390a2a@heytings.org> <83ttznavsp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21308"; mail-complaints-to="usenet@ciao.gmane.io" Cc: brennan@umanwizard.com, 61521@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 15 15:12:09 2023 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 1pSIW1-0005M1-4S for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 15:12:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSIVv-00023y-TW; Wed, 15 Feb 2023 09:12:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSIVu-0001v9-C8 for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 09:12:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSIVu-00028F-1W for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 09:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSIVt-0004M3-TF for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 09:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2023 14:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61521 X-GNU-PR-Package: emacs Original-Received: via spool by 61521-submit@debbugs.gnu.org id=B61521.167647031916729 (code B ref 61521); Wed, 15 Feb 2023 14:12:01 +0000 Original-Received: (at 61521) by debbugs.gnu.org; 15 Feb 2023 14:11:59 +0000 Original-Received: from localhost ([127.0.0.1]:58334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSIVr-0004Ll-BA for submit@debbugs.gnu.org; Wed, 15 Feb 2023 09:11:59 -0500 Original-Received: from heytings.org ([95.142.160.155]:58116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSIVo-0004LZ-No for 61521@debbugs.gnu.org; Wed, 15 Feb 2023 09:11:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1676470315; bh=xoK4NmLStQKG/MDA2z/KgK8YGpYzPdWj7kDR16+F7gY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=5ZVDVNyhMl7EDUsfoR3kwTIESnEgAyPVHjQon4zQ/GxLupfWUOhF3SdFrf+e3U1Et 67JYoG/vJVzczlPNLbb62lBxQEWZw64k91S1wfB0JTws+NX3fFE0fH9WaAvIg9KBJW vUPf0cdLumMPy3GimxPq7sShZvhGoDuhaoYV/8dEteBx5lrj1TD4vNzpO2qcuwA9uz emIN0RzLhl5dRCZJFKqCi2Wq4Us7dihEkE2FqvPEccLBUlnNwGETQrxXFjgxybFLPr qr7wHJIJvJamYFJEPH8kx+Oira7m6ExQbfhr72v2mXVa7XuiRX9FCXnok2p6v4twgd 2ft28VJtQ36yg== In-Reply-To: <83ttznavsp.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255711 Archived-At: >> Thanks. It seems the change you describe is not a recent one: the >> first element of the list returned by 'face-list' is 'default' in Emacs >> 27, 28, 29 and 30. (This is caused by e3b8ddd500, since which frame >> faces are stored in a hash table instead of an alist.) > > Right. So I wonder whether we should remove the nreverse call in > face-set-after-frame-default. WDYT? > There are three occurrences of '(nreverse (face-list))': one in facemenu-complete-face-list, which seems to date from the 1990s, one in x-create-frame-with-faces, which was added by e3b8ddd500 "to handle subtle semantic change to how frame faces propagate, which otherwise breaks frame creation with reverse video enabled (bug#41200)", and the third one in 'face-set-after-frame-default'. The comment there is definitely outdated and should be removed, but given that '(nreverse (face-list))' is placed in a dolist whose body starts with '(face-spec-recalc face frame)', like in x-create-frame-with-faces, I'm not sure the nreverse can be removed without introducing a subtle bug. It is probably safer to leave the code unchanged.