From fb9f2d1b855978c9d191687e08b6a8476a58eb0d Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Tue, 16 Nov 2010 19:15:38 +0000
Subject: [PATCH] Signal a warning if ~:[ directive includes ~:;.  From a
 message by Didier Verna, cmucl-imp, 2010-11-11.

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

diff --git a/code/format.lisp b/code/format.lisp
index b569e933f..081ae7f22 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.96 2010/04/20 17:57:44 rtoy Rel $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.97 2010/11/16 19:15:38 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -2384,9 +2384,13 @@
 		   (expand-maybe-conditional (car sublists)))))
 	 (if colonp
 	     (if (= (length sublists) 2)
-		 (expand-bind-defaults () params
-		   (expand-true-false-conditional (car sublists)
-						  (cadr sublists)))
+		 (progn
+		   (when last-semi-with-colon-p
+		     (error 'format-error
+			    :complaint (intl:gettext "~~:; directive not effective in ~~:[")))
+		   (expand-bind-defaults () params
+		     (expand-true-false-conditional (car sublists)
+						    (cadr sublists))))
 		 (error 'format-error
 			:complaint
 			(intl:gettext "Must specify exactly two sections.")))
-- 
GitLab