commit 2929c1a9e4b59f8672fd3a760124cdaeff95c892
parent 1a642a7436296bc34a695fb499774c174ef770d5
Author: Tomas Hlavaty <tom@logand.com>
Date: Sun, 13 Oct 2013 14:05:01 +0200
minor style shuffle
Diffstat:
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/ui.lisp b/ui.lisp
@@ -104,8 +104,6 @@
(defmacro with-state ((state aid actions2 dispatch clear) &body body)
`(funcall ,state ,aid ,actions2 (lambda (,dispatch ,clear) ,@body)))
-(defvar *renv*)
-
(defun handle-form (form)
(ecase (car form)
(:redirect
@@ -113,6 +111,8 @@
(http-redirect target)))
(:html (html-reply form))))
+(defvar *renv*)
+
(defun make-stepper (sid create construct)
(let ((n 0))
(multiple-value-bind (draw state) (make-state create)
@@ -152,14 +152,12 @@
(format nil "z~a" (pretty36 (next set))))))
(funcall draw))))))))))))
-(defun register (get set)
- (funcall *register* get set))
-
(defmacro slet (vars &body body) ;; TODO renv
`(let ,(mapcar (lambda (x) (subseq x 0 2)) vars)
,@(mapcar (lambda (x)
- `(register (lambda () ,(car x))
- (lambda (v) (setq ,(car x) v))))
+ `(funcall *register*
+ (lambda () ,(car x))
+ (lambda (v) (setq ,(car x) v))))
vars)
,@body))