From 6680705f464dd6e582e70beaf64b027ac57d0d43 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 26 Apr 2020 10:16:06 +0200 Subject: [PATCH 2/4] New face for display-time-world label * lisp/time.el (display-time-world-label): New face. (display-time-world-display): Use the new face. --- lisp/time.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/time.el b/lisp/time.el index a5e5b9b4a7..44885f74d1 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -516,6 +516,10 @@ display-time-world-mode-map map) "Keymap for `display-time-world-mode'.") +(defface display-time-world-label + '((t :inherit font-lock-variable-name-face)) + "Face for time zone label.") + (define-derived-mode display-time-world-mode special-mode "World clock" "Major mode for buffer that displays times in various time zones. See `display-time-world'." @@ -540,7 +544,10 @@ display-time-world-display (setq max-width width)))) (setq fmt (concat "%-" (int-to-string max-width) "s %s\n")) (dolist (timedata (nreverse result)) - (insert (format fmt (car timedata) (cdr timedata)))) + (insert (format fmt + (propertize (car timedata) + 'face 'display-time-world-label) + (cdr timedata)))) (delete-char -1)) (goto-char (point-min))) -- 2.26.2