Subject: Fwd: [PATCH] Update themes to support mode-line

From: Stefan Kangas <[email-masked]>
Date: Fri, 5 Nov 2021 00:27:01 -0700

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 --------------------
From: Pedro Andres Aranda Gutierrez <[email-masked]>
Date: Fri, 18 Dec 2020 08:58:34 +0100
Subject: PATCH: update themes to support mode-line (no bold in
 line-number-current-line)
To: [email-masked]
diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el
index 67a3b11763..6147700e3c 100644
--- a/etc/themes/adwaita-theme.el
+++ b/etc/themes/adwaita-theme.el
@@ -97,6 +97,13 @@ adwaita
    `(gnus-cite-2 ((,class (:foreground "#0084C8"))))
 
    `(diff-added ((,class (:bold t :foreground "#4E9A06"))))
-   `(diff-removed ((,class (:bold t :foreground "#F5666D"))))))
+   `(diff-removed ((,class (:bold t :foreground "#F5666D")))))
+  ;; emacs >= 26.1
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'adwaita
+     `(line-number ((,class (:inherit fringe :foreground "dark gray"))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground "black"))))))
+  )
 
 ;;; adwaita-theme.el  ends here
diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el
index 2557918ed7..df87867290 100644
--- a/etc/themes/deeper-blue-theme.el
+++ b/etc/themes/deeper-blue-theme.el
@@ -105,7 +105,14 @@ deeper-blue
    `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white"))))
    `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white"))))
    `(success ((,class (:foreground "SeaGreen2"))))
-   `(warning ((,class (:foreground "Yellow"))))))
+   `(warning ((,class (:foreground "Yellow")))))
+  ;; emacs >= 26.1
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'deeper-blue
+   `(line-number ((,class (:inherit fringe))))
+   `(line-number-current-line ((,class (:inherit line-number :foreground "DeepSkyBlue1"))))))
+  )
 
 (provide-theme 'deeper-blue)
 
diff --git a/etc/themes/dichromacy-theme.el b/etc/themes/dichromacy-theme.el
index 89b5a4e452..b57c3efdd9 100644
--- a/etc/themes/dichromacy-theme.el
+++ b/etc/themes/dichromacy-theme.el
@@ -109,11 +109,17 @@ dichromacy
    `(message-header-to ((,class (:weight bold :foreground ,blue))))
    `(message-cited-text ((,class (:slant italic :foreground ,bluegreen))))
    `(message-separator ((,class (:weight bold :foreground ,redpurple))))
-   ;; Flyspell
-   `(flyspell-duplicate ((,class (:weight unspecified :foreground unspecified
+    ;; Flyspell
+    `(flyspell-duplicate ((,class (:weight unspecified :foreground unspecified
 				  :slant unspecified :underline ,orange))))
    `(flyspell-incorrect ((,class (:weight unspecified :foreground unspecified
-				  :slant unspecified :underline ,redpurple)))))
+				          :slant unspecified :underline ,redpurple)))))
+  ;; emacs >= 26.1
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'dichromacy
+     `(line-number ((,class (:inherit fringe :foreground ,bluegreen))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground "black"))))))
 
   (custom-theme-set-variables
    'dichromacy
diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el
index f104c845ff..bebddba82f 100644
--- a/etc/themes/leuven-theme.el
+++ b/etc/themes/leuven-theme.el
@@ -1027,8 +1027,14 @@ leuven
    ;; `(ztreep-header-face ((,class ())))
    ;; `(ztreep-leaf-face ((,class ())))
    ;; `(ztreep-node-face ((,class ())))
-
-   ))
+   )
+  ;; emacs >= 26.1
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'leuven
+     `(line-number ((,class (:inherit fringe))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground "black"))))))
+  )
 
 (custom-theme-set-variables 'leuven
 
diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el
index c6d3c92bce..017555d57f 100644
--- a/etc/themes/light-blue-theme.el
+++ b/etc/themes/light-blue-theme.el
@@ -57,7 +57,14 @@ light-blue
    `(font-lock-string-face ((,class (:foreground "Magenta4"))))
    `(font-lock-warning-face ((,class (:foreground "orange red" :weight bold))))
    ;; Compilation faces
-   `(next-error ((,class (:inherit region :background "SkyBlue"))))))
+   `(next-error ((,class (:inherit region :background "SkyBlue")))))
+  ;; emacs >= 26.1
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'light-blue
+     `(line-number ((,class (:inherit fringe :foreground "dim gray"))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground "black"))))))
+  )
 
 (provide-theme 'light-blue)
 
diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el
index 195d40d7af..ea96061152 100644
--- a/etc/themes/manoj-dark-theme.el
+++ b/etc/themes/manoj-dark-theme.el
@@ -698,6 +698,12 @@ manoj-dark
  '(woman-bold-face ((t (:bold t))))
  '(woman-italic-face ((t (:foreground "beige"))))
  '(woman-unknown-face ((t (:foreground "LightSalmon")))))
+;; emacs >= 26.1
+(when (>= emacs-major-version 26)
+  (custom-theme-set-faces
+   'manoj-dark
+   '(line-number ((t (:inherit fringe :foreground "dark gray"))))
+   '(line-number-current-line ((t (:inherit line-number :foreground "white"))))))
 
 (provide-theme 'manoj-dark)
 
diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el
index ff9af0c744..18a2f4ddc1 100644
--- a/etc/themes/misterioso-theme.el
+++ b/etc/themes/misterioso-theme.el
@@ -101,7 +101,15 @@ misterioso
    `(message-header-subject ((,class (:foreground "#dbdb95"))))
    `(message-header-to ((,class (:foreground "#00ede1"))))
    `(message-cited-text ((,class (:foreground "#74af68"))))
-   `(message-separator ((,class (:foreground "#23d7d7"))))))
+   `(message-separator ((,class (:foreground "#23d7d7")))))
+  ;; emacs >= 26.1
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'misterioso
+     `(line-number ((,class (:inherit fringe))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground "white"))))
+     ))
+  )
 
 (custom-theme-set-variables
  'misterioso
diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el
index cf1a98bfee..da27108966 100644
--- a/etc/themes/tango-dark-theme.el
+++ b/etc/themes/tango-dark-theme.el
@@ -164,6 +164,13 @@ tango-dark
    `(semantic-tag-boundary-face ((,class (:overline ,blue-1))))
    `(semantic-unmatched-syntax-face ((,class (:underline ,red-1)))))
 
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'tango-dark
+     `(line-number ((,class (:inherit fringe :foreground ,cham-2))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground ,alum-1))))
+     ))
+
   (custom-theme-set-variables
    'tango-dark
    `(ansi-color-names-vector [,alum-7 ,red-0 ,cham-0 ,butter-1
diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el
index 6166657c14..5adedd499e 100644
--- a/etc/themes/tango-theme.el
+++ b/etc/themes/tango-theme.el
@@ -146,6 +146,12 @@ tango
      ((,class (:underline  ,orange-3))))
    `(semantic-tag-boundary-face ((,class (:overline   ,blue-1))))
    `(semantic-unmatched-syntax-face ((,class (:underline  ,red-1)))))
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'tango
+     `(line-number ((,class (:inherit fringe :foreground ,alum-5))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground ,alum-6))))
+     ))
 
   (custom-theme-set-variables
    'tango
diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el
index f3c9ced5b0..12fbf862e6 100644
--- a/etc/themes/tsdh-dark-theme.el
+++ b/etc/themes/tsdh-dark-theme.el
@@ -142,6 +142,13 @@ tsdh-dark
  '(widget-field ((t (:box (:line-width 2 :color "grey75" :style pressed-button)))))
  '(window-number-face ((t (:foreground "red" :weight bold)))))
 
+(when (>= emacs-major-version 26)
+  (custom-theme-set-faces
+   'tsdh-dark
+   '(line-number ((t (:inherit fringe :foreground "grey75"))))
+   '(line-number-current-line ((t (:inherit line-number :foreground "white"))))
+   )
+  )
 (provide-theme 'tsdh-dark)
 
 ;;; tsdh-dark-theme.el ends here
diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el
index 46443edfd4..3f725457b0 100644
--- a/etc/themes/tsdh-light-theme.el
+++ b/etc/themes/tsdh-light-theme.el
@@ -104,6 +104,14 @@ tsdh-light
  '(show-paren-mismatch ((t (:background "deep pink" :weight bold))))
  '(window-number-face ((t (:foreground "red" :weight bold)))))
 
+(when (>= emacs-major-version 26)
+  (custom-theme-set-faces
+   'tsdh-light
+   '(line-number ((t (:inherit fringe :foreground "dark grey"))))
+   '(line-number-current-line ((t (:inherit line-number :foreground "black"))))
+   )
+  )
+
 (provide-theme 'tsdh-light)
 
 ;;; tsdh-light-theme.el ends here
diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el
index f1abdb3895..e7b14b8f5f 100644
--- a/etc/themes/wheatgrass-theme.el
+++ b/etc/themes/wheatgrass-theme.el
@@ -80,7 +80,14 @@ wheatgrass
    `(realgud-bp-line-disabled-face ((,class (:underline "salmon"))))
    `(realgud-file-name             ((,class (:foreground "dark khaki"))))
    `(realgud-line-number           ((,class (:foreground "dark cyan"))))
-   `(realgud-backtrace-number      ((,class (:foreground "dark cyan" :weight bold))))))
+   `(realgud-backtrace-number      ((,class (:foreground "dark cyan" :weight bold)))))
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'wheatgrass
+     `(line-number ((,class (:inherit fringe))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground "white"))))
+     ))
+  )
 
 (provide-theme 'wheatgrass)
 
diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el
index ee42e4f215..debabb9099 100644
--- a/etc/themes/whiteboard-theme.el
+++ b/etc/themes/whiteboard-theme.el
@@ -95,7 +95,15 @@ whiteboard
    `(region ((,class (:background "SkyBlue1"))))
    `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white"))))
    `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white"))))
-   `(warning ((,class (:foreground "Yellow4"))))))
+   `(warning ((,class (:foreground "Yellow4")))))
+
+  (when (>= emacs-major-version 26)
+    (custom-theme-set-faces
+     'whiteboard
+     `(line-number ((,class (:inherit fringe))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground "DodgerBlue2"))))
+     ))
+  )
 
 (provide-theme 'whiteboard)
 
diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el
index 4df5f5a3f1..6f0f82101f 100644
--- a/etc/themes/wombat-theme.el
+++ b/etc/themes/wombat-theme.el
@@ -93,7 +93,13 @@ wombat
    `(message-header-subject ((,class (:foreground "#cae682"))))
    `(message-header-to ((,class (:foreground "#cae682"))))
    `(message-cited-text ((,class (:foreground "#99968b"))))
-   `(message-separator ((,class (:foreground "#e5786d" :weight bold))))))
+   `(message-separator ((,class (:foreground "#e5786d" :weight bold)))))
+  (when (> emacs-major-version 26)
+    (custom-theme-set-faces
+     'wombat
+     `(line-number ((,class (:inherit fringe))))
+     `(line-number-current-line ((,class (:inherit line-number :foreground "#8ac6f2"))))))
+  )
 
 (custom-theme-set-variables
  'wombat