[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: srfi-49@xxxxxxxxxxxxxxxxx*Subject*: Re: How many spaces a tab is worth*From*: Per Bothner <per@xxxxxxxxxxx>*Date*: Mon, 01 Dec 2003 11:11:14 -0800*Delivered-to*: srfi-49@xxxxxxxxxxxxxxxxx*In-reply-to*: <20031201185343.GB20607@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>*References*: <20031201124427.GD15593@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <yvjllpwl9eo.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx> <20031201185343.GB20607@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>*User-agent*: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031007

I suggest this model for comparing indentation of lines L1 and L2. TAB is only allowed at the beginning of a line. Assume line L1 starts with T1 tabs followed by S1 spaces, and line L2 starts with T2 tabs followed by S2 spaces. For the indentation of L1 and L2 to be comparable, either: (= T1 T2), in which case compare S1 and S2; or: (and (zero? S1) (zero? S2)), in which case compare T1 and T2. Other case are erroneous, since we cannot consistently compare them. Furthermore, in the case (= T1 T2), if either (= S1 (+ S2 1)) or (= (+ S1 1) S2) that case is also erroneous, since a difference of a single space is too likely to be a typo. -- --Per Bothner per@xxxxxxxxxxx http://per.bothner.com/

**Follow-Ups**:**Re: How many spaces a tab is worth***From:*RedHog (Egil Möller)

**References**:**How many spaces a tab is worth***From:*David Allouche

**Re: How many spaces a tab is worth***From:*David Allouche

- Prev by Date:
**Re: How many spaces a tab is worth** - Next by Date:
**Re: How many spaces a tab is worth** - Previous by thread:
**Re: How many spaces a tab is worth** - Next by thread:
**Re: How many spaces a tab is worth** - Index(es):