From 3ecb37471a46a82c56ecca738fc4f6879d37c258 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 6 Nov 2014 13:37:06 +0000 Subject: Add a no-update argument to stack-question-list-refresh --- stack-question-list.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'stack-question-list.el') diff --git a/stack-question-list.el b/stack-question-list.el index e19005b..8b52aca 100644 --- a/stack-question-list.el +++ b/stack-question-list.el @@ -174,10 +174,12 @@ Letters do not insert themselves; instead, they are commands. (setq stack-question-list--total-count (length tabulated-list-entries)))) -(defun stack-question-list-refresh (&optional redisplay) +(defun stack-question-list-refresh (&optional redisplay no-update) "Update the list of questions. -If REDISPLAY is non-nil, also call `tabulated-list-print'." - (interactive '(t)) +If REDISPLAY is non-nil, also call `tabulated-list-print'. +If the prefix argument NO-UPDATE is nil, query stack-exchange for +a new list before redisplaying." + (interactive "pP") ;; Reset the mode-line unread count (we rebuild it here). (setq stack-question-list--unread-count 0) (let ((question-list (stack-core-make-request "questions"))) @@ -275,7 +277,7 @@ focus the relevant window." (generate-new-buffer "*question-list*"))) (with-current-buffer stack-question-list--buffer (stack-question-list-mode) - (stack-question-list-refresh 'redisplay)) + (stack-question-list-refresh 'redisplay no-update)) (switch-to-buffer stack-question-list--buffer)) (defalias 'stack-list-questions #'list-questions) -- cgit v1.2.3