[Top][All Lists]

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

Re: Emacs pretest: highlight line number in display-line-numbers-mode?

From: Robert Pluim
Subject: Re: Emacs pretest: highlight line number in display-line-numbers-mode?
Date: Fri, 20 Oct 2017 15:49:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Eli Zaretskii <> writes:

>> Date: Thu, 19 Oct 2017 13:43:06 -0700 (PDT)
>> From: Drew Adams <>
>> > This face is by default the same as line-number because of 2 reasons:
>> > 
>> >   . linum-mode did the same
>> ...chasing that rabbit: Why did `linum-mode' do that?
> I don't know, but too many differences from a previous feature tend to
> annoy people IME.

nlinum-mode has an option to highlight the current line, disabled by
default (I never turned it on because I didn't know it existed, but I
do have it turned on for the builtin support)

I'd vote for having the current line face have a background colour
set. Calculating line numbers is going to slow things down anyway, so
a little less speed doesn't matter to me. Something like:

diff --git i/lisp/faces.el w/lisp/faces.el
index a5f1d1dd32..a2bb2cd1b3 100644
--- i/lisp/faces.el
+++ w/lisp/faces.el
@@ -2487,7 +2487,12 @@ line-number
   :group 'display-line-numbers)
 (defface line-number-current-line
-  '((t :inherit line-number))
+  '((((class color) (background light))
+     :inherit line-number :background "grey95")
+    (((class color) (background dark))
+     :inherit line-number :background "grey10")
+    (t
+     :inherit line-number :background "gray"))
   "Face for displaying the current line number.
 This face is used when `display-line-numbers' is non-nil.

reply via email to

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