[plt-scheme] Tip on indenting requested

From: Paulo J. Matos (pocm at soton.ac.uk)
Date: Thu Jul 19 07:00:33 EDT 2007

Hello all,

Sometimes due to wierd bugs I'm getting I have to eye-review formulas,
which a small example is:
(and (=> (and (and (and (or (and (= char_encoded|s3 True) (= g108091
?)) (and (= char_encoded|s3 False) (= g108092 ?)))) (and (or (and (=
char_absorbed|s3 True) (= g108097 ?)) (and (= char_absorbed|s3 False)
(= g108098 ?)))))) (and (or (and (= current_char|s3 a) (=
decoded_char|s3 a)) (and (= current_char|s3 e) (= decoded_char|s3 e))
(and (= current_char|s3 i) (= decoded_char|s3 i)) (and (=
current_char|s3 o) (= decoded_char|s3 o)) (and (= current_char|s3 u)
(= decoded_char|s3 u))))))

This obviously is terrible, so I usually by hand indent it to (to be
read with fixed width font):
(and (=> (and (and (and (or (and (= char_encoded|s3 True) (= g108091 ?))
                            (and (= char_encoded|s3 False) (= g108092 ?))))
                   (and (or (and (= char_absorbed|s3 True) (= g108097 ?))
                            (and (= char_absorbed|s3 False) (= g108098 ?))))))
         (and (or (and (= current_char|s3 a) (= decoded_char|s3 a))
                  (and (= current_char|s3 e) (= decoded_char|s3 e))
                  (and (= current_char|s3 i) (= decoded_char|s3 i))
                  (and (= current_char|s3 o) (= decoded_char|s3 o))
                  (and (= current_char|s3 u) (= decoded_char|s3 u))))))

This is obviously much simpler but I don't know of any thing to do
this automatically or at least to ease my process. Any tips?

Cheers,

-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


Posted on the users mailing list.