GNU bug report logs -
#35452
Line number faces should check for remapping of the default face
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 16 May 2019 17:32:56 +0300
with message-id <83ef4ycvvr.fsf <at> gnu.org>
and subject line Re: bug#35452: Line number faces should check for remapping of the default face
has caused the debbugs.gnu.org bug report #35452,
regarding Line number faces should check for remapping of the default face
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
35452: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35452
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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
[Message part 3 (message/rfc822, inline)]
> From: Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com>
> Cc: 35452 <at> 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.
This bug report was last modified 6 years and 3 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.