aboutsummaryrefslogtreecommitdiff
path: root/sx-tab.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-12-14 12:59:17 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-12-14 12:59:17 +0000
commitf924a9c58ce30dc62fc61382b1933d8ef51189b5 (patch)
tree0bdb23e549d68de2a35f68a89504219f0d7e70aa /sx-tab.el
parent144db4c35bf902a045b221dae39d5437f7d9fb52 (diff)
Fix dependency order. sx-tab now requires sx-interaction
Diffstat (limited to 'sx-tab.el')
-rw-r--r--sx-tab.el19
1 files changed, 2 insertions, 17 deletions
diff --git a/sx-tab.el b/sx-tab.el
index f36d10f..f3ac381 100644
--- a/sx-tab.el
+++ b/sx-tab.el
@@ -26,11 +26,7 @@
(require 'sx)
(require 'sx-question-list)
-
-(defcustom sx-tab-default-site "emacs"
- "Name of the site to use by default when listing questions."
- :type 'string
- :group 'sx)
+(require 'sx-interaction)
(defvar sx-tab--list nil
"List of the names of all defined tabs.")
@@ -44,17 +40,6 @@
t)))
(funcall (intern (format "sx-tab-%s" (downcase tab)))))
-(defun sx-tab--interactive-site-prompt ()
- "Query the user for a site."
- (let ((default (or sx-question-list--site
- (sx-assoc-let sx-question-mode--data
- .site)
- sx-tab-default-site)))
- (funcall (if ido-mode #'ido-completing-read #'completing-read)
- (format "Site (%s): " default)
- (sx-site-get-api-tokens) nil t nil nil
- default)))
-
;;; The main macro
(defmacro sx-tab--define (tab pager &optional printer refresher
@@ -91,7 +76,7 @@ If SITE is nil, use `sx-tab-default-site'."
tab)
(interactive
(list current-prefix-arg
- (sx-tab--interactive-site-prompt)))
+ (sx--interactive-site-prompt)))
(sx-initialize)
(unless site (setq site sx-tab-default-site))
;; Create the buffer