Add command-line switch "-no-suspend-file" to disable the generation
authorChris Hanson <org/chris-hanson/cph>
Tue, 18 Aug 1992 02:56:23 +0000 (02:56 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 18 Aug 1992 02:56:23 +0000 (02:56 +0000)
of "~/scheme_suspend" files.

v7/src/runtime/intrpt.scm
v7/src/runtime/load.scm
v7/src/runtime/runtime.pkg
v8/src/runtime/load.scm
v8/src/runtime/runtime.pkg

index 108a9ca31caaca96d3d75aa6c5cab0e88d28c90c..f7bc82a26d942880f675ec2328878059db0f2552 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/intrpt.scm,v 14.10 1992/02/25 22:55:20 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/intrpt.scm,v 14.11 1992/08/18 02:56:20 cph Exp $
 
 Copyright (c) 1988-92 Massachusetts Institute of Technology
 
@@ -85,23 +85,28 @@ MIT in each case. |#
   (clear-interrupts! interrupt-bit/timer)
   (thread-timer-interrupt-handler))
 
+;; This switch is set by the command-line initialization code.
+(define generate-suspend-file?)
+
 (define (suspend-interrupt-handler interrupt-code interrupt-enables)
   interrupt-code interrupt-enables
   (clear-interrupts! interrupt-bit/suspend)
-  (bind-condition-handler (list condition-type:serious-condition)
-      (lambda (condition)
-       condition
-       (%exit))
-    (lambda ()
-      (bind-condition-handler (list condition-type:warning)
+  (if generate-suspend-file?
+      (bind-condition-handler (list condition-type:serious-condition)
          (lambda (condition)
            condition
-           (muffle-warning))
+           (%exit))
        (lambda ()
-         (if (not (disk-save (merge-pathnames "scheme_suspend"
-                                              (user-homedir-pathname))
-                             true))
-             (%exit)))))))
+         (bind-condition-handler (list condition-type:warning)
+             (lambda (condition)
+               condition
+               (muffle-warning))
+           (lambda ()
+             (if (not (disk-save (merge-pathnames "scheme_suspend"
+                                                  (user-homedir-pathname))
+                                 true))
+                 (%exit))))))
+      (%exit)))
 
 (define (gc-out-of-space-handler . args)
   args
index 2b5ad42b747251f256c43d59b4db2454bd398655..142b138aad8cf65a25865bbc7bcd106a63a788c0 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.39 1992/08/13 11:48:04 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.40 1992/08/18 02:56:22 cph Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -283,6 +283,7 @@ MIT in each case. |#
       unspecific))
 \f
 (define (process-command-line)
+  (set! generate-suspend-file? true)
   (hook/process-command-line ((ucode-primitive get-unused-command-line 0))))
 
 (define hook/process-command-line)
@@ -404,6 +405,13 @@ MIT in each case. |#
      (set! *load-init-file?* false)
      (values (cdr command-line) #f)))
 
+  (set! generate-suspend-file? true)
+  (set-command-line-parser!
+   "-no-suspend-file"
+   (lambda (command-line)
+     (set! generate-suspend-file? false)
+     (values (cdr command-line) #f)))
+
   (set-command-line-parser!
    "-load"
    (lambda (command-line)
index 5400783535c5535460b721f1246e635525b39742..6d32c69e193d73b6de9be5f5abf93c26276019e9 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.158 1992/08/12 01:08:57 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.159 1992/08/18 02:56:23 cph Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -1028,6 +1028,8 @@ MIT in each case. |#
   (export (runtime emacs-interface)
          hook/^G-interrupt
          hook/clean-input/flush-typeahead)
+  (export (runtime load)
+         generate-suspend-file?)
   (initialization (initialize-package!)))
 
 (define-package (runtime lambda-abstraction)
index 252a15561ffe6fc2de05b911c16d47196843c84a..ec8c731c56bb7b61591f1522454144e56f729b48 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.39 1992/08/13 11:48:04 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.40 1992/08/18 02:56:22 cph Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -283,6 +283,7 @@ MIT in each case. |#
       unspecific))
 \f
 (define (process-command-line)
+  (set! generate-suspend-file? true)
   (hook/process-command-line ((ucode-primitive get-unused-command-line 0))))
 
 (define hook/process-command-line)
@@ -404,6 +405,13 @@ MIT in each case. |#
      (set! *load-init-file?* false)
      (values (cdr command-line) #f)))
 
+  (set! generate-suspend-file? true)
+  (set-command-line-parser!
+   "-no-suspend-file"
+   (lambda (command-line)
+     (set! generate-suspend-file? false)
+     (values (cdr command-line) #f)))
+
   (set-command-line-parser!
    "-load"
    (lambda (command-line)
index 6e0b3f30a8f66a7572e0bb6796b767a0daee2389..a53c65b5877578b3fb501c27d183fa5df875534f 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.158 1992/08/12 01:08:57 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.159 1992/08/18 02:56:23 cph Exp $
 
-Copyright (c) 1988-1992 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -1028,6 +1028,8 @@ MIT in each case. |#
   (export (runtime emacs-interface)
          hook/^G-interrupt
          hook/clean-input/flush-typeahead)
+  (export (runtime load)
+         generate-suspend-file?)
   (initialization (initialize-package!)))
 
 (define-package (runtime lambda-abstraction)