From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61521: "default" is now the first item returned from (font-faces), breaking various code. Date: Sat, 18 Feb 2023 08:49:29 +0200 Message-ID: <83y1ovzcw6.fsf@gnu.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> <9e9ed8043fd6413e6183@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22045"; mail-complaints-to="usenet@ciao.gmane.io" Cc: brennan@umanwizard.com, gregory@heytings.org, 61521@debbugs.gnu.org To: Kai Ma Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 18 07:50:36 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 1pTH3K-0005Wp-Qy for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Feb 2023 07:50:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTH2t-0007jx-KQ; Sat, 18 Feb 2023 01:50:07 -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 1pTH2o-0007j0-N4 for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 01:50: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 1pTH2o-0008TN-C5 for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 01:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTH2o-0001JW-8C for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 01:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2023 06:50:02 +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.16767029765005 (code B ref 61521); Sat, 18 Feb 2023 06:50:02 +0000 Original-Received: (at 61521) by debbugs.gnu.org; 18 Feb 2023 06:49:36 +0000 Original-Received: from localhost ([127.0.0.1]:42241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTH2O-0001If-8e for submit@debbugs.gnu.org; Sat, 18 Feb 2023 01:49:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTH2M-0001IS-Q4 for 61521@debbugs.gnu.org; Sat, 18 Feb 2023 01:49:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTH2H-0008LP-2G; Sat, 18 Feb 2023 01:49:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0/CkIMGPtEmFmOIeMFKB6AmoDIXy/ztYC9hWV0vCF78=; b=X6XY/ZuvQm4v mDg8KPyxHOtSSKJ/1BAyk+CclcBxnXExHyuB4nwYADj/RJ+yXWQ07jLwAxeKm5dDN33UbbYpXXObQ 6GADZvcD1lfoTFPJqNEj5wcRc77sYU+fc74JCz8KEVG87plQrxxZmiDgwtruSCxbEbEdntQghw6Q8 XASbST2bt5VpBGZ6HbwebIVwlDHYDrZeoVQ0S/ZjzfGiI3TZRBxQfGQZNorN4nqrUySWmiWFCpFm2 d+bxUawH6sGS7KmeFmXmbr8yKGWXkmGMTnLeIEJdZXpSqZF+rEepSITdrhd2cxEV85/b5qUub/K7K DAIlT8V1PNkmeUeenrgdUg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTH2G-0008QY-Cv; Sat, 18 Feb 2023 01:49:28 -0500 In-Reply-To: (message from Kai Ma on Sat, 18 Feb 2023 06:17:25 +0800) 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:255928 Archived-At: > From: Kai Ma > Cc: Eli Zaretskii , brennan@umanwizard.com, > 61521@debbugs.gnu.org > Date: Sat, 18 Feb 2023 06:17:25 +0800 > > My config becomes broken after pulling this change: the child frame of > vertico-posframe does not appear under certain themes, and signals > errors like: > > Error in post-command-hook (vertico--exhibit): (error "Invalid face" consult-separator) > Error in post-command-hook (vertico--exhibit): (error "Invalid face" hl-todo) > > I'm not sure if this is a downstream issue, but this problem can be > solved by either reverting this commit or removing the nreverse in > x-create-frame-with-faces: > > diff --git a/lisp/faces.el b/lisp/faces.el > index 4933b495a6c..e91107e98cc 100644 > --- a/lisp/faces.el > +++ b/lisp/faces.el > @@ -2226,7 +2226,7 @@ x-create-frame-with-faces > (unwind-protect > (progn > (x-setup-function-keys frame) > - (dolist (face (nreverse (face-list))) > + (dolist (face (face-list))) > (face-spec-recalc face frame)) > (x-handle-reverse-video frame parameters) > (frame-set-background-mode frame t) > > This piece of code (w/ nreverse) was written as part of the hash table > rewrite, and at that time (face-list) did not sort its results. I don't > know why nreverse is significant here though. Which change are you talking about? Please clarify. The original problem was solved recently on the emacs-29 branch by reversing the order in which face-list sorts the faces, to make it similar to what we had before the hash table rewrite. So there should be no reason to change any other code anywhere else. Thanks.