From: Frank Schorr
Subject: series without compiler-let ?
Date: 
Message-ID: <31rm6a$hcv@sunserver.lrz-muenchen.de>
I would like to use the series functions.
Unfortunatly all distributions of the series package
I could find on the net depend heavily on compiler-let.
Our lisp implementation, i.e. Allegro Lisp/PC, does not support
this special form and according to CLTL2 X3J13 voted to remove
compiler-let from the language.
I tried to work around that by using eval-when
and let forms, but due to my limited
program skills only mysterious things happened.

Does someone know a solution to this problem,
might be by giving me a hint where to find a 
existing distribution which does not use
compiler-let or by giving me an advice
how to change the functions to remove the 
compiler-let forms. 

Any help is welcome and appreciated,

Frank Schorr,     ·······@physik.tu-muenchen.de
From: Wayne Hyatt
Subject: Re: series without compiler-let ?
Date: 
Message-ID: <HYATT.94Aug5113526@orion.flw.att.com>
In article <··········@sunserver.lrz-muenchen.de> ·······@Physik.TU-Muenchen.DE (Frank Schorr) writes:

   I would like to use the series functions.
   Unfortunatly all distributions of the series package
   I could find on the net depend heavily on compiler-let.
   ....

We used the definition below for compiler-let to get series to
compile.  Note that it uses global variables instead of special
variables so it won't work well with multiple simultaneous compiles in
separate Lisp processes, although that is not a concern with Allegro
Lisp/PC.

Wayne Hyatt
·····@ieain.att.com

-----------------------------------------------------------------------------
(defmacro compiler-set (vars values)
  (mapc #'set vars values)
  '(progn))

(defmacro compiler-unset (vars)
  (mapc #'makunbound vars)
  '(progn))

(defmacro compiler-let (bindings &body body)
  (lisp:let* ((vars (mapcar #'(lambda (x) (if (atom x) x (car x))) bindings))
	      (old-vars (remove-if-not #'boundp vars))
	      (new-vars (remove-if #'boundp vars))
	      (old-values (mapcar #'symbol-value old-vars))
	      (new-values (mapcar #'(lambda (x) (if (atom x) nil (eval (cadr x)))) bindings)))
    `(unwind-protect
	 (progn (compiler-set ,vars ,new-values)
		(progn ,@ body))
       (compiler-set ,old-vars ,old-values)
       (compiler-unset ,new-vars))))