From d738c98d1a830e3017fc1dc0f2cb88a2626b349f Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Fri, 6 Dec 1991 06:01:52 +0000
Subject: [PATCH] Fixed the interpretive indexing conditional (~[...~]) to take
 into account the list of sections is reversed.  Also, check to see if zero is
 less than or equal the index, not the index less than or equal zero.

---
 code/format.lisp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/code/format.lisp b/code/format.lisp
index 38b4145b3..7547f45f4 100644
--- a/code/format.lisp
+++ b/code/format.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.19 1991/12/05 05:08:33 wlott Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.20 1991/12/06 06:01:52 wlott Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1674,9 +1674,10 @@
 		  (interpret-bind-defaults ((index (next-arg))) params
 		    (let* ((default (and last-semi-with-colon-p
 					 (pop sublists)))
+			   (last (1- (length sublists)))
 			   (sublist
-			    (if (<= index 0 (1- (length sublists)))
-				(nth index sublists)
+			    (if (<= 0 index last)
+				(nth (- last index) sublists)
 				default)))
 		      (interpret-directive-list stream sublist orig-args
 						args))))))
-- 
GitLab