* Editor variables can now define a procedure that will "normalize"
authorChris Hanson <org/chris-hanson/cph>
Fri, 15 Oct 1993 02:09:17 +0000 (02:09 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 15 Oct 1993 02:09:17 +0000 (02:09 +0000)
  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.

v7/src/edwin/comman.scm

index d0d14bf7ffe1b9566e966dde6edc73f0aabf742e..66c4c936119449d14a5fad1b1f500e19b2a3d27c 100644 (file)
@@ -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))
 \f
 (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)