From b9bc397f366e1d80864bb2b1759b856c47b68e11 Mon Sep 17 00:00:00 2001 From: Tadashi MATSUO Date: Sun, 25 Apr 2010 01:36:05 +0900 Subject: [PATCH] Fix mode-line to display the rate limit. * twittering-mode.el: Fix mode-line to display the rate limit. (twittering-mode-line-buffer-identification): add the remaining number of API requests if `twittering-display-remaining' is non-nil. --- ChangeLog | 7 +++++++ twittering-mode.el | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index a379bd39..3581db5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-25 Tadashi MATSUO + + * twittering-mode.el: Fix mode-line to display the rate limit. + (twittering-mode-line-buffer-identification): add the remaining + number of API requests if `twittering-display-remaining' is + non-nil. + 2010-04-24 Tadashi MATSUO * twittering-mode.el: Reimplement indicators. diff --git a/twittering-mode.el b/twittering-mode.el index 8d025372..c6c6ccce 100644 --- a/twittering-mode.el +++ b/twittering-mode.el @@ -494,6 +494,10 @@ and its contents (BUFFER)" ,@(when twittering-scroll-mode '("scroll")) ,@(when twittering-proxy-use '("proxy"))))) (concat active-mode-indicator + (when twittering-display-remaining + (format " %d/%d" + (twittering-get-ratelimit-remaining) + (twittering-get-ratelimit-limit))) (when enabled-options (concat "[" (mapconcat 'identity enabled-options " ") "]")))))