From 2a139f95ff5e4c116bc3cc07b3198fd80791165c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 30 Apr 1995 07:12:12 +0000 Subject: [PATCH] Repaginate. --- v7/src/edwin/fileio.scm | 59 +++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/v7/src/edwin/fileio.scm b/v7/src/edwin/fileio.scm index ec4bd049e..cd7201856 100644 --- a/v7/src/edwin/fileio.scm +++ b/v7/src/edwin/fileio.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: fileio.scm,v 1.125 1995/04/26 03:22:49 adams Exp $ +;;; $Id: fileio.scm,v 1.126 1995/04/30 07:12:12 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-95 Massachusetts Institute of Technology ;;; @@ -257,15 +257,28 @@ after you find a file. If you explicitly request such a scan with false boolean?) -(define initialize-buffer-local-variables!) -(let () - -(define edwin-environment (->environment '(edwin))) - -(define (evaluate sexp) - (scode-eval (syntax sexp edwin-syntax-table) - edwin-environment)) +(define initialize-buffer-local-variables! + (let () +(define (initialize-buffer-local-variables! buffer find-file?) + (let ((end (buffer-end buffer))) + (let ((start + (with-text-clipped + (mark- end (ref-variable local-variable-search-limit) 'LIMIT) + end + (lambda () (backward-one-page end))))) + (if start + (if (re-search-forward "Edwin Variables:[ \t]*" start end true) + (let ((start (re-match-start 0)) + (end (re-match-end 0))) + (if (or (not find-file?) + (not (ref-variable inhibit-local-variables buffer)) + (prompt-for-confirmation? + (string-append + "Set local variables as specified at end of " + (file-namestring (buffer-pathname buffer))))) + (parse-local-variables buffer start end)))))))) + (define (parse-local-variables buffer start end) (let ((prefix (extract-string (line-start start 0) start)) (suffix (extract-string end (line-end end 0)))) @@ -326,26 +339,14 @@ after you find a file. If you explicitly request such a scan with (loop m4)))))))) (loop start)))) - -(set! initialize-buffer-local-variables! -(named-lambda (initialize-buffer-local-variables! buffer find-file?) - (let ((end (buffer-end buffer))) - (let ((start - (with-text-clipped - (mark- end (ref-variable local-variable-search-limit) 'LIMIT) - end - (lambda () (backward-one-page end))))) - (if start - (if (re-search-forward "Edwin Variables:[ \t]*" start end true) - (let ((start (re-match-start 0)) - (end (re-match-end 0))) - (if (or (not find-file?) - (not (ref-variable inhibit-local-variables buffer)) - (prompt-for-confirmation? - (string-append - "Set local variables as specified at end of " - (file-namestring (buffer-pathname buffer))))) - (parse-local-variables buffer start end)))))))))) + +(define (evaluate sexp) + (scode-eval (syntax sexp edwin-syntax-table) edwin-environment)) + +(define edwin-environment + (->environment '(edwin))) + +initialize-buffer-local-variables!)) ;;;; Output -- 2.25.1