diff options
Diffstat (limited to 'sx-search.el')
-rw-r--r-- | sx-search.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sx-search.el b/sx-search.el index b245cbe..d0fa892 100644 --- a/sx-search.el +++ b/sx-search.el @@ -65,13 +65,18 @@ KEYWORDS is passed to `sx-method-call'." (defconst sx-search--order-methods (cons '("Relevance" . relevance) - (cl-remove-if (lambda (x) (eq (cdr x) 'hot)) - (default-value 'sx-question-list--order-methods))) + (default-value 'sx-question-list--order-methods)) "Alist of possible values to be passed to the `sort' keyword.") -(defvar sx-search-default-order 'activity +(defcustom sx-search-default-order 'activity "Default ordering method used on new searches. -Possible values are the cdrs of `sx-search--order-methods'.") +Possible values are the cdrs of `sx-search--order-methods'." + :type (cons 'choice + (mapcar (lambda (c) `(const :tag ,(car c) ,(cdr c))) + (cl-remove-duplicates + sx-search--order-methods + :key #'cdr))) + :group 'sx-question-list) ;;;###autoload @@ -111,6 +116,7 @@ prefix argument, the user is asked for everything." (sx-search-get-questions sx-question-list--site page query tags excluded-tags + (cons 'order (if sx-question-list--descending 'desc 'asc)) (cons 'sort sx-question-list--order)))) (setq sx-question-list--site site) (setq sx-question-list--order sx-search-default-order) |