Subject: Re: bug#51605: Fwd: [PATCH] Update themes to support mode-line

From: Stefan Kangas <[email-masked]>
Date: Sun, 5 Dec 2021 19:05:36 +0100

Stefan Kangas <[email-masked]> writes:

> I'm forwarding this patch to the bug tracker, that AFAICT was never
> installed or followed up on.  The first patch saw some discussion here:
>
> https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg00993.html
>
> -------------------- Start of forwarded message --------------------
[snip]
> a second attempt at including minimal line-number support in the
> default Emacs themes.
>
> This has made me think that maybe the best place to make the
> line-number-face inherit from fringe would be in the line-number
> code...  This might mean that we need an agreement that the fringe and
> the line-number are things that are semantically similar or, at least,
> different enough from the buffer.

AFAICT, the point of this patch is essentially changing the line-number
face to inherit the fringe face and line-number-current to have the
default foreground (to make the current line more visible).

I think this makes sense and looks good.  I checked, and this seems to
be what VSCode is doing too, so I don't think it's a controversial
design choice.

So I'd suggest installing the below diff, and then an adapted version of
the proposed patch from Pedro Andres Aranda Gutierrez.  Comments?

diff --git a/lisp/faces.el b/lisp/faces.el
index 9caba3a11b..16125950d1 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2494,7 +2494,7 @@ trailing-whitespace

 ;; Definition stolen from linum.el.
 (defface line-number
-  '((t :inherit (shadow default)))
+  '((t :inherit (fringe shadow default)))
   "Face for displaying line numbers.
 This face is used when `display-line-numbers' is non-nil.

@@ -2507,7 +2507,7 @@ line-number
   :group 'display-line-numbers)

 (defface line-number-current-line
-  '((t :inherit line-number))
+  '((t :foreground "black" :inherit line-number))
   "Face for displaying the current line number.
 This face is used when `display-line-numbers' is non-nil.