diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-06 13:37:06 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-06 13:37:06 +0000 |
commit | 3ecb37471a46a82c56ecca738fc4f6879d37c258 (patch) | |
tree | 9f29a5503d36807c7d7724df9d88c732b7d50a4f | |
parent | d09556032b645d05bcb2a0164c8bb0e6f8ebf25f (diff) |
Add a no-update argument to stack-question-list-refresh
-rw-r--r-- | stack-question-list.el | 10 |
1 files changed, 6 insertions, 4 deletions
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) |