aboutsummaryrefslogtreecommitdiff
path: root/sx-tab.el
diff options
context:
space:
mode:
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