[ESS-bugs] ESS[SAS]: bad indentation

Rodney Sparapani rsparapa at mcw.edu
Wed Oct 3 16:22:59 CEST 2012


By the way, if anyone cares...

So, let's say we adopt a "more standard" indentation of this code as...

proc datasets lib=work;
     modify a;
     rename x=y;
run;
     modify b;
     rename y=z;
run;
     modify c;
     rename z=x;
run;
quit;

The problem here is that the PROC:RUN block is seemingly complete
after the first RUN statement.  However, as we can see, that is
clearly not the case.  So, I guess we would need to recognize
consecutive/over-lapping PROC:RUN, RUN:RUN, ..., RUN:QUIT blocks.

This would not be so easy.  There are several functions to
consider in ess-sas-l.el (in order of germane-ness I think):
sas-indent-line
indent-sas-statement
sas-next-statement-indentation
(I'm not joking about the naming convention)

There is also sas-check-run-statements, but it is never used; it's
just for fun ;o)

-- 
Rodney Sparapani, PhD  Center for Patient Care and Outcomes Research
Sr. Biostatistician               http://www.mcw.edu/pcor
4 wheels good, 2 wheels better!   Medical College of Wisconsin (MCW)
WWLD?:  What Would Lombardi Do?   Milwaukee, WI, USA



More information about the ESS-bugs mailing list