Skip to content

Instantly share code, notes, and snippets.

@cmoore
Created June 19, 2012 04:17
Show Gist options
  • Save cmoore/2952262 to your computer and use it in GitHub Desktop.
Save cmoore/2952262 to your computer and use it in GitHub Desktop.
parenscript shows me how little I really know so far about CL
(defpsmacro $ (selector &body chains)
`(chain (j-query ,selector)
,@chains))
; Clearly, this did not work like I expected...
(defpsmacro jq-submit (element function)
`(let ((td (concatenate 'string "#" ,element)))
(($ (@ td) ,function))))
(defun todo--show-todo (x)
(let ((fed-id (make-id))
...
(htm
...
(:form :id fed-id :method "POST" :action "/"
(:input :type "hidden" :name "uid" :value the-uid)
(:input :type "hidden" :name "action" :value "edit"))
...
(:button :class "btn btn-mini btn-danger"
:style "margin-bottom:2px;width:45px;"
:onclick (ps-inline (jq-submit fdel-id)) "Delete"))))))
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment