fixed bug in tabber so that tabifying a line that is already in the right place no longer modifies the buffer

svn: r7023
This commit is contained in:
Robby Findler 2007-08-05 08:31:49 +00:00
parent 9df6fb2730
commit 255e6181d6

View File

@ -517,11 +517,10 @@
(λ (amt)
(let* ([pos-start end]
[curr-offset (find-offset pos-start)])
(unless (= amt (car curr-offset))
(unless (= amt (- (cdr curr-offset) pos-start))
(delete pos-start (cdr curr-offset))
(insert
(make-string amt #\space)
pos-start))))]
(insert (make-string amt #\space)
pos-start))))]
[get-proc
(λ ()
(let ([id-end (get-forward-sexp contains)])
@ -540,9 +539,7 @@
(let* ([proc-name (get-proc)])
(or (eq? proc-name 'define)
(eq? proc-name 'lambda))))]
[indent-first-arg
(λ (start)
(car (find-offset start)))])
[indent-first-arg (λ (start) (car (find-offset start)))])
(when (and okay
(not (char=? (get-character (sub1 end))
#\newline)))