Clint Hyde asks if anyone has code to copy defstructs recursively.
If you get a copy of the Save-Object utility (version 7a is the
most recent) and do
(setf my-defstruct (make-mydefstruct)) ;;; make an instance of the
;;; copy-ee
(setf copy (make-let-form my-defstruct (get-dump-form my-defstruct)))
;;;; copy is now the eval-uable text representation of my-defstruct
;;;; all you now need to do is:
(eval copy)
(eval copy) returns a recursive copy of the original.
MAKE-LET-FORM creates a local environment to hold circular references
to the object's component parts.
This isnt a complete solution, of course, because it ignores the
:include option in defstructs; but for simple defstructs (and
CLOS instances) it should be OK.
kerry