aboutsummaryrefslogtreecommitdiff
path: root/sx-request.el
diff options
context:
space:
mode:
authorJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>2014-11-17 09:26:27 -0500
committerJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>2014-11-17 09:26:27 -0500
commitf4d7c0341ce30a93bc7d75591183292307971e41 (patch)
tree2f57ad0d892608e7c5a94abd1317a0e82c0ab27c /sx-request.el
parent5ef7b4683cc8feceee0b8862df987a0bdde7a0f1 (diff)
Change from `add-to-list` to `push` to avoid a strange `(void-variable
alist)` error. Moved `api-key` to let binding rather than directly in if statement.
Diffstat (limited to 'sx-request.el')
-rw-r--r--sx-request.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/sx-request.el b/sx-request.el
index 91c4db4..d982057 100644
--- a/sx-request.el
+++ b/sx-request.el
@@ -140,6 +140,7 @@ false, use the symbol `false'. Each element is processed with
;; Add API key to list of arguments, this allows for increased quota
;; automatically.
(let* ((warn (equal need-auth 'warn))
+ (api-key (cons "key" sx-request-api-key))
(auth
(let ((auth (car (sx-cache-get 'auth))))
(cond
@@ -152,9 +153,9 @@ false, use the symbol `false'. Each element is processed with
(lwarn "stack-mode" :debug
"This query requires authentication")
nil)))))
- (add-to-list 'alist (cons "key" sx-request-api-key))
+ (push api-key alist)
(if (and need-auth auth)
- (add-to-list 'alist auth))
+ (push auth alist))
(mapconcat
(lambda (pair)
(concat