maxima/sloop patch: modularity bug [supersedes the previous]



Actually, loop-finish should be renamed to sloop-finish, but this would
require modifying other files too.


2002-10-07  Sam Steingold  <sds@gnu.org>

	* sloop.lisp (loop-finish): shadow the CL loop-finish (yuk!)
	(FIRST-SLOOP-FOR): avoid a warning by explicitly 
	declaring *loop-increment* special
	(type-error): renamed to `sloop-type-error' (type-error is a
	standard CL symbol and should not be used here)

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org>; <http://www.iris.org.il>; <http://www.memri.org/>;
<http://www.mideasttruth.com/>; <http://www.palestine-central.com/links.html>;
Daddy, what does "format disk c: complete" mean?

--- sloop.lisp.~1.2.~	Fri Feb 23 21:21:59 2001
+++ sloop.lisp	Mon Oct  7 10:11:46 2002
@@ -72,9 +72,8 @@
 (in-package "SLOOP")
 
 ;(or (find-package "SLOOP") (make-package "SLOOP" :use '(LISP)))
-;(eval-when (compile eval load)
-;(shadow '(LOOP-FINISH) (find-package "SLOOP"))
-;)
+(eval-when (compile eval load)
+  (shadow '(LOOP-FINISH) (find-package "SLOOP")))
 ;(in-package "SLOOP" )
 ;
 ;(eval-when (compile eval load)
@@ -592,7 +591,7 @@
   (cond (type (list 'the type symbol ))
 	(t symbol)))
 
-(defun type-error ()
+(defun sloop-type-error ()
   (error "While checking a bound of a sloop, I found the wrong type 
 for something in sloop::*automatic-declarations*.
     Perhaps your limit is wrong? 
@@ -640,7 +639,7 @@
 				       'the-value *type-test-limit*)
 			      (or chk value))
 			   ',type)
-			  (type-error))
+			  (sloop-type-error))
 			 ,(or chk value)))))))
 	(t (list value))))
 
@@ -836,7 +835,7 @@
 					       (or inc 1))))
 				 (t `(> ,var  ,(+ most-negative-fixnum
 						  (or inc 1)))))
-			  (type-error))
+			  (sloop-type-error))
 		       *loop-increment*)
 		     )))))
     
@@ -1140,6 +1139,7 @@
 ;;; THEN construction.  
 
 (def-loop-for first (var expr1 then expr2)
+  (declare (special *loop-increment*))
   (or (l-equal then 'then) (error "First must be followed by then"))
   ;; If this is the first for, then we don't need the flag, but can
   ;; move the FIRST setting into the INITIALLY section