diff options
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | wttrin.el | 6 | ||||
| -rw-r--r-- | wttrin.png | bin | 113837 -> 92979 bytes |
3 files changed, 5 insertions, 5 deletions
@@ -4,10 +4,10 @@ Emacs frontend for weather web service [wttr.in]. ## Usage -set a default cities list for completion: +Set a default cities list for completion: ```elisp -(setq wttrin-default-city "Taipei") +(setq wttrin-default-cities ("Taipei" "Tainan")) ``` Then run `M-x wttrin` to get the information. @@ -12,6 +12,7 @@ ;; Provides the weather information from wttr.in based on your query condition. ;;; Code: + (require 'url) (require 'xterm-color) (require 'ido) @@ -22,7 +23,7 @@ :group 'comm) (defcustom wttrin-default-cities '("Taipei" "Keelung" "Taichung" "Tainan") - "Specify default cities list to for quick completion" + "Specify default cities list for quick completion." :group 'wttrin :type 'list) @@ -36,8 +37,7 @@ (decode-coding-string (buffer-string) 'utf-8)))) (defun wttrin-query (city-name) - "Query weather of CITY-NAME via wttrin, and display the result -in another buffer." + "Query weather of CITY-NAME via wttrin, and display the result in new buffer." (let ((raw-string (wttrin-fetch-raw-string city-name))) (if (string-match "ERROR" raw-string) (message "Cannot get weather data. Maybe you inputed a wrong city name?") Binary files differ |
