aboutsummaryrefslogtreecommitdiff
path: root/sx-filter.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-04 14:04:55 -0500
committerSean Allred <code@seanallred.com>2015-01-04 14:04:55 -0500
commit89834aa61adf1fff29379c82ab96629f0b2960d0 (patch)
tree5f1791c4048816ada270ece0027e4eb8800a27d1 /sx-filter.el
parentba9dfba28bd879c49009187bcbbc60fbb343c65b (diff)
parenta9dfed758f2ef75081606228fdff87ad9c6f6ddb (diff)
Merge pull request #189 from vermiculus/tag-bot
Tag bot
Diffstat (limited to 'sx-filter.el')
-rw-r--r--sx-filter.el34
1 files changed, 33 insertions, 1 deletions
diff --git a/sx-filter.el b/sx-filter.el
index 8c00c12..c67d05b 100644
--- a/sx-filter.el
+++ b/sx-filter.el
@@ -41,7 +41,39 @@ Structure:
...)")
-;;; Compilation
+;;; Creation
+
+(defmacro sx-filter-from-nil (included)
+ "Creates a filter data structure with INCLUDED fields.
+All wrapper fields are included by default."
+ ;; @OTODO: it would be neat to have syntax like
+ ;;
+ ;; (field-a
+ ;; field-b
+ ;; (object-a subfield)
+ ;; field-c
+ ;; (object-b subfield-a subfield-b))
+ ;;
+ ;; expand into
+ ;;
+ ;; (field-a
+ ;; field-b
+ ;; object-a.subfield
+ ;; field-c
+ ;; object-b.subfield-a object-b.subfield-b)
+ `(quote ((,@included
+ .backoff
+ .error_id
+ .error_message
+ .error_name
+ .has_more
+ .items
+ .page
+ .page_size
+ .quota_max
+ .quota_remaining
+ .type)
+ nil none)))
;;; @TODO allow BASE to be a precompiled filter name
(defun sx-filter-compile (&optional include exclude base)