From 8d5296fcb53ae356eb62a80204c82d464e51635d Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 31 Mar 2005 18:55:57 +0000 Subject: [PATCH] Add REGION? predicate. --- v7/src/edwin/struct.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/v7/src/edwin/struct.scm b/v7/src/edwin/struct.scm index 69a281e1a..a7201c339 100644 --- a/v7/src/edwin/struct.scm +++ b/v7/src/edwin/struct.scm @@ -1,9 +1,9 @@ #| -*-Scheme-*- -$Id: struct.scm,v 1.98 2003/02/14 18:28:13 cph Exp $ +$Id: struct.scm,v 1.99 2005/03/31 18:55:57 cph Exp $ Copyright 1985,1989,1990,1991,1992,1993 Massachusetts Institute of Technology -Copyright 1994,1999,2000,2001,2003 Massachusetts Institute of Technology +Copyright 1994,1999,2000,2001,2003,2005 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -627,6 +627,12 @@ USA. (else (%make-region end start)))) +(define (region? object) + (and (pair? object) + (mark? (car object)) + (mark? (cdr object)) + (mark<= (car object) (cdr object)))) + (define-integrable (region-group region) (mark-group (region-start region))) -- 2.25.1