From 0ddc0693f364ed547291bda199728a2dc8495c5f Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 12 Feb 2015 10:07:18 -0200 Subject: Make sx-search-default-order a defcustom --- sx-search.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sx-search.el b/sx-search.el index 55964b9..235d5f7 100644 --- a/sx-search.el +++ b/sx-search.el @@ -68,9 +68,14 @@ KEYWORDS is passed to `sx-method-call'." (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)))) ;;;###autoload -- cgit v1.2.3