Subject: bug#78867: closed (Re: bug#78867: [PATCH] Define dedicated faces for the package.el mode line)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 28 Jun 2025 09:53:02 +0000

Your bug report

#78867: [PATCH] Define dedicated faces for the package.el mode line

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78867: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78867
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78867: [PATCH] Define dedicated faces for the package.el mode line
From: Eli Zaretskii <[email-masked]>
To: Protesilaos Stavrou <[email-masked]>
Cc: [email-masked]
Date: Sat, 28 Jun 2025 12:51:46 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Mon, 23 Jun 2025 09:13:43 +0300
> From: Protesilaos Stavrou <[email-masked]>
> 
> Dear maintainers,
> 
> The new mode line format for 'list-packages' reuses existing faces 
> instead of defining its own.
> 
> This can be a problem for certain themes.
> 
> The attached patch defines the relevant faces. Themes can customise 
> those to meet their stated goals.

Thanks, installed on the master branch, and closing the bug.

Subject: [PATCH] Define dedicated faces for the package.el mode line
From: Protesilaos Stavrou <[email-masked]>
To: [email-masked]
Date: Mon, 23 Jun 2025 09:13:43 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear maintainers,

The new mode line format for 'list-packages' reuses existing faces 
instead of defining its own.

This can be a problem for certain themes.

The attached patch defines the relevant faces. Themes can customise 
those to meet their stated goals.

All the best,
Protesilaos (or simple "Prot")

From 285c7f150e4174b48f6f7cddfc7fb8b7181786b7 Mon Sep 17 00:00:00 2001
Message-ID: <[email-masked]>
From: Protesilaos Stavrou <[email-masked]>
Date: Mon, 23 Jun 2025 08:30:48 +0300
Subject: [PATCH] Define dedicated faces for the package.el mode line

* lisp/emacs-lisp/package.el
(package-menu--set-mode-line-format): Apply the faces.
(package-mode-line-total, package-mode-line-installed)
(package-mode-line-to-upgrade, package-mode-line-new): Define
the faces.
---
 lisp/emacs-lisp/package.el | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 9bcffb1df0b..d8b1487dfa8 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -3264,24 +3264,24 @@ package-menu--set-mode-line-format
                (propertize "Total: " 'help-echo total-help)
                (propertize total
                            'help-echo total-help
-                           'face 'font-lock-keyword-face)
+                           'face 'package-mode-line-total)
                " / "
                (propertize "Installed: " 'help-echo installed-help)
                (propertize installed
                            'help-echo installed-help
-                           'face 'package-status-installed)
+                           'face 'package-mode-line-installed)
                " / "
                (propertize "To Upgrade: " 'help-echo upgrade-help)
                (propertize to-upgrade
                            'help-echo upgrade-help
-                           'face 'font-lock-keyword-face)
+                           'face 'package-mode-line-to-upgrade)
                (when (> new 0)
                  (concat
                   " / "
                   (propertize "New: " 'help-echo new-help)
                   (propertize (number-to-string new)
                               'help-echo new-help
-                              'face 'package-status-new)))
+                              'face 'package-mode-line-new)))
                "] "))))))
 
 (define-derived-mode package-menu-mode tabulated-list-mode "Package Menu"
@@ -3727,6 +3727,22 @@ package-mark-delete-line
   "Face used for highlighting in package-menu packages marked to be deleted."
   :version "31.1")
 
+(defface package-mode-line-total nil
+  "Face for the total number of packages displayed on the mode line."
+  :version "31.1")
+
+(defface package-mode-line-installed '((t :inherit package-status-installed))
+  "Face for the number of installed packages displayed on the mode line."
+  :version "31.1")
+
+(defface package-mode-line-to-upgrade '((t :inherit bold))
+  "Face for the number of packages to upgrade displayed on the mode line."
+  :version "31.1")
+
+(defface package-mode-line-new '((t :inherit package-status-new))
+  "Face for the number of new packages displayed on the mode line."
+  :version "31.1")
+
 
 ;;; Package menu printing
 
-- 
2.47.2