From 2461961a6c2b3a72bcabdd543eacb03a501ce0bf Mon Sep 17 00:00:00 2001 From: "Carl X. Su" Date: Sun, 6 Mar 2016 12:42:36 +0800 Subject: Some improvements and drop ido dependency * Depend on stable version of `xterm-color`. * Use `erase-buffer` instead of delete all region. * Replace `ido-completing-read` with `completing-read`. --- wttrin.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wttrin.el b/wttrin.el index a777933..b2898cb 100644 --- a/wttrin.el +++ b/wttrin.el @@ -4,7 +4,7 @@ ;; Author: Carl X. Su ;; ono hiroko (kuanyui) ;; Version: 0.2.0 -;; Package-Requires: ((emacs "24.4") (xterm-color "20150823.646")) +;; Package-Requires: ((emacs "24.4") (xterm-color "1.0")) ;; Keywords: comm, weather, wttrin ;; URL: https://github.com/bcbcarl/emacs-wttrin @@ -16,7 +16,6 @@ (require 'url) (require 'xterm-color) -(require 'ido) (defgroup wttrin nil "Emacs frontend for weather web service wttr.in." @@ -45,7 +44,7 @@ (let ((buffer (get-buffer-create (format "*wttr.in - %s*" city-name)))) (switch-to-buffer buffer) (setq buffer-read-only nil) - (delete-region (point-min) (point-max)) + (erase-buffer) (insert (xterm-color-filter raw-string)) (goto-char (point-min)) (re-search-forward "^$") @@ -55,7 +54,7 @@ (defun wttrin () "Display weather information." (interactive) - (wttrin-query (ido-completing-read "City name: " wttrin-default-cities nil nil))) + (wttrin-query (completing-read "City name: " wttrin-default-cities nil nil))) (provide 'wttrin) -- cgit v1.2.3