aboutsummaryrefslogtreecommitdiff
path: root/sx.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-11-15 02:39:21 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-11-15 02:39:21 +0000
commit08c305f573dda0512e3acb1b6c6c78f390a5921d (patch)
tree995a64999fa5f2dd29042cbb98c02ec51ed0025a /sx.el
parent884363ac75fe0c5f8e082c31cfeb8632ad85f19e (diff)
parent7881572c09281785c1d0303d13305b583b3803cd (diff)
Merge remote-tracking branch 'remotes/origin/network-list' into real-scores
Diffstat (limited to 'sx.el')
-rw-r--r--sx.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/sx.el b/sx.el
index 058230c..aacd5cf 100644
--- a/sx.el
+++ b/sx.el
@@ -125,6 +125,13 @@ Run after `sx-init--internal-hook'.")
This is used internally to set initial values for variables such
as filters.")
+(defun sx--< (property x y &optional pred)
+ "Non-nil if PROPERTY attribute of question X is less than that of Y.
+With optional argument predicate, use it instead of `<'."
+ (funcall (or pred #'<)
+ (cdr (assoc property x))
+ (cdr (assoc property y))))
+
(defmacro sx-init-variable (variable value &optional setter)
"Set VARIABLE to VALUE using SETTER.
SETTER should be a function of two arguments. If SETTER is nil,