From: Chris Hanson Date: Fri, 15 Oct 1993 02:09:17 +0000 (+0000) Subject: * Editor variables can now define a procedure that will "normalize" X-Git-Tag: 20090517-FFI~7757 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=7e4e525eb339e13f429c697d6d8c455bf358d6df;p=mit-scheme.git * Editor variables can now define a procedure that will "normalize" their values. The DEFINE-VARIABLE has been extended to allow the specification of this normalization procedure to follow the specification of a validity test. * New procedure VARIABLE-LOCAL-VALUE? is true iff the given variable is locally bound in the given buffer. * Procedure VARIABLE-VALUE-VALID? has been eliminated. --- diff --git a/v7/src/edwin/comman.scm b/v7/src/edwin/comman.scm index d0d14bf7f..66c4c9361 100644 --- a/v7/src/edwin/comman.scm +++ b/v7/src/edwin/comman.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: comman.scm,v 1.75 1993/10/14 22:43:17 cph Exp $ +$Id: comman.scm,v 1.76 1993/10/15 02:09:17 cph Exp $ Copyright (c) 1986, 1989-1993 Massachusetts Institute of Technology @@ -165,8 +165,8 @@ of that license should have been included along with this file. (set-variable-buffer-local?! variable #t)) (define (normalize-variable-value variable value) - (if (or (not (variable-value-validity-test variable)) - ((variable-value-validity-test variable) value)) + (if (and (variable-value-validity-test variable) + (not ((variable-value-validity-test variable) value))) (editor-error "Invalid value for " (variable-name-string variable) ": " value)) (if (variable-value-normalization variable)