diff --git a/src/utils.lisp b/src/utils.lisp index 7b6edb9..9e362cb 100644 --- a/src/utils.lisp +++ b/src/utils.lisp @@ -9,7 +9,7 @@ (:nicknames :utils) (:export :it :aif :awhen :safe-first :safe-list - :group :once-only + :group :restartable :add-hook :remove-hook :run-hook :update-current-time :get-delta-time @@ -53,14 +53,6 @@ (nreverse (cons source acc)))))) (if source (rec source nil) nil))) -(defmacro once-only ((&rest names) &body body) - "Evaluate the symbols in `names' only once, for use in a macro, as per Peter Siebel's Practical Common-Lisp." - (let ((gensyms (loop for n in names collect (gensym)))) - `(let (,@(loop for g in gensyms collect `(,g (gensym)))) - `(let (,,@(loop for g in gensyms for n in names collect ``(,,g ,,n))) - ,(let (,@(loop for n in names for g in gensyms collect `(,n ,g))) - ,@body))))) - (defmacro restartable (unprotected &body body) "Provide a Continue restart unless `unprotected' is t." `(if ,unprotected diff --git a/stoe.asd b/stoe.asd index 4d72c84..30a2056 100644 --- a/stoe.asd +++ b/stoe.asd @@ -19,6 +19,7 @@ :author "Renaud Casenave-Péré" :license "GPL3" :depends-on (:swank + :alexandria :glop :cl-opengl) :components ((:module "src"