;;; -*-Scheme-*-
;;;
-;;; $Id: fileio.scm,v 1.124 1995/01/31 19:35:11 cph Exp $
+;;; $Id: fileio.scm,v 1.125 1995/04/26 03:22:49 adams Exp $
;;;
;;; Copyright (c) 1986, 1989-95 Massachusetts Institute of Technology
;;;
(define initialize-buffer-local-variables!)
(let ()
-(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 edwin-environment (->environment '(edwin)))
(define (evaluate sexp)
(scode-eval (syntax sexp edwin-syntax-table)
edwin-environment))
-\f
+
(define (parse-local-variables buffer start end)
(let ((prefix (extract-string (line-start start 0) start))
(suffix (extract-string end (line-end end 0))))
(loop m4))))))))
(loop start))))
-
-)
+\f
+(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))))))))))
\f
;;;; Output
;;; -*-Scheme-*-
;;;
-;;; $Id: motion.scm,v 1.86 1994/09/08 20:34:04 adams Exp $
+;;; $Id: motion.scm,v 1.87 1995/04/26 03:23:03 adams Exp $
;;;
;;; Copyright (c) 1985, 1989-93 Massachusetts Institute of Technology
;;;
(define mark-)
(let ()
-(set! mark+
-(named-lambda (mark+ mark n #!optional limit?)
- (let ((limit? (and (not (default-object? limit?)) limit?)))
- (cond ((fix:positive? n) (%mark+ mark n limit?))
- ((fix:negative? n) (%mark- mark (fix:- 0 n) limit?))
- (else mark)))))
-
-(set! mark-
-(named-lambda (mark- mark n #!optional limit?)
- (let ((limit? (and (not (default-object? limit?)) limit?)))
- (cond ((fix:positive? n) (%mark- mark n limit?))
- ((fix:negative? n) (%mark+ mark (fix:- 0 n) limit?))
- (else mark)))))
-
(define (%mark+ mark n limit?)
(let ((group (mark-group mark))
(new-index (fix:+ (mark-index mark) n)))
(limit-mark-motion limit? (group-start-mark group))
(make-mark group new-index))))
+(set! mark+
+(named-lambda (mark+ mark n #!optional limit?)
+ (let ((limit? (and (not (default-object? limit?)) limit?)))
+ (cond ((fix:positive? n) (%mark+ mark n limit?))
+ ((fix:negative? n) (%mark- mark (fix:- 0 n) limit?))
+ (else mark)))))
+
+(set! mark-
+(named-lambda (mark- mark n #!optional limit?)
+ (let ((limit? (and (not (default-object? limit?)) limit?)))
+ (cond ((fix:positive? n) (%mark- mark n limit?))
+ ((fix:negative? n) (%mark+ mark (fix:- 0 n) limit?))
+ (else mark)))))
+
)
\f
;;;; Motion by Lines