jperson/cl-reddit — pull request #3 by ejbs (2013-09-23 19:02:50+00:00)
Title: Added macro param-push, simplifying a lot of code

I've added a new macro, param-push, that simplifies some of the code in cl-reddit.lisp

The macro could be extended to work for some more extensive syntax, though I've yet to do this.

It is currently undocumented but here's an example:

(macroexpand-1 '(param-push
after before count limit show target))

=>

(PROGN
(WHEN TARGET (PUSH `("target" . TARGET) PARAMS))
(WHEN SHOW (PUSH `("show" . SHOW) PARAMS))
(WHEN LIMIT (PUSH `("limit" . LIMIT) PARAMS))
(WHEN COUNT (PUSH `("count" . COUNT) PARAMS))
(WHEN BEFORE (PUSH `("before" . BEFORE) PARAMS))
(WHEN AFTER (PUSH `("after" . AFTER) PARAMS)))