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#51577: 27.2; Regression: reproducible hang with face functions Date: Wed, 03 Nov 2021 19:10:28 +0200 Message-ID: <83tugtgo6z.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16980"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51577@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 03 18:16:39 2021 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 1miJsM-0004GM-Qh for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Nov 2021 18:16:39 +0100 Original-Received: from localhost ([::1]:50228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miJsL-0006Tp-NO for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Nov 2021 13:16:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miJmw-0001aI-W3 for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 13:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miJmw-0006os-NH for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 13:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1miJmw-0007Ox-Iy for bug-gnu-emacs@gnu.org; Wed, 03 Nov 2021 13:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Nov 2021 17:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51577 X-GNU-PR-Package: emacs Original-Received: via spool by 51577-submit@debbugs.gnu.org id=B51577.163595944228405 (code B ref 51577); Wed, 03 Nov 2021 17:11:02 +0000 Original-Received: (at 51577) by debbugs.gnu.org; 3 Nov 2021 17:10:42 +0000 Original-Received: from localhost ([127.0.0.1]:41030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miJmc-0007O4-KP for submit@debbugs.gnu.org; Wed, 03 Nov 2021 13:10:42 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1miJma-0007Nm-Pa for 51577@debbugs.gnu.org; Wed, 03 Nov 2021 13:10:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miJmT-0006hs-IA; Wed, 03 Nov 2021 13:10:34 -0400 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=N7/wWo6c3brsipUdbOE8OkBSLLcUH2w62w2bXgSYpeM=; b=MTWX8EsaXvja 5RO2dsrj9yONjaKRHAaxrL77kqzQZzwK0WJubLAbQ8QmffknPd9lXf6e2gNBQ9QrARueXSPXlLXxw zfdns7NXAemCo9ubSbFEJWYQLbD1jOjzZJ5O1PHr3ECP5R4bbn4bIt0ySml6hC/NXMVSCChXDO41B edgxrKNgWPN4ws04WwKi8EtzSXBetxheaO5z2CEQxD2g2bLYTz2iQo99LZiRBFmbLCKUwJDD3irOf N7lPcQPAyHFZ58VUb51SFdYrMFW65CRuSVtPnjOOZ2WCnKvt9p8I34RMvdAI2kB0z0rTs3++dTjoD cgIcjV6tmQILXRBQOtRoyQ==; Original-Received: from [87.69.77.57] (port=2099 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 1miJmQ-00087S-Cq; Wed, 03 Nov 2021 13:10:31 -0400 In-Reply-To: (message from Drew Adams on Wed, 3 Nov 2021 02:44:22 +0000) 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:218882 Archived-At: > From: Drew Adams > Date: Wed, 3 Nov 2021 02:44:22 +0000 > > (defface alt-region '((t :background "gray70" :inherit region)) > "..." :group 'faces) > > ;; `selected-frame' here could be anything, so this is dicey. > ;; But that's not important for the bug. > (defvar orig-region-atts (face-all-attributes 'region (selected-frame))) > > (defun foo (&optional arg) > (interactive "P") > (let* ((frame (selected-frame)) > (alist (if arg > (face-all-attributes 'alt-region frame) > orig-region-atts)) > (alist (cons (cons :font 'unspecified) alist)) > (plist ())) > (message "BEFORE LOOP, ALIST: %S" alist) > (while alist > (push (caar alist) plist) > (push (cdar alist) plist) > (setq alist (cdr alist))) > (setq plist (nreverse plist)) > (message "> LOOP. PLIST: %S" plist) > (apply #'set-face-attribute 'region frame plist))) You set the region face to inherit from itself, and you expect that to work without causing an infloop when Emacs tries to resolve some face attribute? If FACE1 has some attribute 'unspecified', but inherits from FACE2, Emacs will try to go up the inheritance chain to see if some of the parent faces specifies that attribute. If FACE1 inherits from itself, going up the inheritance chain will never end. IOW, it's a cockpit error.