From 76618d28a01b4b65b530ac032372f2b22ad08d5d Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 30 Aug 2015 10:58:38 +0100 Subject: [PATCH] src/debug.lisp: Write output to a well-known file. 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. --- src/debug.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/debug.lisp b/src/debug.lisp index e281397..af5f104 100644 --- a/src/debug.lisp +++ b/src/debug.lisp @@ -25,6 +25,9 @@ (cl:in-package #:sod) +(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 @@ -32,7 +35,10 @@ (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 -------------------------------------------------- -- 2.11.0