[ESS] SAS Indentation

Rodney Sparapani rsparapa at mcw.edu
Wed Oct 26 23:39:28 CEST 2005


Cameron Hooper wrote:

>Some of the ESS indentation rules for SAS are not, in my opinion, 
>ideal. I realise this is very much a question of personal taste, but I 
>would like to raise the issue for discussion anyway. If this has been 
>discussed to death earlier, please accept my apologies in advance. Here 
>are a series of examples. In each case I believe my preferred 
>indentation is closer to that used in the SAS documentation and in many 
>books produced by the SAS institute.
>
>
>  
>
Cameron:

auto-indentation is an emacs feature that I haven't seen many ESS[SAS] 
want or
need.  There are two reasons.  1) it doesn't seem to work that well and 
2) there is
no accepted standard style to enforce (most people have their own and 
don't want
to fight something else with which is really annoying).  So, the 
following two ESS[SAS]
settings turn it off:

(setq sas-indent-width 4)
(setq ess-sas-edit-keys-toggle t)

This may require some emacs settings as well like:
(global-set-key [tab] 'tab-to-tab-stop)
(global-set-key [return] 'newline)

Rodney




More information about the ESS-help mailing list