+int
+getcol(Rasp *r, long p)
+{
+ int col;
+
+ for(col = 0; p > 0 && raspc(r, p-1)!='\n'; p--, col++)
+ ;
+ return col;
+}
+
+long
+del(Rasp *r, long o, long p)
+{
+ int i, col, n;
+
+ if(--p < o)
+ return o;
+ if(!spacesindent || raspc(r, p)!=' ')
+ return p;
+ col = getcol(r, p) + 1;
+ if((n = col % maxtab) == 0)
+ n = maxtab;
+ for(i = 0; p-1>=o && raspc(r, p-1)==' ' && i<n-1; --p, i++)
+ ;
+ return p>=o? p : o;
+}
+