This way, Emacs can display it properly fontified in a buffer, and
refresh when it gets changed, rather than having an enormous dump of
text in the middle of a REPL session.
+(export '*debugout-pathname*)
+(defvar *debugout-pathname* #p"debugout.c")
+
(export 'test-module)
(defun test-module (path reason)
"Reset the translator's state, read a module from PATH and output it with
(export 'test-module)
(defun test-module (path reason)
"Reset the translator's state, read a module from PATH and output it with
(unless *builtin-module* (make-builtin-module))
(clear-the-decks)
(setf *module-map* (make-hash-table :test #'equal))
(unless *builtin-module* (make-builtin-module))
(clear-the-decks)
(setf *module-map* (make-hash-table :test #'equal))
- (with-output-to-string (out)
+ (with-open-file (out *debugout-pathname*
+ :direction :output
+ :if-exists :supersede
+ :if-does-not-exist :create)
(output-module (read-module path) reason out)))
;;;----- That's all, folks --------------------------------------------------
(output-module (read-module path) reason out)))
;;;----- That's all, folks --------------------------------------------------