Created
June 19, 2012 04:17
-
-
Save cmoore/2952262 to your computer and use it in GitHub Desktop.
parenscript shows me how little I really know so far about CL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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