From: Eduardo O. <edu...@gm...> - 2024-10-29 00:45:37
|
Hi all, in another thread I was discussing LispTree, that at this moment has three files - two ".lisp" files and one ".mac" file. Link: http://anggtwu.net/lisptree.html The functions in the file "lisptree.lisp" can be tested in SBCL without loading Maxima, but the file "lisptree-middle.lisp" needs Maxima. I think that debugging the parts in Lisp can become easier if I merge the two Lisp files into a single one, with a structure like this, (defpackage :lisptree (:use :common-lisp)) (in-package :lisptree) ;; ... #+maxima (progn (in-package :maxima) ;; ... ) that only runs the second part if we are "inside Maxima"... but as far as I know Maxima doesn't define a "feature", so the "#+maxima" would have to replaced by something else that checks if (find-package :maxima) is non-nil instead of checking if some "featurep" is non-nil... Anyone knows a _good way_ to do that? I tried a bit with eval-when, but I couldn't find a way to make the (in-package :maxima) be run in compile-time as a top-level form - and because of that the `defun's in the second part were running in "(in-package :lisptree)" instead of in "(in-package :maxima)"... Thanks in advance! Eduardo... |