From: Protesilaos Stavrou <info@protesilaos.com>
Date: Thu, 16 Feb 2023 09:05:53 +0000 (+0200)
Subject: Define 'display-time-time-and-date-indicator' face
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ab6c6ac8334f80a2effcb9d66d2c57810c9a73e;p=emacs.git

Define 'display-time-time-and-date-indicator' face

* etc/NEWS: Announce the new face for the 'display-time-format'.
* lisp/time.el (display-time-time-and-date-indicator): Define new face.
(display-time-string-forms): Use the new face. (Bug#61567)
---

diff --git a/etc/NEWS b/etc/NEWS
index 4fbe09e0541..db42041ec6d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -56,6 +56,11 @@ This allows the user to customize the prompt that is appended by
 'yes-or-no-p' when asking questions.  The default value is
 "(yes or no) ".
 
+---
+** New face 'display-time-time-and-date-indicator'.
+This is used for displaying the time and date components of
+'display-time-mode'.
+
 
 * Editing Changes in Emacs 30.1
 
diff --git a/lisp/time.el b/lisp/time.el
index f04a22dfd28..030aef9d49b 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -139,6 +139,11 @@ make the mail indicator stand out on a color display."
   :version "22.1"
   :type '(choice (const :tag "None" nil) face))
 
+(defface display-time-time-and-date-indicator nil
+  "Face for `display-time-format'."
+  :group 'mode-line-faces
+  :version "30.1")
+
 (defvar display-time-mail-icon
   (find-image '((:type xpm :file "letter.xpm" :ascent center)
 		(:type pbm :file "letter.pbm" :ascent center)))
@@ -179,6 +184,7 @@ depend on `display-time-day-and-date' and `display-time-24hr-format'."
      (format-time-string (or display-time-format
 			     (if display-time-24hr-format "%H:%M" "%-I:%M%p"))
 			 now)
+     'face 'display-time-time-and-date-indicator
      'help-echo (format-time-string "%a %b %e, %Y" now))
     load
     (if mail