;;; -*-Scheme-*-
;;;
-;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/fill.scm,v 1.42 1989/04/15 00:49:34 cph Exp $
+;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/fill.scm,v 1.43 1989/04/23 23:21:39 cph Exp $
;;;
;;; Copyright (c) 1986, 1989 Massachusetts Institute of Technology
;;;
"The number of columns to indent each line." 0)
(define (center-line mark)
- (mark-permanent! mark)
- (delete-horizontal-space (line-start mark 0))
- (delete-horizontal-space (line-end mark 0))
- (let ((d (- (- (ref-variable fill-column) (ref-variable left-margin))
- (mark-column (line-end mark 0)))))
- (if (positive? d)
- (insert-horizontal-space (+ (ref-variable left-margin) (quotient d 2))
- (line-start mark 0)))))
+ (let ((mark (mark-permanent! mark)))
+ (delete-horizontal-space (line-start mark 0))
+ (delete-horizontal-space (line-end mark 0))
+ (let ((d (- (- (ref-variable fill-column) (ref-variable left-margin))
+ (mark-column (line-end mark 0)))))
+ (if (positive? d)
+ (insert-horizontal-space (+ (ref-variable left-margin)
+ (quotient d 2))
+ (line-start mark 0))))))
(define-command center-line
"Center the line point is on, within the width specified by `fill-column'.
;;; -*-Scheme-*-
;;;
-;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/reccom.scm,v 1.11 1989/04/15 00:52:11 cph Exp $
+;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/reccom.scm,v 1.12 1989/04/23 23:25:44 cph Exp $
;;;
;;; Copyright (c) 1986, 1989 Massachusetts Institute of Technology
;;;
(lambda ()
(delete-rectangle (current-mark) (current-point) true)))
-(define (make-space-to-column column mark) ;new make-space-to-column
- (mark-permanent! mark)
- (change-column column mark)
- (line-end mark 0))
+(define (make-space-to-column column mark)
+ (let ((mark (mark-permanent! mark)))
+ (change-column column mark)
+ (line-end mark 0)))
(define (yank-rectangle rectangle point)
(let ((goal (mark-column point)))
;;; -*-Scheme-*-
;;;
-;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/things.scm,v 1.76 1989/04/15 00:53:32 cph Exp $
+;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/things.scm,v 1.77 1989/04/23 23:26:47 cph Exp $
;;;
;;; Copyright (c) 1985, 1989 Massachusetts Institute of Technology
;;;
(change-column column point))))
(define (change-column column point)
- (mark-permanent! point)
- (delete-horizontal-space point)
- (insert-horizontal-space column point))
+ (let ((point (mark-permanent! point)))
+ (delete-horizontal-space point)
+ (insert-horizontal-space column point)))
;;;; Lines