diff options
author | Sean Allred <code@seanallred.com> | 2015-01-03 22:40:57 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2015-01-03 22:40:57 -0500 |
commit | d19917d9f152e2eda6b15687dae62f149a3d5779 (patch) | |
tree | 9e6635ebe53a159e6cc80c284f61bb6f46cb3fb9 | |
parent | 9ff43f79e579a9da9a74429204ff52b26f53bf4e (diff) |
Simplfy logic
`get-all' will be re-bound to either a function or nil, so using `or'
with it is appropriate.
-rw-r--r-- | sx-method.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sx-method.el b/sx-method.el index 8b97849..64dbc1f 100644 --- a/sx-method.el +++ b/sx-method.el @@ -100,7 +100,7 @@ Return the entire response as a complex alist." (format "?site=%s" site) (setq site nil))))) (call (if get-all #'sx-request-all-items #'sx-request-make)) - (get-all-stop-when + (get-all (cond ((eq get-all t) #'sx-request-all-stop-when-no-more) (t get-all)))) @@ -129,9 +129,7 @@ Return the entire response as a complex alist." full-method keywords url-method - (if get-all - get-all-stop-when - process-function)))) + (or get-all process-function)))) (provide 'sx-method) ;;; sx-method.el ends here |