diff options
| author | Carl X. Su <bcbcarl@gmail.com> | 2017-06-14 20:06:54 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-14 20:06:54 +0800 |
| commit | df5427ce2a5ad4dab652dbb1c4a1834d7ddc2abc (patch) | |
| tree | 5275500b4a1f2157be3a3bfb10f59bc9eeac086d | |
| parent | 00ae9ee54056b16bb20c5b35e6bd262e6bda7eb5 (diff) | |
| parent | 3f5de24334a7edcaa7f67738be26540b42441621 (diff) | |
Merge pull request #9 from davep/master
Small improvements to passing city to wttrin
| -rw-r--r-- | wttrin.el | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -66,10 +66,14 @@ (setq buffer-read-only t))))) ;;;###autoload -(defun wttrin () - "Display weather information." - (interactive) - (wttrin-query (completing-read "City name: " wttrin-default-cities nil nil))) +(defun wttrin (city) + "Display weather information for CITY." + (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) |
