From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37774: 27.0.50; new :extend attribute broke visuals of all themes and other packages Date: Tue, 26 Nov 2019 19:43:01 +0200 Message-ID: <83ftiasfdm.fsf@gnu.org> References: <87o8xwrjba.fsf@bernoul.li> <834kzooo8e.fsf@gnu.org> <877e4d7yzf.fsf@bernoul.li> <83imnvg53q.fsf@gnu.org> <87zhh2ofc9.fsf@bernoul.li> <87k186nsku.fsf@bernoul.li> <87imna18nc.fsf@mail.linkov.net> <42c596c2-b5c1-9fc9-4b92-9c13b386d93d@yandex.ru> <83pnhgrlni.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="107883"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37774@debbugs.gnu.org, juri@linkov.net To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 26 18:44:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iZesl-000RwP-8X for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Nov 2019 18:44:11 +0100 Original-Received: from localhost ([::1]:57690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZesk-0007wl-6t for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Nov 2019 12:44:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48674) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZesd-0007wW-2K for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2019 12:44:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZesb-0007jq-Ub for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2019 12:44:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46899) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZesb-0007ji-Qd for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2019 12:44:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iZesb-00066B-OR for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2019 12:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Nov 2019 17:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37774 X-GNU-PR-Package: emacs Original-Received: via spool by 37774-submit@debbugs.gnu.org id=B37774.157479018423370 (code B ref 37774); Tue, 26 Nov 2019 17:44:01 +0000 Original-Received: (at 37774) by debbugs.gnu.org; 26 Nov 2019 17:43:04 +0000 Original-Received: from localhost ([127.0.0.1]:52872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZerg-00064s-EH for submit@debbugs.gnu.org; Tue, 26 Nov 2019 12:43:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZere-00064O-0t for 37774@debbugs.gnu.org; Tue, 26 Nov 2019 12:43:03 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iZerY-0007Ns-IB; Tue, 26 Nov 2019 12:42:56 -0500 Original-Received: from [176.228.60.248] (port=4161 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iZerX-0002mj-UC; Tue, 26 Nov 2019 12:42:56 -0500 In-reply-to: (message from Dmitry Gutov on Tue, 26 Nov 2019 01:50:23 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172458 Archived-At: > Cc: juri@linkov.net, 37774@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 26 Nov 2019 01:50:23 +0200 > > On 25.11.2019 18:00, Eli Zaretskii wrote: > > > Feel free to make that change (although when did you last see a > > context diff?). > > It's not for context diffs, it's for context around the changes in > unified diffs as well. Notice the gray background on the screenshot. Ah, okay. Still, feel free to change its :extend attribute. > > We need to modify all the themes we provide to specify :extend for > > faces where we do that by default. It seems there's no way around > > that, since the semantics of custom-theme-set-faces is clearly to > > reset all face attributes to 'unspecified' before applying the face > > spec, so keeping some attributes from the default face spec is out of > > the question, unfortunately. It's clear that the faces stuff was not > > designed to accommodate addition of attributes easily. > > Seems like it's a consequence of the implementation strategy. There were > a couple of others that had been proposed (splitting the attribute in > two, with different default values) or using a symbol property. Splitting into two attributes won't help here (quite the contrary, since we'd have to deal with 2 new attributes). As for the symbol property suggestion, see below. > You said the latter would complicate the face merging code (which makes > sense) and "is extremely unclean". I have to take you at your word here. You don't have to take my word for it, the code is there to read and make up your own mind. Basically, on the C level each Lisp face is represented by an array of its attributes, where each array element holds the value of the corresponding attribute. Once this array is computed, we can (and do) manipulate just the array, and for all practical purposes can forget about the face's symbol. Using a symbol property would then need to keep the symbol around at all times, which is inconvenient and would make the code ugly. But even if we'd overcome this annoyance, how do you specify this property for a face like below? '(:inherit foo :background "green" :underline "red") There's no symbol to put the property on. Do we say that such anonymous faces cannot support this attribute? Unclean.