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#35452: Line number faces should check for remapping of the default face Date: Fri, 03 May 2019 12:01:07 +0300 Message-ID: <8336lvoqss.fsf@gnu.org> References: <878svvehl1.fsf@gmail.com> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="27156"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35452@debbugs.gnu.org To: Dario Gjorgjevski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 03 23:20:11 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hMfav-0012u5-SH for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 May 2019 23:19:49 +0200 Original-Received: from localhost ([127.0.0.1]:36867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMU5D-00027W-Pm for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 May 2019 05:02:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMU4y-00027D-II for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 05:02:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMU4x-0003QX-KO for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 05:02:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34153) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMU4x-0003QT-HU for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 05:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMU4x-0002Ct-BA for bug-gnu-emacs@gnu.org; Fri, 03 May 2019 05:02:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 May 2019 09:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35452 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35452-submit@debbugs.gnu.org id=B35452.15568740948447 (code B ref 35452); Fri, 03 May 2019 09:02:01 +0000 Original-Received: (at 35452) by debbugs.gnu.org; 3 May 2019 09:01:34 +0000 Original-Received: from localhost ([127.0.0.1]:47697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMU4T-0002CB-P0 for submit@debbugs.gnu.org; Fri, 03 May 2019 05:01:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hMU4R-0002By-D5 for 35452@debbugs.gnu.org; Fri, 03 May 2019 05:01:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMU4M-000369-7F; Fri, 03 May 2019 05:01:26 -0400 Original-Received: from [176.228.60.248] (port=3491 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hMU4L-0003hC-J1; Fri, 03 May 2019 05:01:25 -0400 In-reply-to: <878svvehl1.fsf@gmail.com> (message from Dario Gjorgjevski on Sat, 27 Apr 2019 14:52:10 +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:158721 Archived-At: > From: Dario Gjorgjevski > Date: Sat, 27 Apr 2019 14:52:10 +0200 > > Currently, the line number faces do not check for remapping of the > default face and use its attributes directly. In the default > configuration, this has no adverse effects since the `line-number' face > inherits from `default' explicitly, so any remapping is considered there. > > However, there is no need to have `line-number' inherit from `default' > explicitly since it already merges DEFAULT_FACE_ID. Instead, we can > check for remapping of DEFAULT_FACE_ID prior to merging the faces. > > The patch shown below accomplishes that. Thanks, but I don't think I understand the advantages of this approach vs the current one. Concretely, why would we want not to inherit from the 'default' face? Also, doesn't your change force the line-number face to change together with 'default', even if the user defines the face to not inherit from 'default'? With the current code, users are free to define the face without inheritance, and that will stop update the line-number face together with 'default', e.g. when the user enlarges the default face's font or makes it smaller. With your proposal, the size changes in 'default' will always be propagated to line-number, right? And finally, if we do make the proposed change, shouldn't we stop inheriting from 'default' at the same time?