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#54156: [External] : bug#54156: 28.0.91; set-face-attribute with a nil FRAME doesn't change the default Date: Sat, 26 Feb 2022 18:35:26 +0200 Message-ID: <83czj9povl.fsf@gnu.org> References: <87ilt3456u.fsf@cassou.me> <87ee3rxhuj.fsf@gnus.org> <83ee3rqgia.fsf@gnu.org> <87y21zw2ll.fsf@gnus.org> <83bkyvqet5.fsf@gnu.org> <871qzrw0ni.fsf@gnus.org> <838rtzqdt4.fsf@gnu.org> <87bkytvfcz.fsf@gnus.org> <83h78lps6m.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9949"; mail-complaints-to="usenet@ciao.gmane.io" Cc: damien@cassou.me, larsi@gnus.org, 54156@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 26 17:36:09 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 1nO03F-0002KJ-6X for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Feb 2022 17:36:09 +0100 Original-Received: from localhost ([::1]:32816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO03E-0006gC-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Feb 2022 11:36:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO038-0006ft-Ik for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 11:36:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO038-0002DB-AF for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 11:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO038-0001de-4F for bug-gnu-emacs@gnu.org; Sat, 26 Feb 2022 11:36: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, 26 Feb 2022 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54156 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 54156-submit@debbugs.gnu.org id=B54156.16458933526283 (code B ref 54156); Sat, 26 Feb 2022 16:36:02 +0000 Original-Received: (at 54156) by debbugs.gnu.org; 26 Feb 2022 16:35:52 +0000 Original-Received: from localhost ([127.0.0.1]:56234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO02y-0001dH-Dm for submit@debbugs.gnu.org; Sat, 26 Feb 2022 11:35:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO02v-0001d1-Ry for 54156@debbugs.gnu.org; Sat, 26 Feb 2022 11:35:50 -0500 Original-Received: from [2001:470:142:3::e] (port=56618 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO02p-00029W-N0; Sat, 26 Feb 2022 11:35:43 -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=+vr/IGmpEwySBFMafzR9uH+drZ8pXYvQFmfTY8xrr5Y=; b=av9M0prqctvR mT6Wg+5AfYps6cDpOBj1+mK4HOsKaP4Ia+odhauACmVsoDJ1jQW5FsLvDqlwpaJN2bhqdHXF5jCq/ jqq6Z+mrTgOT/CtLv78w8Vd4ZMdYhlq9/XbEDRzB+G+Ssr6MjzMeCOp3LiLg6+4Uwdm5V9DDg693H 4p2W96qVChgXzCW+MAZy+iz6+H6AI1lfTX1paG9zR4WRgYbpTfwnioiLRGWD7x2fVshibtk/OL63P 7EWAHUyJGiGNwKrQmVCKlvYcyvu00TwfLt3V6VNIv44YafnZQlWbe39cOXHWH5dBktqeIIHP5nVAF W+VHAVeVcQWYQ0ZHtgFGbQ==; Original-Received: from [87.69.77.57] (port=2351 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 1nO02n-0007Jf-Oz; Sat, 26 Feb 2022 11:35:43 -0500 In-Reply-To: (message from Drew Adams on Sat, 26 Feb 2022 16:17:19 +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:227685 Archived-At: > From: Drew Adams > CC: "damien@cassou.me" , > "54156@debbugs.gnu.org" > <54156@debbugs.gnu.org> > Date: Sat, 26 Feb 2022 16:17:19 +0000 > > I'm not sure I understand this from Eli, however: > > The correct way to do what Damien wants (AFAIU) is this: > > (set-face-attribute 'region nil :background 'unspecified) > (set-face-attribute 'region t :background 'unspecified) > > That is, one must explicitly call set-face-attribute > with FRAME = t (as well as nil), and pass 'unspecified' > ^^^^^^^^^^^^^^^^^^ > (NOT nil!) as the value. Maybe we should document that, > although it is a obscure and unusual thing to do. > > My impression is that it's enough to do this: > > (set-face-attribute 'region nil :background 'unspecified) > > I'm probably not testing/checking this correctly, > but it seems to me that both the selected frame > and new (future) frames are affected by using > nil for the frame (and `unspecified' for the > face attribute value). I'm not sure this isn't the result of the particular implementation we have, so I prefer to tell people to call with FRAME = t explicitly. After all, this is a rare use case. > Eli, you say "This is well-documented: a color > must be a string or 'unspecified'." Still, it > wouldn't hurt to add something to that effect in > the doc of `set-face-attribute' - and say what > the effect is of using nil (for the face color) > - it's tolerated (no error) but it doesn't have > the effect of `unspecified'. We generally don't advertise compatibility shims for obsolete features, because we want people to stop using them.