mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-09 06:30:32 -07:00
prog1: fix return values for the case of a single form with multiple values
prog1 returns only the first value. Closes #617.
This commit is contained in:
parent
a937a038a9
commit
f5c2416ea1
1 changed files with 1 additions and 2 deletions
|
|
@ -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}*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue