From 98bdf65866c7aa96fa7a82ee32e112ccd022b02c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 4 Aug 2000 17:37:06 +0000 Subject: [PATCH] . original commit: 6fe240dac9047c34b3d5295fd4bf0192e90102b6 --- collects/framework/scheme.ss | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/collects/framework/scheme.ss b/collects/framework/scheme.ss index 45eb216b..100e1427 100644 --- a/collects/framework/scheme.ss +++ b/collects/framework/scheme.ss @@ -113,10 +113,28 @@ (let ([line (position-line position)]) (ormap (lambda (comment-start) - (let ([f (find-string comment-start 'backward position)]) + (let loop ([f (find-string comment-start 'backward position)]) (if f - (= (position-line f) line) - #f))) + (cond + [(= (position-line f) line) + (let ([f-1 (- f 1)]) + (cond + [(= f 0) + (prinf "1~n") + #t] + [(and (= (position-line f-1) line) + (not (char=? (get-character f-1) #\\ ))) + (prinf "2~n") + #t] + [else + (prinf "3~n") + (loop (find-string comment-start 'backward f-1))]))] + [else + (prinf "4~n") + #f]) + (begin + (printf "5~n") + #f)))) (scheme-paren:get-comments))))]) (private [remove-indents-callback