From bd9352cdd0981d9dc4cade13527dc79e7a116a5c Mon Sep 17 00:00:00 2001
From: ram <ram>
Date: Thu, 29 Nov 1990 16:50:45 +0000
Subject: [PATCH] Fixed setf'ers to return the right value.

---
 pcl/fin.lisp | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/pcl/fin.lisp b/pcl/fin.lisp
index c74b58b1a..b3060d4ec 100644
--- a/pcl/fin.lisp
+++ b/pcl/fin.lisp
@@ -1050,10 +1050,10 @@ explicitly marked saying who wrote it.
 		     (kernel:%closure-index-ref new-value i))))
 	      (kernel:%set-funcallable-instance-function
 	       fin
-	       (kernel:%closure-function new-value))
-	      new-value))))
+	       (kernel:%closure-function new-value))))))
     (#.vm:function-header-type
-     (kernel:%set-funcallable-instance-function fin new-value))))
+     (kernel:%set-funcallable-instance-function fin new-value)))
+  new-value)
 
 
 ;;; FUNCALLABLE-INSTANCE-NAME, SET-FUNCALLABLE-INSTANCE-NAME  --  Interface
@@ -1090,13 +1090,16 @@ explicitly marked saying who wrote it.
 ;;;
 (defmacro %set-funcallable-instance-data-1 (fin slot new-value)
   (ext:once-only ((n-fin fin)
-		  (n-slot slot))
-    `(kernel:%set-funcallable-instance-info
-      ,n-fin
-      (+ (or (position ,n-slot funcallable-instance-data)
-	     (error "Unknown slot: ~S." ,n-slot))
-	 fin-data-offset)
-      ,new-value)))
+		  (n-slot slot)
+		  (n-val new-value))
+    `(progn
+       (kernel:%set-funcallable-instance-info
+	,n-fin
+	(+ (or (position ,n-slot funcallable-instance-data)
+	       (error "Unknown slot: ~S." ,n-slot))
+	   fin-data-offset)
+	,n-val)
+       ,n-val)))
 ;;;
 (defsetf funcallable-instance-data-1 %set-funcallable-instance-data-1)
 		
-- 
GitLab