From f5c2416ea14ce94e5a47cd05526d22ebea95ac5b Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Mon, 15 Feb 2021 21:07:44 +0100 Subject: [PATCH] prog1: fix return values for the case of a single form with multiple values prog1 returns only the first value. Closes #617. --- src/lsp/evalmacros.lsp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lsp/evalmacros.lsp b/src/lsp/evalmacros.lsp index 98b2453b6..255c419ac 100644 --- a/src/lsp/evalmacros.lsp +++ b/src/lsp/evalmacros.lsp @@ -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}*)