From 372db6758e3875cceba45e783b8ff850454ad303 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 25 Oct 2021 12:05:36 -0700 Subject: emacs: set world-clock only when variables exist --- emacs/custom/fcuny-ui.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'emacs') diff --git a/emacs/custom/fcuny-ui.el b/emacs/custom/fcuny-ui.el index 9827c5e..97565bc 100644 --- a/emacs/custom/fcuny-ui.el +++ b/emacs/custom/fcuny-ui.el @@ -92,10 +92,17 @@ ("Asia/Calcutta" "Bangalore") ("Asia/Tokyo" "Tokyo"))) +;; the following setup only works with emacs >=28 I think (when (boundp 'world-clock-list) - (setq world-clock-list t) - (setq world-clock-time-format "%R %z %A %d %B") - (setq world-clock-timer-enable t) + (setq world-clock-list t)) + +(when (boundp 'world-clock-time-format) + (setq world-clock-time-format "%R %z %A %d %B")) + +(when (boundp 'world-clock-timer-enable) + (setq world-clock-timer-enable t)) + +(when (boundp 'world-clock-timer-second) (setq world-clock-timer-second 60)) (display-time-mode t) -- cgit 1.4.1