Verified Commit fe0fad36 authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Marked PS-ONCE-ONLY as deprecated

parent 7618c052
...@@ -368,13 +368,14 @@ gensym-prefix-string)." ...@@ -368,13 +368,14 @@ gensym-prefix-string)."
(defmacro ps-once-only ((&rest vars) &body body) (defmacro ps-once-only ((&rest vars) &body body)
"Helper macro for writing Parenscript macros. Useful for preventing unwanted multiple evaluation." "Helper macro for writing Parenscript macros. Useful for preventing unwanted multiple evaluation."
(warn-deprecated 'ps-once-only 'maybe-once-only)
(let ((gensyms (mapcar #'ps-gensym vars))) (let ((gensyms (mapcar #'ps-gensym vars)))
`(let ,(mapcar (lambda (g v) `(,g (ps-gensym ',v))) `(let* ,(mapcar (lambda (g v) `(,g (ps-gensym ',v)))
gensyms vars) gensyms vars)
`(let* (,,@(mapcar (lambda (g v) `(list ,g ,v)) `(let* (,,@(mapcar (lambda (g v) `(list ,g ,v))
gensyms vars)) gensyms vars))
,(let ,(mapcar (lambda (g v) (list v g)) ,(let* ,(mapcar (lambda (g v) (list v g))
gensyms vars) gensyms vars)
,@body))))) ,@body)))))
(defmacro maybe-once-only ((&rest vars) &body body) (defmacro maybe-once-only ((&rest vars) &body body)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment