batch-mode? in terms of *repl-level*

* module/ice-9/boot-9.scm (*repl-level*): New global fluid, moved here
  from (system repl common).
  (batch-mode?): Reimplement in terms of *repl-level*.
  (ensure-batch-mode!): A replacement for set-batch-mode?!.

* module/ice-9/deprecated.scm (set-batch-mode?!): Deprecate.

* module/ice-9/popen.scm (open-process): Use ensure-batch-mode!.

* module/ice-9/scm-style-repl.scm (error-catching-loop): Override
  ensure-batch-mode!.

* module/system/repl/common.scm: Remove *repl-level*.
This commit is contained in:
Andy Wingo 2010-06-18 12:28:18 +02:00
commit 9346b857af
5 changed files with 35 additions and 17 deletions

View file

@ -1,6 +1,6 @@
;; popen emulation, for non-stdio based ports.
;;;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2006 Free Software Foundation, Inc.
;;;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2006, 2010 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -59,7 +59,7 @@
(let ((pid (primitive-fork)))
(cond ((= pid 0)
;; child
(set-batch-mode?! #t)
(ensure-batch-mode!)
;; select the three file descriptors to be used as
;; standard descriptors 0, 1, 2 for the new