From f27a1dbf43b8871b15be55df2b8b841a4b1358f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Wed, 19 Aug 2015 17:46:02 +0200 Subject: [PATCH] shiftf: return one value, not all of them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel KochmaƄski --- src/lsp/setf.lsp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lsp/setf.lsp b/src/lsp/setf.lsp index 2cc9db595..d1cbab74f 100644 --- a/src/lsp/setf.lsp +++ b/src/lsp/setf.lsp @@ -473,7 +473,7 @@ into STORES. Finally inside bindings it expands STORE-FORMS." ;;; SHIFTF macro. (defmacro shiftf (&environment env &rest args) - "Syntax: (shiftf {place}+ form) + "Syntax: (shiftf {place}+ form) Saves the values of PLACE and FORM, and then assigns the value of each PLACE to the PLACE on its left. The rightmost PLACE gets the value of FORM. Returns the original value of the leftmost PLACE." @@ -481,7 +481,7 @@ Returns the original value of the leftmost PLACE." ((butlast args) env) (with-expansion-setter (thunk store-forms) `(let* ,(reduce #'append pairs) - (multiple-value-prog1 ,(car access-forms) + (prog1 ,(car access-forms) ,@(thunk stores (append (cdr access-forms) (last args)))))))) @@ -496,10 +496,10 @@ PLACE. Returns NIL." (args env) (with-expansion-setter (thunk store-forms) `(let* ,(reduce #'append pairs) - ,@(thunk stores - (append (cdr access-forms) - (list (car access-forms)))) - nil)))) + (prog1 nil + ,@(thunk stores + (append (cdr access-forms) + (list (car access-forms))))))))) ;;; DEFINE-MODIFY-MACRO macro, by Bruno Haible. (defmacro define-modify-macro (name lambdalist function &optional docstring)