From 78f4a447051a643dec7fb35202ed0dc9098cd0b4 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 28 Feb 1988 23:00:06 +0000 Subject: [PATCH] Add new operation `sf/set-default-syntax-table!'. --- v7/src/sf/make.scm | 7 ++++--- v7/src/sf/toplev.scm | 15 ++++++++++++--- v8/src/sf/make.scm | 7 ++++--- v8/src/sf/toplev.scm | 15 ++++++++++++--- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/v7/src/sf/make.scm b/v7/src/sf/make.scm index 84eb9cb73..0f894fbdd 100644 --- a/v7/src/sf/make.scm +++ b/v7/src/sf/make.scm @@ -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. |# (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 diff --git a/v7/src/sf/toplev.scm b/v7/src/sf/toplev.scm index 35e60e582..b894c22e4 100644 --- a/v7/src/sf/toplev.scm +++ b/v7/src/sf/toplev.scm @@ -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))) +(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)) diff --git a/v8/src/sf/make.scm b/v8/src/sf/make.scm index e7f981c5b..bead1609e 100644 --- a/v8/src/sf/make.scm +++ b/v8/src/sf/make.scm @@ -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. |# (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 diff --git a/v8/src/sf/toplev.scm b/v8/src/sf/toplev.scm index 12726580c..353e0bed3 100644 --- a/v8/src/sf/toplev.scm +++ b/v8/src/sf/toplev.scm @@ -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))) +(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)) -- 2.25.1