Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ecl
ecl
Commits
f5c2416e
Commit
f5c2416e
authored
Feb 15, 2021
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lsp/evalmacros.lsp
View file @
f5c2416e
...
...
@@ -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}*)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment