From f4d7c0341ce30a93bc7d75591183292307971e41 Mon Sep 17 00:00:00 2001 From: Jonathan Leech-Pepin Date: Mon, 17 Nov 2014 09:26:27 -0500 Subject: 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. --- sx-request.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sx-request.el') 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 -- cgit v1.2.3