From: Oren BenKiki <orenbk@ri...>  20020107 09:32:29

I just chatted with Clark about it. We see four options: 1. No auto detection (always use 1). We both feel this is too restrictive. 2. Look ahead to the end of the line (unbound lookahead). If there's no nonspace, use 1 space indentation. Otherwise, autodetect. Note that lookahead can't be just counting spaces due to the existance of tab characters (Brian is right, white space is the work of the devil :). 3. Look ahead, but if no nonspace is found within 9 spaces, take the indentation to be 1. This works nicely with using a single digit for specifying indentation amount. Indentation will *always* be in the range 19. This means that: this: ^ __________Has 9 leading spaces and this: ^ ________Has none Which we think is too confusing. 4. Do not look ahead. If the first line is all spaces, they are all taken to be indentation. If there isn't enough spaces (like a completely empty line), the indentation is taken to be the minimum  1. case 1: ^ ____Starts with \n and 3 spaces. case 2: ^ ________ ________Is indented 10 spaces. case 3: ^ ______ ________Starts with a \n and 2 spaces. ____case 4: ^ __________ ______Is an error ____just like case 5: ^ ________This ______is an error. We feel this is the simplest and best solution. Personally I think that cases 14 are pathological enough that it doesn't matter much what we do  as the spaces are invisible it won't be very readable anyway. Better to keep the definition and implementation simple, then. Brian? Have fun, Oren BenKiki 