From: Protesilaos Stavrou <info@protesilaos.com>
To: 61567@debbugs.gnu.org
Subject: bug#61567: 30.0.50; Define display-time-time-and-date-indicator face
Date: Fri, 17 Feb 2023 08:07:40 +0200 [thread overview]
Message-ID: <87zg9cx1sj.fsf@protesilaos.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
Dear maintainers,
I have written a small patch for 'time.el'. It adds a face to the
date+time of 'M-x display-time-mode'.
Should I install this on 'master'? Any changes to make to it?
All the best,
Protesilaos (or simply "Prot")
--
Protesilaos Stavrou
https://protesilaos.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Define-display-time-time-and-date-indicator-face.patch --]
[-- Type: text/x-patch, Size: 2013 bytes --]
From 6f9cad322b002e796dc38deaf3ad10e679c6ac57 Mon Sep 17 00:00:00 2001
Message-Id: <6f9cad322b002e796dc38deaf3ad10e679c6ac57.1676538384.git.info@protesilaos.com>
From: Protesilaos Stavrou <info@protesilaos.com>
Date: Thu, 16 Feb 2023 11:05:53 +0200
Subject: [PATCH] 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.
---
etc/NEWS | 7 +++++++
lisp/time.el | 6 ++++++
2 files changed, 13 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index 4fbe09e0541..e05c288dd9f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -56,6 +56,13 @@ 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 for 'display-time-format'
+The 'display-time-time-and-date-indicator' applies to the time and
+date component of the 'display-time-mode'. By default, the face has
+all its attributes unspecified to preserve the indicator's familiar
+appearance.
+
\f
* Editing Changes in Emacs 30.1
diff --git a/lisp/time.el b/lisp/time.el
index f04a22dfd28..beffebbfa00 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -139,6 +139,11 @@ (defcustom display-time-mail-face nil
:version "22.1"
:type '(choice (const :tag "None" nil) face))
+(defface display-time-time-and-date-indicator nil
+ "Face of the `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 @@ (defcustom display-time-string-forms
(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
--
2.39.1
next reply other threads:[~2023-02-17 6:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 6:07 Protesilaos Stavrou [this message]
2023-02-17 6:37 ` bug#61567: 30.0.50; Define display-time-time-and-date-indicator face Eli Zaretskii
2023-02-17 10:16 ` Protesilaos Stavrou
2023-02-17 10:31 ` Robert Pluim
2023-02-17 10:40 ` Protesilaos Stavrou
2023-02-17 10:58 ` Robert Pluim
2023-02-17 11:33 ` Protesilaos Stavrou
2023-02-17 12:30 ` Robert Pluim
2023-02-17 12:35 ` Eli Zaretskii
2023-02-17 12:43 ` Robert Pluim
2023-02-18 7:36 ` Protesilaos Stavrou
2023-02-17 12:02 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-17 15:47 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zg9cx1sj.fsf@protesilaos.com \
--to=info@protesilaos.com \
--cc=61567@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.