From: Chris Hanson Date: Thu, 25 Jan 2001 00:16:39 +0000 (+0000) Subject: Allow a variable value to be stored in a region as a text property. X-Git-Tag: 20090517-FFI~2993 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c0ecf0ff70c21cb8bcee00f27e80c6c8b48d3938;p=mit-scheme.git Allow a variable value to be stored in a region as a text property. --- diff --git a/v7/src/edwin/buffer.scm b/v7/src/edwin/buffer.scm index 26c7a68b1..ef4cc1254 100644 --- a/v7/src/edwin/buffer.scm +++ b/v7/src/edwin/buffer.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: buffer.scm,v 1.178 2000/10/27 03:13:09 cph Exp $ +;;; $Id: buffer.scm,v 1.179 2001/01/25 00:16:39 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology ;;; @@ -344,13 +344,22 @@ The buffer is guaranteed to be deselected at that time." (invoke-variable-assignment-daemons! buffer variable))))))) (define (variable-local-value buffer variable) - (let ((binding - (and buffer - (search-local-bindings (->buffer buffer) variable)))) - (if binding - (cdr binding) - (variable-default-value variable)))) - + (let ((not-mark-local + (lambda () + (let ((binding + (and buffer + (search-local-bindings (->buffer buffer) variable)))) + (if binding + (cdr binding) + (variable-default-value variable)))))) + (if (mark? buffer) + (let ((no-datum (list 'NO-DATUM))) + (let ((value (region-get buffer variable no-datum))) + (if (eq? value no-datum) + (not-mark-local) + value))) + (not-mark-local)))) + (define (variable-local-value? buffer variable) (or (not buffer) (search-local-bindings buffer variable)))