From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.bugs Subject: bug#61567: 30.0.50; Define display-time-time-and-date-indicator face Date: Fri, 17 Feb 2023 08:07:40 +0200 Message-ID: <87zg9cx1sj.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32892"; mail-complaints-to="usenet@ciao.gmane.io" To: 61567@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 17 07:08:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pStut-0008Me-3u for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Feb 2023 07:08:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pStuf-0002A1-29; Fri, 17 Feb 2023 01:08:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pStud-00028o-7c for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 01:08:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pStuc-0003RN-Af for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 01:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pStub-0000WH-Qa for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 01:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2023 06:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61567 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16766140721980 (code B ref -1); Fri, 17 Feb 2023 06:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Feb 2023 06:07:52 +0000 Original-Received: from localhost ([127.0.0.1]:38269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pStuR-0000Vr-Oq for submit@debbugs.gnu.org; Fri, 17 Feb 2023 01:07:52 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pStuP-0000Vj-Sy for submit@debbugs.gnu.org; Fri, 17 Feb 2023 01:07:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pStuP-00024t-LH for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 01:07:49 -0500 Original-Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pStuN-0003PR-EU for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 01:07:49 -0500 Original-Received: (Authenticated sender: public@protesilaos.com) by mail.gandi.net (Postfix) with ESMTPSA id 261FAFF804 for ; Fri, 17 Feb 2023 06:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1676614062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=gYkYX6Pez3zUy8jHRhUkqQNAgomcoI537mzmWXUddzo=; b=Kv1YVE+F96y3NKaQMF1XRzwTZOfKQpNw0xbUObC3zBazUte6FX2pbkpzOR/npHzLgkMSPs kLFCd7rQqYg0ozvrOBp0+5m7Zmjr8MXGgSxfCgoux5I+tWWlXi6pNxgmSyazxcf5lgHJau +2viVDwnknjpYt5U91ipnkpdt1NjtAHsRqvigNKZa9cqJqRImsmLKCulO+lbMiZ8Cg5oet SMwQUmKyQIOHBhA7qzjiwA+qFy/jKTttFw6BFxp+58FrPtMkS9CD4bVAoDG4OsTeSawLe/ 412ncDWo1EjG4XVaKzsYnL0Mgk8tbLn9HXX+kjd5pyICzenitPujFhbvCrUy7w== Received-SPF: none client-ip=2001:4b98:dc4:8::229; envelope-from=info@protesilaos.com; helo=relay9-d.mail.gandi.net X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255853 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Define-display-time-time-and-date-indicator-face.patch >From 6f9cad322b002e796dc38deaf3ad10e679c6ac57 Mon Sep 17 00:00:00 2001 Message-Id: <6f9cad322b002e796dc38deaf3ad10e679c6ac57.1676538384.git.info@protesilaos.com> From: Protesilaos Stavrou 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. + * 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 --=-=-=--