From 960c98ce3ac8e032db0c0293fa577094258600b8 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 11 Oct 2023 09:27:28 +0300 Subject: [PATCH] * lisp/progmodes/project.el (project-mode-line-face): New variable. (project-mode-line-format): Use it (bug#66317). --- etc/NEWS | 1 + lisp/progmodes/project.el | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index ececb7e8459..220568429fd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -894,6 +894,7 @@ showcases all their customization options. ** Project ++++ *** New user option 'project-mode-line'. When non-nil, display the name of the current project on the mode line. Clicking 'mouse-1' on the project name pops up the project diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 3c469d0e51f..fd9c146a1fd 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -2030,6 +2030,9 @@ is part of the default mode line beginning with Emacs 30." (define-key map [mode-line down-mouse-1] project-menu-entry) map)) +(defvar project-mode-line-face nil + "Face name to use for the project name on the mode line.") + (defvar project-mode-line-format '(:eval (project-mode-line-format))) (put 'project-mode-line-format 'risky-local-variable t) @@ -2040,6 +2043,7 @@ is part of the default mode line beginning with Emacs 30." " " (propertize (project-name project) + 'face project-mode-line-face 'mouse-face 'mode-line-highlight 'help-echo "mouse-1: Project menu" 'local-map project-mode-line-map)))) -- 2.39.2