From 0b6f014db9d275d6ea6f3b1e04d3389018fd1705 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 1 Sep 2023 13:40:34 +0200 Subject: [PATCH 1/2] Refine 'defcustom' types --- air-quality.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/air-quality.el b/air-quality.el index 8f55100..7895b8c 100644 --- a/air-quality.el +++ b/air-quality.el @@ -45,16 +45,18 @@ (defcustom air-quality-open-weather-api-key nil (string :tag "Your API key"))) (defcustom air-quality-refresh-interval 60 - "An integer. Number of minutes between refreshes of air quality information." - :type 'number) + "Number of minutes between refreshes of air quality information." + :type 'integer) (defcustom air-quality-latitude nil - "A float. Your latitude." - :type 'number) + "Your latitude." + :type '(choice (const :tag "Unset" nil) + (integer :tag "Your latitude"))) (defcustom air-quality-longitude nil - "A float. Your longitude." - :type 'number) + "Your longitude." + :type '(choice (const :tag "Unset" nil) + (integer :tag "Your longitude"))) ;;;; Private Variables -- 2.42.0