branch: elpa/geiser-guile
commit acde425e824c401c8db14be9ec56c4b6fe22dd8d
Author: Jose Antonio Ortega Ruiz <[email protected]>
Commit: Jose Antonio Ortega Ruiz <[email protected]>

    Macro-expand commands.
---
 geiser/emacs.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/geiser/emacs.scm b/geiser/emacs.scm
index 66320ec..f2f3d45 100644
--- a/geiser/emacs.scm
+++ b/geiser/emacs.scm
@@ -41,6 +41,7 @@
   #:use-module (system base compile)
   #:use-module (system vm program)
   #:use-module (ice-9 debugger utils)
+  #:use-module (ice-9 pretty-print)
   #:use-module ((geiser introspection) :renamer (symbol-prefix-proc 'ge:)))
 
 (define (make-result result output)
@@ -144,6 +145,8 @@
 
 (define (ge:macroexpand form . all)
   (let ((all (and (not (null? all)) (car all))))
-    ((if all macroexpand macroexpand-1) form)))
+    (with-output-to-string
+      (lambda ()
+        (pretty-print ((if all macroexpand macroexpand-1) form))))))
 
 ;;; emacs.scm ends here

Reply via email to