summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wttrin.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/wttrin.el b/wttrin.el
index 72c024c..512b6a7 100644
--- a/wttrin.el
+++ b/wttrin.el
@@ -68,7 +68,11 @@
;;;###autoload
(defun wttrin (city)
"Display weather information for CITY."
- (interactive (list (completing-read "City name: " wttrin-default-cities nil nil)))
+ (interactive
+ (list
+ (completing-read "City name: " wttrin-default-cities nil nil
+ (when (= (length wttrin-default-cities) 1)
+ (car wttrin-default-cities)))))
(wttrin-query city))
(provide 'wttrin)