On 12/30/2010 08:51 PM, Robert Dodier wrote:
> Looks like the problem is caused by r1.61 src/mload.lisp
> which changed $file_type to be more specific -- in previous
> revisions, any filename extension which starts with #\m
> is recognized as a Maxima script, in r1.61 only .mac or .mc is
> recognized. So foo.max is not recognized as a Maxima script
> and load attempts to load it as a Lisp program, hence the
> error. I think the problem will go away if you rename .max
> to .mac.
Thanks for finding the patch.
I'll patch my local versions, so they'll accept .max again
Andre
P.S: was either of the two mechanisms documented somewhere?
> Not sure where to go from here. Revert 1.61 ? or modify it somehow?
>
> best
>
> Robert Dodier
>
>
> Index: mload.lisp
> ===================================================================
> RCS file: /cvsroot/maxima/maxima/src/mload.lisp,v
> retrieving revision 1.60
> retrieving revision 1.61
> diff -u -r1.60 -r1.61
> --- mload.lisp 11 Mar 2010 22:24:30 -0000 1.60
> +++ mload.lisp 27 Mar 2010 12:58:30 -0000 1.61
> @@ -168,18 +168,16 @@
> searched-for))
>
>
> -(defun $file_type (fil&aux typ)
> - (setq fil (pathname fil))
> - (setq typ (format nil "~(~A~)" (pathname-type fil)))
> - (or
> - (and (> (length typ) 0)
> - (let ((ch (aref typ 0)))
> - (cdr (assoc ch '((#\m . $maxima)
> - (#\d . $maxima)
> - (#\l . $lisp)
> - (#\o . $object)
> - (#\f . $object))))))
> - '$object))
> +(defun $file_type (fil)
> + (let ((typ ($pathname_type fil)))
> + (cond
> + ((member typ '("l" "lsp" "lisp") :test #'string=)
> + '$lisp)
> + ((member typ '("mac" "mc" "demo" "dem" "dm1" "dm2" "dm3" "dmt")
> + :test #'string=)
> + '$maxima)
> + (t
> + '$object))))
>
> (defun $pathname_directory (path)
> (let ((pathname (pathname path)))
>