emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colorful line numbers


From: Eli Zaretskii
Subject: Re: Colorful line numbers
Date: Fri, 22 Jul 2022 14:00:23 +0300

> From: João Távora <joaotavora@gmail.com>
> Date: Fri, 22 Jul 2022 08:50:21 +0100
> 
> As far as I can read from maybe_produce_line_number in xdisp.c the face
> is one of a fixed set: line-number, line-number-current-line,
> line-number-major-tick or line-number-minor-tick.

Yes.

> IOW, there is no Elisp mechanism for changing the line number on a
> line-by-line basis, for example with some text property set on any
> character of the given line.
> 
> Could we implement one such mechanism?

No.  The native line-number display is implemented inside the low
level of the display code, and I don't want to call to Lisp from
there.  If nothing else, it will slow down redisplay when line numbers
are used, whereas avoiding that slowdown was an explicit goal of
developing native line-number display.

Why aren't the existing faces enough?  And if they aren't enough, why
cannot you use line-number-mode?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]