Corrected an eval-when problem.
Pascal J. Bourguignon [2011-05-21 02:32]
Corrected an eval-when problem.
diff --git a/README b/README
index 29e00b2..52bcdba 100644
--- a/README
+++ b/README
@@ -10,7 +10,9 @@ mine-web-player.lisp Let a user play the mine game thru
resources/ Resources for the mine web application.
-The web application can be launched from sbcl by loading the
-launch-web-mine.lisp file.
+The web application can be launched from sbcl + quickload, with:
+
+ (load "launch-web-mine.lisp")
+
diff --git a/launch-web-mine.lisp b/launch-web-mine.lisp
index 2f584c2..111665c 100644
--- a/launch-web-mine.lisp
+++ b/launch-web-mine.lisp
@@ -60,6 +60,9 @@
(sb-ext:run-program "/bin/netstat" (list "-tnpl") :output t)
(values))
+
+(defparameter *application-name* "MINE")
+(defparameter *application-port* 8007)
(start-server)
(ps)
(ns)
diff --git a/mine-web-player.lisp b/mine-web-player.lisp
index a7b8be9..28aec12 100644
--- a/mine-web-player.lisp
+++ b/mine-web-player.lisp
@@ -79,18 +79,19 @@
(progn ,@body)))
-(defun make-form (enctype action key-and-values body)
- `(form (:action ,action
- :method "POST"
- :charset :utf-8
- :enctype ,enctype
- )
- ,@(loop
- :for (key value) :on key-and-values :by (function cddr)
- :collect `(input (:type "hidden"
- :name ,(string-downcase key)
- :value ,value)))
- ,@body))
+(eval-when (:execute :compile-toplevel :load-toplevel)
+ (defun make-form (enctype action key-and-values body)
+ `(form (:action ,action
+ :method "POST"
+ :charset :utf-8
+ :enctype ,enctype
+ )
+ ,@(loop
+ :for (key value) :on key-and-values :by (function cddr)
+ :collect `(input (:type "hidden"
+ :name ,(string-downcase key)
+ :value ,value)))
+ ,@body)))
(defmacro insert-form ((action &rest key-and-values &key &allow-other-keys)