[Maxima-commits] CVS: maxima/src trmode.lisp, 1.12, 1.13



Andreas Eder wrote:
> Update of /cvsroot/maxima/maxima/src
> In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22131
>
> Modified Files:
> 	trmode.lisp 
> Log Message:
> removed stale conditionalization;
> replaced maclispisms by cl idioms;
> replaced (set x y) by (setf (symbol-value x) y).
>
>   
What's wrong with SET?  It's a well-defined function in CL.


> @@ -45,78 +43,66 @@
>  (def%tr $define_variable (form)	;;VAR INIT MODE.
>    (cond ((> (length form) 3)
>  	 (destructuring-let (((var val mode) (cdr form)))
> -	   (let ((spec-form `(($declare) ,var $special))
> -		 (mode-form `(($modedeclare) ,var ,mode)))
> -	     (translate spec-form)
> -	     (translate mode-form)
> -	     (push-pre-transl-form
> -	      ;; POSSIBLE OVERKILL HERE
> -	      `(declare (special ,var)))
> -	     (push var defined_variables)
> -	     ;; Get rid of previous definitions put on by
> -	     ;; the translator.
> -	     (do ((l *pre-transl-forms* (cdr l)))
> -		 ((null l))
> -	       ;; REMOVE SOME OVERKILL
> -	       (cond ((and (eq (caar l) 'def-mtrvar)
> -			   (eq (cadar l) var))
> -		      (setq *pre-transl-forms*
> -			    (delq (car l) *pre-transl-forms*)))))
> -	     (if (not (eq mode '$any))
> -		 ;; so that the rest of the translation gronks this.
> -		 (putprop var 'assign-mode-check 'assign))
> -	     `($any . (eval-when (compile eval load)
> -			(meval* ',mode-form)
> -			(meval* ',spec-form)
> -			,(if (not (eq mode '$any))
> -			     `(defprop ,var
> -			       assign-mode-check
> -			       assign))
> -			(def-mtrvar ,(cadr form)
> -			    ,(dtranslate (caddr form))
> -			  )))
> -	     )))
> +			    (let ((spec-form `(($declare) ,var $special))
> +				  (mode-form `(($modedeclare) ,var ,mode)))
> +			      (translate spec-form)
> +			      (translate mode-form)
> +			      (push-pre-transl-form
> +			       ;; POSSIBLE OVERKILL HERE
> +			       `(declare (special ,var)))
>   

Yow.  Please fix your indenter.  It looks like you shoved over the body
of destructuring-let way out to the right.  Of course there's no
standard indentation for destructuring-let, but given the name and the
intent, I think it should have been indented like LET, as was the
original.  Now it's much harder to figure out what you really changed. 
Now I have to look at every single line to find out.  (Well, I suppose I
could do a diff ignoring white-space changes, but still....)

Ray