(in-package :lisp-on-lines-ucw) ;;; * Lisp on Lines YACLML tags. ;;; * Utilities (defun gen-id (string) `(js:gen-js-name-string :prefix ,string)) ;;; ** ACTION tags ;;; These tags take UCW "actions" and create the appropriate HTML ;;; tag to signal their execution. (defmacro %with-action-unique-names (&body body) "These magic macros." `(with-unique-names (url action-object action-id current-frame) (assert (xor action action* function) nil "Must supply only one of ACTION, ACTION* or FUNCTION") (rebinding (id) `(let* ((,current-frame (context.current-frame *context*)) (,action-object ,(or action* `(lol-ucw:make-action ,(or function `(lambda () (with-call/cc ,action)))))) (,action-id (register-action-in-frame ,current-frame ,action-object)) (,url (compute-url ,action-object *current-component*))) (declare (ignorable ,action-id ,url)) ,,@body)))) (deftag-macro