Commit f5c2416e authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

prog1: fix return values for the case of a single form with multiple values

prog1 returns only the first value.

Closes #617.
parent a937a038
......@@ -233,10 +233,9 @@ to NIL) sequentially, and executes STATEMENTs. Returns NIL."
(defmacro prog1 (first &rest body &aux (sym (gensym)))
"Syntax: (prog1 first-form {form}*)
Evaluates FIRST-FORM and FORMs in order. Returns the value of FIRST-FORM."
(if (null body) first
`(LET ((,sym ,first))
; (DECLARE (:READ-ONLY ,sym)) ; Beppe
,@body ,sym)))
,@body ,sym))
(defmacro prog2 (first second &rest body &aux (sym (gensym)))
"Syntax: (prog2 first-form second-form {forms}*)
......
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