aboutsummaryrefslogtreecommitdiff
path: root/stack-core.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-10-30 21:50:59 -0400
committerSean Allred <code@seanallred.com>2014-10-30 21:50:59 -0400
commitbc483a2a41c69214a26c4d6d3eb073d9870168c5 (patch)
treeae90a8964542d91fd2412c4c48dd9b28f556c2ba /stack-core.el
parented39aa60f9feca9cbfba29cdd3bb606f02639c7a (diff)
Fix circular initialization dependency
stack-filter needs stack-core to compile the filter, but stack-core uses the default filter to make a request. Note that setting `stack-core-filter' to `nil' still gives proper behaviour; no `filter' argument is passed through the method call.
Diffstat (limited to 'stack-core.el')
-rw-r--r--stack-core.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/stack-core.el b/stack-core.el
index 2cdf63c..8badc3a 100644
--- a/stack-core.el
+++ b/stack-core.el
@@ -151,9 +151,11 @@ entire response as a complex alist."
(json-read-from-string
(let ((call (stack-core-build-request
method
- (cons `(filter . ,stack-core-filter)
+ (cons `(filter . ,(if (boundp 'stack-core-filter)
+ stack-core-filter))
(if keyword-arguments keyword-arguments
- (stack-core-get-default-keyword-arguments method)))))
+ (stack-core-get-default-keyword-arguments
+ method)))))
(url-automatic-caching stack-core-cache-requests))
;; TODO: url-retrieve-synchronously can return nil if the call is
;; unsuccessful should handle this case