From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#37774: 27.0.50; new :extend attribute broke visuals of all themes and other packages Date: Thu, 7 Nov 2019 16:41:36 +0100 Message-ID: <20191107154136.nqujd5olhudr5nvr@Ergus> References: <87o8xwrjba.fsf@bernoul.li> <834kzooo8e.fsf@gnu.org> <877e4d7yzf.fsf@bernoul.li> <83k18bg55h.fsf@gnu.org> Reply-To: Ergus Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ffmuqa6wjq6xprsm" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="43029"; mail-complaints-to="usenet@blaine.gmane.org" Cc: martin rudalics , 37774@debbugs.gnu.org, jonas@bernoul.li To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 07 16:45:24 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 1iSjyO-000B40-4i for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 16:45:24 +0100 Original-Received: from localhost ([::1]:44542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSjyM-0001HJ-RC for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Nov 2019 10:45:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33852) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSjy3-0001EP-TN for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 10:45:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSjy2-0002cI-PA for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 10:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34888) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSjy2-0002bU-LO for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 10:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSjy2-0007D5-IK for bug-gnu-emacs@gnu.org; Thu, 07 Nov 2019 10:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Nov 2019 15:45:02 +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.157314144527615 (code B ref 37774); Thu, 07 Nov 2019 15:45:02 +0000 Original-Received: (at 37774) by debbugs.gnu.org; 7 Nov 2019 15:44:05 +0000 Original-Received: from localhost ([127.0.0.1]:43708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSjx4-0007B6-Cg for submit@debbugs.gnu.org; Thu, 07 Nov 2019 10:44:03 -0500 Original-Received: from sonic313-35.consmr.mail.ne1.yahoo.com ([66.163.185.58]:35106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSjx1-0007AJ-Uc for 37774@debbugs.gnu.org; Thu, 07 Nov 2019 10:44:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1573141434; bh=0F3R6Ae8CZ6MVJDsJ2yIqRA9Z2xV56LP6iXXFkU7vOg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=JvgfAVkGabhrDfLWg+izwmzT14szZZ1/mFHSzPN/zc5d6PWWX2XzkX47xjqyDnPsmERNQPNOG8V8gPu6kvheaZv1IxEdVN/pYz+yJBIP1injMk5JWgaiWdmYZEYEkJoC505SuWNp8o4OPsCi0IN9bL+KSjBxQXjx+mk86gQ2JTb/TDTJN8wP+hO/FgyOypwm9Xk8BmbxysouhHFoLmdT6Zli/CnEh9vXsMxrWORCirNEc0lvWHG2G0ljYVxZ0Q3tbd1wpzulJI6ytbOulbA1RrSr+EZZdL4/LP3GqNmE3S7hK5DmxSSGHR8dhEkSZADCReVRYuCGqxquz7u58euhLg== X-YMail-OSG: N_6BpMEVRDvd.miR6A7lED5GPdAEx7ojsA-- Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Thu, 7 Nov 2019 15:43:54 +0000 Original-Received: by smtp427.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID db4cf1091158350b7debba8c3dcf2a87; Thu, 07 Nov 2019 15:41:51 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83k18bg55h.fsf@gnu.org> X-Mailer: WebService/1.1.14680 hermes Apache-HttpAsyncClient/4.1.4 (Java/1.8.0_181) 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:171089 Archived-At: --ffmuqa6wjq6xprsm Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On Thu, Nov 07, 2019 at 03:58:02PM +0200, Eli Zaretskii wrote: >> Cc: 37774@debbugs.gnu.org >> From: martin rudalics >> Date: Wed, 6 Nov 2019 18:06:04 +0100 >> >> One surprising effect with recent master is that with emacs -Q >> evaluating >> >> (custom-set-faces >> '(font-lock-comment-face ((((class color) (background light)) (:background "Beige" :foreground "Black"))))) >> >> makes the comment background extend to the end of the window. This >> means that unless I explicitly supply :extend nil, the behavior is as >> with Emacs 26. Is that intended? > >No, of course it isn't intended. > >Jimmy, are you looking into this? It sounds like there's a difference >with processing the :extend attribute when its value is 'unspecified' >and when it's nil. Because just adding > > (set-face-extend 'FOO nil) > >for the faces named by Jonas and Martin makes the problem go away, and >the faces aren't extended, as I'd expect. > >Let me know if you need help in debugging or resolving this. > >Thanks. Hi: Please try the attached patch. (I'm in a network where I can't use git now.) Best, Ergus --ffmuqa6wjq6xprsm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="test.patch" diff --git a/src/xfaces.c b/src/xfaces.c index 3806fa90e2..ff4e2796f2 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -2063,7 +2063,10 @@ merge_face_vectors (struct window *w, struct frame *f, eassert (attr_filter < LFACE_VECTOR_SIZE); /* When FROM sets attr_filter to nil explicitly we don't merge it. */ - if (attr_filter > 0 && NILP(from[attr_filter])) + if (attr_filter > 0 && (NILP(from[attr_filter]) + || (UNSPECIFIEDP(from[attr_filter]) + && (NILP (from[LFACE_INHERIT_INDEX]) + || UNSPECIFIEDP (from[LFACE_INHERIT_INDEX]))))) return; /* If FROM inherits from some other faces, merge their attributes into @@ -2082,7 +2085,7 @@ merge_face_vectors (struct window *w, struct frame *f, else if (UNSPECIFIEDP (from[attr_filter])) /* FROM don't specify filter */ { Lisp_Object tmp[LFACE_VECTOR_SIZE]; - memcpy (tmp, to, LFACE_VECTOR_SIZE * sizeof *tmp); + memcpy (tmp, to, LFACE_VECTOR_SIZE * sizeof(*tmp)); merge_face_ref (w, f, from[LFACE_INHERIT_INDEX], tmp, false, named_merge_points, attr_filter); @@ -2177,7 +2180,8 @@ merge_named_face (struct window *w, && !UNSPECIFIEDP(from[attr_filter])) || (!NILP(from[attr_filter]) /* Filter, unspecified, but inherited. */ && UNSPECIFIEDP(from[attr_filter]) - && !NILP (from[LFACE_INHERIT_INDEX])))) + && !NILP (from[LFACE_INHERIT_INDEX]) + && !UNSPECIFIEDP (from[LFACE_INHERIT_INDEX])))) merge_face_vectors (w, f, from, to, named_merge_points, attr_filter); return ok; --ffmuqa6wjq6xprsm--