* expect.scm: (expect-regexec): new procedure, use it in
authorGary Houston <ghouston@arglist.com>
Sat, 11 Oct 1997 20:42:24 +0000 (20:42 +0000)
committerGary Houston <ghouston@arglist.com>
Sat, 11 Oct 1997 20:42:24 +0000 (20:42 +0000)
expect-strings to fix the => syntax under the new regex system.
(top): include regex module in define-module statement.
* (error-catching-loop): new local variable "interactive".  if
#f, abort terminates the process.
(set-batch-mode?!, batch-mode?): new closures, defined in
error-catching-loop.  the names are from scsh.

ice-9/ChangeLog
ice-9/boot-9.scm

index 8e8a2f5..a420069 100644 (file)
@@ -1,3 +1,16 @@
+Thu Oct  9 05:44:00 1997  Gary Houston  <ghouston@actrix.gen.nz>
+
+       * expect.scm: (expect-regexec): new procedure, use it in
+       expect-strings to fix the => syntax under the new regex system.
+       (top): include regex module in define-module statement.
+
+Wed Oct  8 03:16:01 1997  Gary Houston  <ghouston@actrix.gen.nz>
+
+       * (error-catching-loop): new local variable "interactive".  if
+       #f, abort terminates the process.
+       (set-batch-mode?!, batch-mode?): new closures, defined in 
+       error-catching-loop.  the names are from scsh.
+
 1997-10-06  Marius Vollmer  <mvo@zagadka.ping.de>
 
        * boot-9.scm (inherit-print-state): If NEW-PORT contains a
index c1e27ab..11668b0 100644 (file)
 
 (define abort-hook '())
 
+;; defined in error-catching-loop as a closures.
+(define set-batch-mode?! #f)
+(define batch-mode? #f)
+
 (define (error-catching-loop thunk)
-  (let ((status #f))
+  (let ((status #f)
+       (interactive #t))
+    (set! set-batch-mode?! (lambda (arg)
+                            (cond (arg 
+                                   (set! interactive #f)
+                                   (restore-signals))
+                                  (#t
+                                   (error "sorry, not implemented")))))
+    (set! batch-mode? (lambda () (not interactive)))
     (define (loop first)
       (let ((next 
             (catch #t
                           (display "ABORT: "  (current-error-port))
                           (write args (current-error-port))
                           (newline (current-error-port))
-                          (if (and (not has-shown-debugger-hint?)
-                                   (not (memq 'backtrace
-                                              (debug-options-interface)))
-                                   (stack? the-last-stack))
-                              (begin
-                                (newline (current-error-port))
-                                (display
-                                 "Type \"(backtrace)\" to get more information.\n"
-                                 (current-error-port))
-                                (set! has-shown-debugger-hint? #t)))
+                          (if interactive
+                              (if (and (not has-shown-debugger-hint?)
+                                       (not (memq 'backtrace
+                                                  (debug-options-interface)))
+                                       (stack? the-last-stack))
+                                  (begin
+                                    (newline (current-error-port))
+                                    (display
+                                     "Type \"(backtrace)\" to get more information.\n"
+                                     (current-error-port))
+                                    (set! has-shown-debugger-hint? #t)))
+                              (primitive-exit 1))
                           (set! stack-saved? #f)))
 
                        (else