From: Chris Hanson <org/chris-hanson/cph>
Date: Fri, 16 Nov 1990 11:38:07 +0000 (+0000)
Subject: `indent-relative' changed to take no interactive arguments, since it
X-Git-Tag: 20090517-FFI~11036
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e900485ab6b3c09515766e9e49c2e6261a2a19ee;p=mit-scheme.git

`indent-relative' changed to take no interactive arguments, since it
is always called that way when used as value of
`indent-line-procedure'.
---

diff --git a/v7/src/edwin/lincom.scm b/v7/src/edwin/lincom.scm
index 60c76b8dc..62363d334 100644
--- a/v7/src/edwin/lincom.scm
+++ b/v7/src/edwin/lincom.scm
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;	$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/lincom.scm,v 1.104 1989/08/08 10:06:12 cph Exp $
+;;;	$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/lincom.scm,v 1.105 1990/11/16 11:38:07 cph Rel $
 ;;;
 ;;;	Copyright (c) 1986, 1989 Massachusetts Institute of Technology
 ;;;
@@ -448,14 +448,16 @@ The variable tab-width controls the action."
     (not-implemented)))
 
 (define-command indent-relative
-  "Indents the current line directly below the previous non blank line."
-  "d"
-  (lambda (point)
-    (let ((indentation (indentation-of-previous-non-blank-line point)))
-      (cond ((not (= indentation (current-indentation point)))
-	     (change-indentation indentation point))
-	    ((line-start? (horizontal-space-start point))
-	     (set-current-point! (horizontal-space-end point)))))))
+  "Space out to under next indent point in previous nonblank line.
+An indent point is a non-whitespace character following whitespace."
+  ()
+  (lambda ()
+    (let ((point (current-point)))
+      (let ((indentation (indentation-of-previous-non-blank-line point)))
+	(cond ((not (= indentation (current-indentation point)))
+	       (change-indentation indentation point))
+	      ((line-start? (horizontal-space-start point))
+	       (set-current-point! (horizontal-space-end point))))))))
 
 (define (indentation-of-previous-non-blank-line mark)
   (let ((start (find-previous-non-blank-line mark)))