From 8f8eae9448f9f7f07c6af32561cf4c8d1c991dd5 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Mon, 18 Apr 2005 21:56:17 +0000
Subject: [PATCH] Fix ansi tests FORMATTER.COND.13 and |FORMATTER.COND:.6|
 where ~V[ wasn't returning the right second value.

Taken from SBCL.
---
 code/format.lisp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/code/format.lisp b/code/format.lisp
index ffb0c0664..270caa00e 100644
--- a/code/format.lisp
+++ b/code/format.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.62 2005/03/22 16:12:43 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.63 2005/04/18 21:56:17 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1773,9 +1773,10 @@
 		 (error 'format-error
 			:complaint
 			"Must specify exactly two sections."))
-	     (expand-bind-defaults ((index (expand-next-arg))) params
+	     (expand-bind-defaults ((index nil)) params
 	       (setf *only-simple-args* nil)
-	       (let ((clauses nil))
+	       (let ((clauses nil)
+		     (case `(or ,index ,(expand-next-arg))))
 		 (when last-semi-with-colon-p
 		   (push `(t ,@(expand-directive-list (pop sublists)))
 			 clauses))
@@ -1784,7 +1785,7 @@
 		     (push `(,(decf count)
 			     ,@(expand-directive-list sublist))
 			   clauses)))
-		 `(case ,index ,@clauses)))))
+		 `(case ,case ,@clauses)))))
      remaining)))
 
 (defun expand-maybe-conditional (sublist)
-- 
GitLab