diff options
author | dos-reis <gdr@axiomatics.org> | 2008-10-06 07:40:02 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-10-06 07:40:02 +0000 |
commit | b54e2a3ac1d94c545db197bb27705cded2f692f5 (patch) | |
tree | a5d6dfb394a43480b6d926363bfe3c0b8effd925 /src/interp | |
parent | 7b9149e57a6ebacf677bf0fdd08528df3cbdb32f (diff) | |
download | open-axiom-b54e2a3ac1d94c545db197bb27705cded2f692f5.tar.gz |
* interp/sys-macros.lisp (|quietlyIfInteractive|): New.
* interp/compiler.boot (quietlyIfInteractive): Use it.
(compQuietly): Likewise.
(compileQuietly): Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/compiler.boot | 16 | ||||
-rw-r--r-- | src/interp/sys-macros.lisp | 6 |
2 files changed, 9 insertions, 13 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 004acbb0..cb237c12 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1895,10 +1895,7 @@ compMapCondFun(fnexpr,op,dc,bindings) == --% Interface to the backend compileFileQuietly path == - $OutputStream := - $InteractiveMode => MAKE_-BROADCAST_-STREAM() - MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*" - COMPILE_-FILE path + quietlyIfInteractive COMPILE_-FILE path compAndDefine l == _*COMP370_-APPLY_* := "PRINT-AND-EVAL-DEFUN" @@ -1910,11 +1907,7 @@ compQuietly fn == $compileDontDefineFunctions => "COMPILE-DEFUN" "EVAL-DEFUN" "PRINT-DEFUN" - -- create a null outputstream if $InteractiveMode - $OutputStream := - $InteractiveMode => MAKE_-BROADCAST_-STREAM() - MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*" - COMP fn + quietlyIfInteractive COMP fn compileQuietly fn == _*COMP370_-APPLY_* := @@ -1922,10 +1915,7 @@ compileQuietly fn == $compileDontDefineFunctions => "COMPILE-DEFUN" "EVAL-DEFUN" "PRINT-DEFUN" - $OutputStream := - $InteractiveMode => MAKE_-BROADCAST_-STREAM() - MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*" - COMP370 fn + quietlyIfInteractive COMP370 fn COMP l == diff --git a/src/interp/sys-macros.lisp b/src/interp/sys-macros.lisp index c53dac73..53a6c3b5 100644 --- a/src/interp/sys-macros.lisp +++ b/src/interp/sys-macros.lisp @@ -1308,6 +1308,12 @@ (SUBST (SECOND L) 'x '(COND ($reportFlag (sayBrightly x)) ((QUOTE T) NIL)))) +;; Quietly execute `cmd' if in interactive session +(defmacro |quietlyIfInteractive| (cmd) + `(let ((|$OutputStream| (if |$InteractiveMode| + (make-broadcast-stream) + (make-synonym-stream '*standard-output*)))) + ,cmd)) (defmacro |spadConstant| (dollar n) `(spadcall (svref ,dollar (the fixnum ,n)))) |