diff options
author | Sean Allred <code@seanallred.com> | 2015-01-07 09:14:12 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2015-01-07 09:14:12 -0500 |
commit | f4ef2df13f998b9e30e93ebe7bc9706c562a3d9a (patch) | |
tree | aa5fc38a73cce99a8cbe0b019d44fe3591aa78c3 /sx-search.el | |
parent | ca97cd41cf3ecfb08c8e63f5fb45616803fb8ed2 (diff) | |
parent | 5b66d7865fb9f160586c7d579f8df7195804e927 (diff) |
Merge pull request #204 from vermiculus/issue-137-tag-completion
Issue 137 tag completion
Diffstat (limited to 'sx-search.el')
-rw-r--r-- | sx-search.el | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sx-search.el b/sx-search.el index d47905e..fa08e56 100644 --- a/sx-search.el +++ b/sx-search.el @@ -32,13 +32,11 @@ (require 'sx) (require 'sx-question-list) +(require 'sx-tag) (defvar sx-search--query-history nil "Query history for interactive prompts.") -(defvar sx-search--tag-history nil - "Tags history for interactive prompts.") - ;;; Basic function (defun sx-search-get-questions (site page query &optional tags excluded-tags keywords) @@ -84,15 +82,12 @@ prefix argument, the user is asked for everything." (when (string= query "") (setq query nil)) (when current-prefix-arg - (setq tags (sx--multiple-read - (format "Tags (%s)" - (if query "optional" "mandatory")) - 'sx-search--tag-history)) + (setq tags (sx-tag-multiple-read + site (concat "Tags" (when query " (optional)")))) (when (and (not query) (string= "" tags)) (sx-user-error "Must supply either QUERY or TAGS")) (setq excluded-tags - (sx--multiple-read - "Excluded tags (optional)" 'sx-search--tag-history))) + (sx-tag-multiple-read site "Excluded tags (optional)"))) (list site query tags excluded-tags))) ;; Here starts the actual function |