Include alexandria library in the project
Discard useless once-only macro and replace it by alexandria's implementation
This commit is contained in:
parent
eaedaf8a35
commit
75aae52cfe
2 changed files with 2 additions and 9 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
(:nicknames :utils)
|
(:nicknames :utils)
|
||||||
(:export :it :aif :awhen
|
(:export :it :aif :awhen
|
||||||
:safe-first :safe-list
|
:safe-first :safe-list
|
||||||
:group :once-only
|
:group
|
||||||
:restartable
|
:restartable
|
||||||
:add-hook :remove-hook :run-hook
|
:add-hook :remove-hook :run-hook
|
||||||
:update-current-time :get-delta-time
|
:update-current-time :get-delta-time
|
||||||
|
|
@ -53,14 +53,6 @@
|
||||||
(nreverse (cons source acc))))))
|
(nreverse (cons source acc))))))
|
||||||
(if source (rec source nil) nil)))
|
(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)
|
(defmacro restartable (unprotected &body body)
|
||||||
"Provide a Continue restart unless `unprotected' is t."
|
"Provide a Continue restart unless `unprotected' is t."
|
||||||
`(if ,unprotected
|
`(if ,unprotected
|
||||||
|
|
|
||||||
1
stoe.asd
1
stoe.asd
|
|
@ -19,6 +19,7 @@
|
||||||
:author "Renaud Casenave-Péré"
|
:author "Renaud Casenave-Péré"
|
||||||
:license "GPL3"
|
:license "GPL3"
|
||||||
:depends-on (:swank
|
:depends-on (:swank
|
||||||
|
:alexandria
|
||||||
:glop
|
:glop
|
||||||
:cl-opengl)
|
:cl-opengl)
|
||||||
:components ((:module "src"
|
:components ((:module "src"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue