From: Kris K. <kj...@us...> - 2016-06-18 23:29:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, master has been updated via b9f889a1f81be2ea1fe6fb2af64fced6d8ec9326 (commit) from 73e2f0f75238de98294609927f6b1cd938f4c69c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b9f889a1f81be2ea1fe6fb2af64fced6d8ec9326 Author: Kris Katterjohn <kat...@gm...> Date: Sat Jun 18 18:13:15 2016 -0500 Cut out the broken and unused macro DEF$FUN in share/affine/polyd.lisp This macro was supposed to be for defining functions and automatically declaring any variables in the lambda list beginning with a dollar sign to be special. However, this was broken in CL because it would use CHAR on a symbol (not the symbol's name), which would cause an error. In commit 7ccc7f the last use of this macro was removed (I'm guessing that the intention was to not use it on CL implementations because the DEF$FUN form was subject to a read-time test #-cl, but that's not a standard feature... this code was from 1996 or before). The only other occurrences of this macro have been examples in comments. Also cut out the related and otherwise unused special variable *SHOW-SPECIALS*. diff --git a/share/affine/polyd.lisp b/share/affine/polyd.lisp index 2f73446..950604a 100644 --- a/share/affine/polyd.lisp +++ b/share/affine/polyd.lisp @@ -8,7 +8,6 @@ (in-package :maxima) (defvar $last_answer nil) -(defvar *show-specials* nil) (defun which-centrals-to-add (&aux *previously-checked-pairs* ($dot_simplifications)) "Checks you aren't adding a trivial product of centrals etc. @@ -337,84 +336,6 @@ far degree" ; ;(si:SET-SYNTAX-/#-MACRO-CHAR #\$ 'x$-macro-read) -;;the following will get the arg x of h into the list before the meval*. -;;it is hard to see any other way of accomplishing this since the form must -;;;be evaluated by simplifya etc, and so we need to have the -;(defun h (x) -; (declare (special x)) ;;these all work including the binding of x to ?x. -; #$3*[?x,y,z]$) ;; maybe better form to use (defun h ($x) and avoid the -;(setq me #$$y.y.y$) -; -;;;probably want one of the preceding with meval* built in and one without. -;(defun h (x) -; #$factor(x^2+x+1)$) -; -;(defun h ($x $y) -; (declare (special $x $y)) -; #$x^y$) -; -; "~%Declaring special~ -; ~#[none ~; ~A ~; ~A and ~A ~; ~@{~#[~1; and ~] ~A~^,~}~]." -; tem) -(eval-when - #+gcl (load compile) - #-gcl (:load-toplevel :compile-toplevel) - (defvar *show-specials* nil)) - -(defmacro def$fun (&body l) - "Will declare special any variables in the lambda list beginning with $ - This is useful in conjunction with the #$ reader macro so that variables bound - in the arglist will get declared and so can be referred to in the meval" - (setq l (copy-list l)) - - (loop for v in (second l) - when (and (symbolp v) (eq (char v 0) #\$)) - collecting v into tem - when (and (listp v) (symbolp (setq v (car v))) (eq (char v 0) #\$)) - collecting v into tem - finally - (cond (*show-specials* - (apply 'format t "~@{~%The variable ~A has been declared special for scoping~}" tem))) - (return `(defun ,(car l) ,(second l) - ,@ (cons `(declare (special ,@ tem)) - (cddr l)))))) - -; -;(def$fun te ($x &aux $i (u 3) ($z 4)) -; (loop for $i below $z -; collecting #$y^i+3*x^z$)) - - -;;;this expands into -;(DEFUN TE ($X &AUX (U 3) ($Z 4)) -; (DECLARE (SPECIAL $X $Z)) -; (LET ((Y 3)) (MEVAL* '((MPLUS) $X 1)))) -;(te 2)==> 3 -;(def$fun te ($x n &aux $i) -; (loop for $i below n -; collecting #$x^i+3+y^i$ -; into tem -; finally (return (cons '(mlist) tem)))) -;;expands to which does collect the right thing. -;(DEFUN TE ($X N &AUX $I) -; (DECLARE (SPECIAL $X $I)) -; (LOOP FOR -; $I -; BELOW -; N -; COLLECTING -; (MEVAL* '((MPLUS) ((MEXPT) $X $I) 3 ((MEXPT) $Y $I))) -; INTO -; TEM -; FINALLY -; (RETURN (CONS '(MLIST) TEM)))) -;(def$fun te ($x n &aux $i) -; (loop for $i below n -; collecting #$x^i+3+y^i$ -; into tem -; finally (return (cons '(mlist) tem)))) -;;expands to which does collect the right thing. - (defun $fast_central_elements_given_commutator (variables deg comut used_var &aux f unknowns eqns tem1 parameters answer ) (setq variables (cons '(mlist) (sort (cdr variables) $order_function))) ----------------------------------------------------------------------- Summary of changes: share/affine/polyd.lisp | 79 ----------------------------------------------- 1 files changed, 0 insertions(+), 79 deletions(-) hooks/post-receive -- Maxima CAS |