From 8627e6e882c3dcf13f6483aa6d40765cfab51b5d Mon Sep 17 00:00:00 2001
From: Chris Hanson <org/chris-hanson/cph>
Date: Tue, 11 Oct 1994 23:10:21 +0000
Subject: [PATCH] Move HIGHLIGHT-REGION-EXCLUDING-INDENTATION to "txtprp.scm"
 and export it to the edwin package.

---
 v7/src/edwin/debug.scm  | 19 +------------------
 v7/src/edwin/edwin.pkg  |  3 ++-
 v7/src/edwin/txtprp.scm | 19 ++++++++++++++++++-
 3 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/v7/src/edwin/debug.scm b/v7/src/edwin/debug.scm
index 78e9d8e04..a0a05ccdf 100644
--- a/v7/src/edwin/debug.scm
+++ b/v7/src/edwin/debug.scm
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;	$Id: debug.scm,v 1.29 1994/10/11 23:08:21 cph Exp $
+;;;	$Id: debug.scm,v 1.30 1994/10/11 23:09:58 cph Exp $
 ;;;
 ;;;	Copyright (c) 1992-94 Massachusetts Institute of Technology
 ;;;
@@ -90,23 +90,6 @@
  	(highlight-region-excluding-indentation start-mark end-mark))
     (if start-mark (mark-temporary! start-mark))
     (if end-mark (mark-temporary! end-mark))))
-
-(define (highlight-region-excluding-indentation region highlight)
-  (let ((start (region-start region))
-	(end (region-end region)))
-    (let loop ((start start))
-      (let ((start (horizontal-space-end start))
-	    (lend (line-end start 0)))
-	(if (mark<= lend end)
-	    (begin
-	      (let ((end (horizontal-space-start lend)))
-		(if (mark< start end)
-		    (highlight-region (make-region start end) highlight)))
-	      (if (not (group-end? lend))
-		  (loop (mark1+ lend))))
-	    (let ((end (horizontal-space-start end)))
-	      (if (mark< start end)
-		  (highlight-region (make-region start end) highlight))))))))
 
 ;;;; Browsers
 
diff --git a/v7/src/edwin/edwin.pkg b/v7/src/edwin/edwin.pkg
index 522b4a61f..19ba3fd3f 100644
--- a/v7/src/edwin/edwin.pkg
+++ b/v7/src/edwin/edwin.pkg
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: edwin.pkg,v 1.150 1994/09/08 21:36:46 adams Exp $
+$Id: edwin.pkg,v 1.151 1994/10/11 23:10:21 cph Exp $
 
 Copyright (c) 1989-1994 Massachusetts Institute of Technology
 
@@ -892,6 +892,7 @@ MIT in each case. |#
 	  get-text-properties
 	  get-text-property
 	  highlight-region
+	  highlight-region-excluding-indentation
 	  highlight-subgroup
 	  local-comtabs
 	  next-property-change
diff --git a/v7/src/edwin/txtprp.scm b/v7/src/edwin/txtprp.scm
index 7641a086f..f6988990e 100644
--- a/v7/src/edwin/txtprp.scm
+++ b/v7/src/edwin/txtprp.scm
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;	$Id: txtprp.scm,v 1.14 1993/10/12 00:18:15 cph Exp $
+;;;	$Id: txtprp.scm,v 1.15 1994/10/11 23:10:12 cph Exp $
 ;;;
 ;;;	Copyright (c) 1993 Massachusetts Institute of Technology
 ;;;
@@ -317,6 +317,23 @@
 		      (region-end-index region)
 		      highlight))
 
+(define (highlight-region-excluding-indentation region highlight)
+  (let ((start (region-start region))
+	(end (region-end region)))
+    (let loop ((start start))
+      (let ((start (horizontal-space-end start))
+	    (lend (line-end start 0)))
+	(if (mark<= lend end)
+	    (begin
+	      (let ((end (horizontal-space-start lend)))
+		(if (mark< start end)
+		    (highlight-region (make-region start end) highlight)))
+	      (if (not (group-end? lend))
+		  (loop (mark1+ lend))))
+	    (let ((end (horizontal-space-start end)))
+	      (if (mark< start end)
+		  (highlight-region (make-region start end) highlight))))))))
+
 (define (local-comtabs mark)
   (get-text-property (mark-group mark) (mark-index mark) 'COMMAND-TABLE #f))
 
-- 
2.25.1