summaryrefslogtreecommitdiff
path: root/helm-misc.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-03-12 11:52:46 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-03-12 11:56:49 +0100
commit932ac9a660ef1e9d3f8df050e30ef7a28f8b856a (patch)
tree0149a4371bbe1b4fb32cd33757f4c7a9e51b8b0c /helm-misc.el
parent6264273b632b8ac0826a38d3ee27bea32dad3c39 (diff)
Ensure also display-time-world-list is not nil (#1986)
* helm-misc.el (helm-source-time-world): Do it.
Diffstat (limited to 'helm-misc.el')
-rw-r--r--helm-misc.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/helm-misc.el b/helm-misc.el
index 2b2ae71c..eb6ae9df 100644
--- a/helm-misc.el
+++ b/helm-misc.el
@@ -118,15 +118,15 @@
(helm-build-in-buffer-source "Time World List"
:init (lambda ()
(require 'time)
- (setq display-time-world-list
- ;; inlined from `time--display-world-list' from
- ;; emacs-27 for compatibility as
- ;; `display-time-world-list' is set by default to
- ;; `t' on emacs-26+...
- (if (listp display-time-world-list)
- display-time-world-list
- ;; Determine if zoneinfo style timezones are supported by testing that
- ;; America/New York and Europe/London return different timezones.
+ (unless (and display-time-world-list
+ (listp display-time-world-list))
+ ;; adapted from `time--display-world-list' from
+ ;; emacs-27 for compatibility as
+ ;; `display-time-world-list' is set by default to t.
+ (setq display-time-world-list
+ ;; Determine if zoneinfo style timezones are
+ ;; supported by testing that America/New York and
+ ;; Europe/London return different timezones.
(let ((nyt (format-time-string "%z" nil "America/New_York"))
(gmt (format-time-string "%z" nil "Europe/London")))
(if (string-equal nyt gmt)