Add new operation `sf/set-default-syntax-table!'.
authorChris Hanson <org/chris-hanson/cph>
Sun, 28 Feb 1988 23:00:06 +0000 (23:00 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 28 Feb 1988 23:00:06 +0000 (23:00 +0000)
v7/src/sf/make.scm
v7/src/sf/toplev.scm
v8/src/sf/make.scm
v8/src/sf/toplev.scm

index 84eb9cb73337da6e3a811db786ef91c455b68d5a..0f894fbdd7adabb738f46c6d1df353704c4bfbf6 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/sf/make.scm,v 3.14 1987/12/23 04:22:11 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/sf/make.scm,v 3.15 1988/02/28 23:00:06 cph Exp $
 
-Copyright (c) 1987 Massachusetts Institute of Technology
+Copyright (c) 1988 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -39,6 +39,7 @@ MIT in each case. |#
 \f
 (define sf)
 (define sfu? false)
+(define sf/set-default-syntax-table!)
 (define sf/set-file-syntax-table!)
 (define sf/add-file-declarations!)
 
@@ -60,7 +61,7 @@ MIT in each case. |#
     (make-environment
       (define :name "SF")
       (define :version 3)
-      (define :modification 14)
+      (define :modification 15)
       (define :files)
 
       (define :files-lists
index 35e60e582389f5e2e699662dc556ff78a69dc365..b894c22e42906a9efa0f395e331d73e53f34e4ff 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/sf/toplev.scm,v 3.4 1987/06/30 21:45:39 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/sf/toplev.scm,v 3.5 1988/02/28 22:59:02 cph Exp $
 
-Copyright (c) 1987 Massachusetts Institute of Technology
+Copyright (c) 1988 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -67,6 +67,12 @@ Currently only the 68000 implementation needs this."
   (fluid-let ((wrapping-hook wrap-with-control-point))
     (syntax-file input-string bin-string spec-string)))
 \f
+(define (sf/set-default-syntax-table! syntax-table)
+  (if (or (false? syntax-table)
+         (syntax-table? syntax-table))
+      (set! default-syntax-table syntax-table)
+      (error "Illegal syntax table" syntax-table)))
+
 (define (sf/set-file-syntax-table! pathname syntax-table)
   (pathname-map/insert! file-info/syntax-table
                        (pathname/normalize pathname)
@@ -84,7 +90,7 @@ Currently only the 68000 implementation needs this."
     (return-2 (pathname-map/lookup file-info/syntax-table
                                   pathname
                                   identity-procedure
-                                  (lambda () false))
+                                  (lambda () default-syntax-table))
              (file-info/get-declarations pathname))))
 
 (define (file-info/get-declarations pathname)
@@ -102,6 +108,9 @@ Currently only the 68000 implementation needs this."
 (define file-info/syntax-table
   (pathname-map/make))
 
+(define default-syntax-table
+  false)
+
 (define file-info/declarations
   (pathname-map/make))
 \f
index e7f981c5bef3edc1d575bb3db800f281c3902294..bead1609ee3a5097b67736143b5c74bffe987112 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/sf/make.scm,v 3.14 1987/12/23 04:22:11 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/sf/make.scm,v 3.15 1988/02/28 23:00:06 cph Exp $
 
-Copyright (c) 1987 Massachusetts Institute of Technology
+Copyright (c) 1988 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -39,6 +39,7 @@ MIT in each case. |#
 \f
 (define sf)
 (define sfu? false)
+(define sf/set-default-syntax-table!)
 (define sf/set-file-syntax-table!)
 (define sf/add-file-declarations!)
 
@@ -60,7 +61,7 @@ MIT in each case. |#
     (make-environment
       (define :name "SF")
       (define :version 3)
-      (define :modification 14)
+      (define :modification 15)
       (define :files)
 
       (define :files-lists
index 12726580c593af3494003564bb40bd6d1a251bad..353e0bed38dbcb80a9ec54229fd218f993d9dd81 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/sf/toplev.scm,v 3.4 1987/06/30 21:45:39 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/sf/toplev.scm,v 3.5 1988/02/28 22:59:02 cph Exp $
 
-Copyright (c) 1987 Massachusetts Institute of Technology
+Copyright (c) 1988 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -67,6 +67,12 @@ Currently only the 68000 implementation needs this."
   (fluid-let ((wrapping-hook wrap-with-control-point))
     (syntax-file input-string bin-string spec-string)))
 \f
+(define (sf/set-default-syntax-table! syntax-table)
+  (if (or (false? syntax-table)
+         (syntax-table? syntax-table))
+      (set! default-syntax-table syntax-table)
+      (error "Illegal syntax table" syntax-table)))
+
 (define (sf/set-file-syntax-table! pathname syntax-table)
   (pathname-map/insert! file-info/syntax-table
                        (pathname/normalize pathname)
@@ -84,7 +90,7 @@ Currently only the 68000 implementation needs this."
     (return-2 (pathname-map/lookup file-info/syntax-table
                                   pathname
                                   identity-procedure
-                                  (lambda () false))
+                                  (lambda () default-syntax-table))
              (file-info/get-declarations pathname))))
 
 (define (file-info/get-declarations pathname)
@@ -102,6 +108,9 @@ Currently only the 68000 implementation needs this."
 (define file-info/syntax-table
   (pathname-map/make))
 
+(define default-syntax-table
+  false)
+
 (define file-info/declarations
   (pathname-map/make))
 \f