From unknown Tue Jun 17 01:48:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35452: Line number faces should check for remapping of the default face Resent-From: Dario Gjorgjevski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2019 15:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35452 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 35452@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155638013424860 (code B ref -1); Sat, 27 Apr 2019 15:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Apr 2019 15:48:54 +0000 Received: from localhost ([127.0.0.1]:35780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKPZO-0006St-Cc for submit@debbugs.gnu.org; Sat, 27 Apr 2019 11:48:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKMpX-00085N-HG for submit@debbugs.gnu.org; Sat, 27 Apr 2019 08:53:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:44324) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hKMpS-0004qX-97 for submit@debbugs.gnu.org; Sat, 27 Apr 2019 08:53:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKMpO-00058V-SY for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 08:53:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKMpN-0004jH-Kw for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 08:53:14 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:40240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hKMpN-0004UT-D8 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 08:53:13 -0400 Received: by mail-wm1-x32f.google.com with SMTP id h11so8292479wmb.5 for ; Sat, 27 Apr 2019 05:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=A+AS6vgvaw0o2ILtEHIW6rK2P/lg6u2DY0I0S0uY1Hk=; b=JIvJ3sqGUfRJjEETyXCYoR5D01oPvNA1fs8MObljUVE+hKozt83AJm014lozBxBzkE uEm9c6E7Yn7AeFV/iSNVEzYhojbNx/I5cgqJCaFk3SmcP46zTkwczT/bc5wWZFy2uOC7 WgjdpWvIL7sjd4VY9FpjsuUGObyjW95hexMK+U0Grz5HV7ePhDHuYytajSZoBs5G8CSQ ljRZSbeJNHBg9mZOuSfQWM3xBU9t8y4BObV8pbOMgVnhm6qYQGVwI/OVtjDk1j+pQ8jM gS1kj73Yn3T1VeRE9OKJKl13DtrMqS0mWIqJ5SKCvEA7cNDFAnf05aDc1nsf34ErLU45 aVWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=A+AS6vgvaw0o2ILtEHIW6rK2P/lg6u2DY0I0S0uY1Hk=; b=pxfR7F16W0/I9XLaqo9oILVmtHtLrZ9qhjze9ghAcwzRvxHtdqVTT1RSan1QvPQsFA BhJ702ka/p0oKiMZtGtXwjh6UjzmkpX3/oP+i2QHxr3DvAzKZFUqFQlv51oQPS+izAPY br06frRywhJq0no5jz0rpdfniUWFjD7o0z0NcNq9nGns9OoWtNy0/3avZsxoMXM0/ngY TtYvuBNs4vWGa2+7zmpASR0IPfbH/idbNil0/VhYpEULF9F0Ci1KIM5kZtGjv2DLzcio XQT4e3mpJt53wVrnrQkYQomMJwAyzII/O+t1uolhHNkAdA1n8TQd8cwjWMOo4eyls27B XpQQ== X-Gm-Message-State: APjAAAUuhE4HLQ3daR0fgoaX7kJ1gHlMwrQQwpfLYi6u/7zomzxO/DZN 4aqt2L56ICxOmkf79cBliSbjC3T74ao= X-Google-Smtp-Source: APXvYqzQ0g9R/kMIlYcM/OhgbWxP4NvloJXPepTUbiC4jdcmRFRDmMRoXkPnSJsSYA+OCicBtExNfA== X-Received: by 2002:a7b:c086:: with SMTP id r6mr10885494wmh.123.1556369580538; Sat, 27 Apr 2019 05:53:00 -0700 (PDT) Received: from dario-XPS-13-9370 ([77.28.239.119]) by smtp.gmail.com with ESMTPSA id h84sm30784245wmf.15.2019.04.27.05.52.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Apr 2019 05:52:59 -0700 (PDT) From: Dario Gjorgjevski Date: Sat, 27 Apr 2019 14:52:10 +0200 Message-ID: <878svvehl1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Sat, 27 Apr 2019 11:48:53 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. diff --git a/src/xdisp.c b/src/xdisp.c index d52d1333a0..1e7e31fb8a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21176,9 +21176,10 @@ maybe_produce_line_number (struct it *it) char lnum_buf[INT_STRLEN_BOUND (ptrdiff_t) + 1]; bool beyond_zv = IT_BYTEPOS (*it) >= ZV_BYTE ? true : false; ptrdiff_t lnum_offset = -1; /* to produce 1-based line numbers */ - int lnum_face_id = merge_faces (it->w, Qline_number, 0, DEFAULT_FACE_ID); + int base_face_id = lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID); + int lnum_face_id = merge_faces (it->w, Qline_number, 0, base_face_id); int current_lnum_face_id - = merge_faces (it->w, Qline_number_current_line, 0, DEFAULT_FACE_ID); + = merge_faces (it->w, Qline_number_current_line, 0, base_face_id); /* Compute point's line number if needed. */ if ((EQ (Vdisplay_line_numbers, Qrelative) || EQ (Vdisplay_line_numbers, Qvisual) -- Dario Gjorgjevski :: +389 (0)70 784 142 From unknown Tue Jun 17 01:48:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35452: Line number faces should check for remapping of the default face 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 To: Dario Gjorgjevski Cc: 35452@debbugs.gnu.org Received: via spool by 35452-submit@debbugs.gnu.org id=B35452.15568740948447 (code B ref 35452); Fri, 03 May 2019 09:02:01 +0000 Received: (at 35452) by debbugs.gnu.org; 3 May 2019 09:01:34 +0000 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 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 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 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 Date: Fri, 03 May 2019 12:01:07 +0300 Message-Id: <8336lvoqss.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <878svvehl1.fsf@gmail.com> (message from Dario Gjorgjevski on Sat, 27 Apr 2019 14:52:10 +0200) References: <878svvehl1.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From unknown Tue Jun 17 01:48:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35452: Line number faces should check for remapping of the default face Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2019 13:59: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 To: Dario Gjorgjevski Cc: 35452@debbugs.gnu.org Received: via spool by 35452-submit@debbugs.gnu.org id=B35452.155801509321352 (code B ref 35452); Thu, 16 May 2019 13:59:01 +0000 Received: (at 35452) by debbugs.gnu.org; 16 May 2019 13:58:13 +0000 Received: from localhost ([127.0.0.1]:55980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRGtg-0005YJ-Qb for submit@debbugs.gnu.org; Thu, 16 May 2019 09:58:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRGte-0005Y6-KR for 35452@debbugs.gnu.org; Thu, 16 May 2019 09:58:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRGtZ-0007Y7-Df; Thu, 16 May 2019 09:58:05 -0400 Received: from [176.228.60.248] (port=3372 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hRGtW-0006ho-8l; Thu, 16 May 2019 09:58:04 -0400 Date: Thu, 16 May 2019 16:57:53 +0300 Message-Id: <83mujmcxi6.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <87a7fmixj1.fsf@gmail.com> (message from Dario Gjorgjevski on Thu, 16 May 2019 11:00:50 +0200) References: <878svvehl1.fsf@gmail.com> <8336lvoqss.fsf@gnu.org> <87a7fmixj1.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [Forwarding to the bug tracker; please use Reply All in the future.] > From: Dario Gjorgjevski > Date: Thu, 16 May 2019 11:00:50 +0200 > > > 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? > > Indeed, there is no reason not to inherit from the default face. In > fact, what I suggested was making the inheritance _always hold_, i.e., > despite of the user's definitions of the line number faces. Which > brings us to the next point you brought up... > > > 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? > > I agree with you. In fact, this is exactly the reason why I had > suggested the change -- I was using a theme were the line number faces > were not set to inherit from default, and realized that > text-scale-adjust does not affect them. > > > And finally, if we do make the proposed change, shouldn't we stop > > inheriting from 'default' at the same time? > > Absolutely. > > With all this being said, I agree with you that it is best to let the > user choose whether he or she wants the line number faces to inherit > from the default one. So you agree that this bug should be closed without changing the current code? Thanks. From unknown Tue Jun 17 01:48:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35452: Fwd: bug#35452: Line number faces should check for remapping of the default face Resent-From: Dario Gjorgjevski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2019 14:31:02 +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 To: 35452@debbugs.gnu.org Received: via spool by 35452-submit@debbugs.gnu.org id=B35452.155801704124337 (code B ref 35452); Thu, 16 May 2019 14:31:02 +0000 Received: (at 35452) by debbugs.gnu.org; 16 May 2019 14:30:41 +0000 Received: from localhost ([127.0.0.1]:56008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRHP6-0006KS-Ut for submit@debbugs.gnu.org; Thu, 16 May 2019 10:30:41 -0400 Received: from mail-pl1-f182.google.com ([209.85.214.182]:43893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRCKj-0006SN-Av for 35452@debbugs.gnu.org; Thu, 16 May 2019 05:05:52 -0400 Received: by mail-pl1-f182.google.com with SMTP id n8so1287980plp.10 for <35452@debbugs.gnu.org>; Thu, 16 May 2019 02:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=RjBiNjpMOcgzT0nqa9NnHYxL6tUsoVOI0enrB28zScU=; b=QbX1iG2vV9gHi5/VotGHn/yr+LiT0t/1dUIEDtmVycbE5bUBf3qqBW2rY0Fxx/xzh7 jRtCYyH+1a27bpcwNwwWIEx1EqMjy/bZdiB7uza4bXoSrMYQaDEHOxVtzEhvXGYwSt4B qMFXYg02NpVgyuclGZa8IeakjW7DiPwsCBmkP1SW3nD9vazWbXcBsg3fMHEWvL7c9TyR bnLf10+rmL2zPOEyQKbav+CCSrx2hJ3fAWEEjJkQg/nb557cJMbRbsHz7pI9dKFwHu2o wIV7Q72ItXtYmmUaeiVfVkqSB+SVNZtJEJH9yI+ZTFV81xkz1TS2J9tWsWEZ9pvzxLt9 u19w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=RjBiNjpMOcgzT0nqa9NnHYxL6tUsoVOI0enrB28zScU=; b=PG6NMEsw33H91GZSxcuGsSEulBW9xZGaHUl/kBNCucwhXYdS1xTcf/SICDFZC6ox1Y /8cNSSn87D6X6D1PeEfv77kXyod2itcO0h6vCficHaRmzY8jx/zSOblAbhkRwlal9yTr Bst1SELQJA529Zhk7Q0rm27utth+F/VladlTKZu9l0AJHH9AEhmDTzA+8+5YCmPlAM6u eMATDG1wq/WeSRWYnGrX62iYOxMN2km64jcUdQTKIlsriXMXmB8ZmgT6KwyK6opxHA7l YnoNj91mIWNmaS75els0Rr0GReVsoEvZ7UiYKP9mgzPydRQy64NC5UeQn5ITTTYzAwna YBsw== X-Gm-Message-State: APjAAAX+ZSuyPSTsAkZ50yfOTkBrwBxQjZM5aAR548yzM+D5SL74Gzxx 55H5alNZjeJDTFHZlEnxMGfWPttcJt8C2avucnRte6yB X-Google-Smtp-Source: APXvYqzQi1O/djghXggkoZALb8IuT2+hIizv4C0JTodJg1upZIIR6wNtbOIZhos31TU9UivJSB5f/7I9gdrwN9w7AuU= X-Received: by 2002:a17:902:442:: with SMTP id 60mr10352712ple.325.1557997542462; Thu, 16 May 2019 02:05:42 -0700 (PDT) MIME-Version: 1.0 References: <878svvehl1.fsf@gmail.com> <8336lvoqss.fsf@gnu.org> <87a7fmixj1.fsf@gmail.com> In-Reply-To: <87a7fmixj1.fsf@gmail.com> From: Dario Gjorgjevski Date: Thu, 16 May 2019 11:05:06 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 16 May 2019 10:30:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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? Indeed, there is no reason not to inherit from the default face. In fact, what I suggested was making the inheritance _always hold_, i.e., despite of the user's definitions of the line number faces. Which brings us to the next point you brought up... > 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? I agree with you. In fact, this is exactly the reason why I had suggested the change -- I was using a theme were the line number faces were not set to inherit from default, and realized that text-scale-adjust does not affect them. > And finally, if we do make the proposed change, shouldn't we stop > inheriting from 'default' at the same time? Absolutely. With all this being said, I agree with you that it is best to let the user choose whether he or she wants the line number faces to inherit from the default one. -- Dario Gjorgjevski :: dario.gjorgjevski@gmail.com :: +389 (0)70 784 142 From unknown Tue Jun 17 01:48:27 2025 X-Loop: help-debbugs@gnu.org Subject: bug#35452: Line number faces should check for remapping of the default face Resent-From: Dario Gjorgjevski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 May 2019 14:32:02 +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 To: Eli Zaretskii Cc: 35452@debbugs.gnu.org Received: via spool by 35452-submit@debbugs.gnu.org id=B35452.155801710424439 (code B ref 35452); Thu, 16 May 2019 14:32:02 +0000 Received: (at 35452) by debbugs.gnu.org; 16 May 2019 14:31:44 +0000 Received: from localhost ([127.0.0.1]:56011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRHQ7-0006M5-HU for submit@debbugs.gnu.org; Thu, 16 May 2019 10:31:43 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:38322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRH2l-0005mP-Cf for 35452@debbugs.gnu.org; Thu, 16 May 2019 10:07:36 -0400 Received: by mail-wr1-f49.google.com with SMTP id d18so3577691wrs.5 for <35452@debbugs.gnu.org>; Thu, 16 May 2019 07:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=prw4AbTStgAmUQRogSUbTTEWUGrgn8DZ+Qv+MFhLb7M=; b=sea5RBXtlJq9/5vl7d/4kAQOCc/1L+fHfUgAbCN5xtLh3LiaUk4tVTE1GAeylIm2Wg WAZBjvmHLSKSmWqCF3ZIAPVcuqDrXg4zpiz0uKTEWNKyt372JAd4F2vSLaIw/JbqbeHg zSga7cm87HTkJT8fjKTmGh7DoHB0AlOO+LlNYC3XCJ2JTzbxz0HJmdCLRra6kXDPInsE HEpNITRJjOwxotwBp0R/KP50zEPyYe91xFU4aMm1Aqw6hCxsSvSw0829mxNIAHble8aE nlzXLi4Lu2mGDspUC7/XwgDfaaJnx5Xj1Fn/kzu+dEimqv+ZO9cp6j+N1JNapo+HRK7a /jkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=prw4AbTStgAmUQRogSUbTTEWUGrgn8DZ+Qv+MFhLb7M=; b=ARau8hF6voU+fHEpALFPSB2IPlz+7s/vqr5yRrWeDmcDkFNOH1RfFBvw9imtz3c18l 9N94P8ZpJA+87u3Lp3ky0lYfGFulwceOI3pXQd/nZ8pgaKLDc+NyRrnEREL7WpSprjKt me4t/ZxITRPkelUoO9wsf0L5hS5/4b5RWP16Wz7hvpd7FuQ6CzFr0GLv9LH0R0ymCMW0 ZB6NtWdzYYympr3/9JpnHDez1RV+BVk53oUIzGiQbwYT96yxeeIEfHtuHfLFCRMy3/pM dPYwccZyeZ7KrKSsXegkSQAYn76mEO1tLfX/lqZVWU977iaS04FVQwN60KcQ2tAmhIwm SCnQ== X-Gm-Message-State: APjAAAUUTcS2RCP0LkoEEk92K4g3FzyWKVLqlVT6ha0CMYH48tvjobS6 qLE5iI/MSVsmxb6sUumP7UsLsUAobU8= X-Google-Smtp-Source: APXvYqwQXV2uMgTwMQqe/IbSknehuiuU1l0PPcPCPvZ/XMF3OCNy3QCKnrbTsxIoB2WiXQtBUmLe5Q== X-Received: by 2002:adf:dc08:: with SMTP id t8mr29032457wri.220.1558015649006; Thu, 16 May 2019 07:07:29 -0700 (PDT) Received: from dario-XPS-13-9370.gmail.com (p4FE1B137.dip0.t-ipconnect.de. [79.225.177.55]) by smtp.gmail.com with ESMTPSA id n2sm7302028wra.89.2019.05.16.07.07.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 May 2019 07:07:27 -0700 (PDT) From: Dario Gjorgjevski References: <878svvehl1.fsf@gmail.com> <8336lvoqss.fsf@gnu.org> <87a7fmixj1.fsf@gmail.com> <83mujmcxi6.fsf@gnu.org> Date: Thu, 16 May 2019 16:07:25 +0200 In-Reply-To: <83mujmcxi6.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 May 2019 16:57:53 +0300") Message-ID: <87zhnmze5e.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 16 May 2019 10:31:42 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > [Forwarding to the bug tracker; please use Reply All in the future.] Sorry for that. > So you agree that this bug should be closed without changing the > current code? > > Thanks. Yes. Thank you likewise. -- Dario Gjorgjevski :: dario.gjorgjevski@gmail.com :: +389 (0)70 784 142 From unknown Tue Jun 17 01:48:27 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dario Gjorgjevski Subject: bug#35452: closed (Re: bug#35452: Line number faces should check for remapping of the default face) Message-ID: References: <83ef4ycvvr.fsf@gnu.org> <878svvehl1.fsf@gmail.com> X-Gnu-PR-Message: they-closed 35452 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 35452@debbugs.gnu.org Date: Thu, 16 May 2019 14:34:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1558017241-24731-1" This is a multi-part message in MIME format... ------------=_1558017241-24731-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #35452: Line number faces should check for remapping of the default face which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 35452@debbugs.gnu.org. --=20 35452: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D35452 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1558017241-24731-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 35452-done) by debbugs.gnu.org; 16 May 2019 14:33:13 +0000 Received: from localhost ([127.0.0.1]:56025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRHRZ-0006Pr-ER for submit@debbugs.gnu.org; Thu, 16 May 2019 10:33:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRHRY-0006Pf-Ep for 35452-done@debbugs.gnu.org; Thu, 16 May 2019 10:33:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRHRR-0003pl-RO; Thu, 16 May 2019 10:33:06 -0400 Received: from [176.228.60.248] (port=1780 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hRHRR-0007eY-Bw; Thu, 16 May 2019 10:33:05 -0400 Date: Thu, 16 May 2019 17:32:56 +0300 Message-Id: <83ef4ycvvr.fsf@gnu.org> From: Eli Zaretskii To: Dario Gjorgjevski In-reply-to: <87zhnmze5e.fsf@gmail.com> (message from Dario Gjorgjevski on Thu, 16 May 2019 16:07:25 +0200) Subject: Re: bug#35452: Line number faces should check for remapping of the default face References: <878svvehl1.fsf@gmail.com> <8336lvoqss.fsf@gnu.org> <87a7fmixj1.fsf@gmail.com> <83mujmcxi6.fsf@gnu.org> <87zhnmze5e.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 35452-done Cc: 35452-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Dario Gjorgjevski > Cc: 35452@debbugs.gnu.org > Date: Thu, 16 May 2019 16:07:25 +0200 > > > So you agree that this bug should be closed without changing the > > current code? > > > > Thanks. > > Yes. Thank you likewise. Thanks, done. ------------=_1558017241-24731-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 27 Apr 2019 15:48:54 +0000 Received: from localhost ([127.0.0.1]:35780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKPZO-0006St-Cc for submit@debbugs.gnu.org; Sat, 27 Apr 2019 11:48:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKMpX-00085N-HG for submit@debbugs.gnu.org; Sat, 27 Apr 2019 08:53:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:44324) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hKMpS-0004qX-97 for submit@debbugs.gnu.org; Sat, 27 Apr 2019 08:53:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKMpO-00058V-SY for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 08:53:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hKMpN-0004jH-Kw for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 08:53:14 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:40240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hKMpN-0004UT-D8 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2019 08:53:13 -0400 Received: by mail-wm1-x32f.google.com with SMTP id h11so8292479wmb.5 for ; Sat, 27 Apr 2019 05:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=A+AS6vgvaw0o2ILtEHIW6rK2P/lg6u2DY0I0S0uY1Hk=; b=JIvJ3sqGUfRJjEETyXCYoR5D01oPvNA1fs8MObljUVE+hKozt83AJm014lozBxBzkE uEm9c6E7Yn7AeFV/iSNVEzYhojbNx/I5cgqJCaFk3SmcP46zTkwczT/bc5wWZFy2uOC7 WgjdpWvIL7sjd4VY9FpjsuUGObyjW95hexMK+U0Grz5HV7ePhDHuYytajSZoBs5G8CSQ ljRZSbeJNHBg9mZOuSfQWM3xBU9t8y4BObV8pbOMgVnhm6qYQGVwI/OVtjDk1j+pQ8jM gS1kj73Yn3T1VeRE9OKJKl13DtrMqS0mWIqJ5SKCvEA7cNDFAnf05aDc1nsf34ErLU45 aVWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=A+AS6vgvaw0o2ILtEHIW6rK2P/lg6u2DY0I0S0uY1Hk=; b=pxfR7F16W0/I9XLaqo9oILVmtHtLrZ9qhjze9ghAcwzRvxHtdqVTT1RSan1QvPQsFA BhJ702ka/p0oKiMZtGtXwjh6UjzmkpX3/oP+i2QHxr3DvAzKZFUqFQlv51oQPS+izAPY br06frRywhJq0no5jz0rpdfniUWFjD7o0z0NcNq9nGns9OoWtNy0/3avZsxoMXM0/ngY TtYvuBNs4vWGa2+7zmpASR0IPfbH/idbNil0/VhYpEULF9F0Ci1KIM5kZtGjv2DLzcio XQT4e3mpJt53wVrnrQkYQomMJwAyzII/O+t1uolhHNkAdA1n8TQd8cwjWMOo4eyls27B XpQQ== X-Gm-Message-State: APjAAAUuhE4HLQ3daR0fgoaX7kJ1gHlMwrQQwpfLYi6u/7zomzxO/DZN 4aqt2L56ICxOmkf79cBliSbjC3T74ao= X-Google-Smtp-Source: APXvYqzQ0g9R/kMIlYcM/OhgbWxP4NvloJXPepTUbiC4jdcmRFRDmMRoXkPnSJsSYA+OCicBtExNfA== X-Received: by 2002:a7b:c086:: with SMTP id r6mr10885494wmh.123.1556369580538; Sat, 27 Apr 2019 05:53:00 -0700 (PDT) Received: from dario-XPS-13-9370 ([77.28.239.119]) by smtp.gmail.com with ESMTPSA id h84sm30784245wmf.15.2019.04.27.05.52.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Apr 2019 05:52:59 -0700 (PDT) From: Dario Gjorgjevski To: bug-gnu-emacs@gnu.org Subject: Line number faces should check for remapping of the default face Date: Sat, 27 Apr 2019 14:52:10 +0200 Message-ID: <878svvehl1.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 27 Apr 2019 11:48:53 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. diff --git a/src/xdisp.c b/src/xdisp.c index d52d1333a0..1e7e31fb8a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21176,9 +21176,10 @@ maybe_produce_line_number (struct it *it) char lnum_buf[INT_STRLEN_BOUND (ptrdiff_t) + 1]; bool beyond_zv = IT_BYTEPOS (*it) >= ZV_BYTE ? true : false; ptrdiff_t lnum_offset = -1; /* to produce 1-based line numbers */ - int lnum_face_id = merge_faces (it->w, Qline_number, 0, DEFAULT_FACE_ID); + int base_face_id = lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID); + int lnum_face_id = merge_faces (it->w, Qline_number, 0, base_face_id); int current_lnum_face_id - = merge_faces (it->w, Qline_number_current_line, 0, DEFAULT_FACE_ID); + = merge_faces (it->w, Qline_number_current_line, 0, base_face_id); /* Compute point's line number if needed. */ if ((EQ (Vdisplay_line_numbers, Qrelative) || EQ (Vdisplay_line_numbers, Qvisual) -- Dario Gjorgjevski :: +389 (0)70 784 142 ------------=_1558017241-24731-1--