Indentation in emacs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Indentation in emacs

Göran Broström
I'm using emacs-21.4 on debian unstable, together with the latest ESS
implementation. I try to change indentation to 4 by following the
advise in "R-exts": It results in the following lines in my .emacs
file:

 (custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 '(c-basic-offset 4)
 '(c-default-style "bsd")
 '(latin1-display t nil (latin1-disp)))
(custom-set-faces
  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
 )

But it doesn't work with R code  (with C code it works). So what is missing?
--
Göran Broström

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Indentation in emacs

Seth Falcon-2
On 12 Jan 2006, [hidden email] wrote:

> I'm using emacs-21.4 on debian unstable, together with the latest
> ESS implementation. I try to change indentation to 4 by following
> the advise in "R-exts": It results in the following lines in my
> .emacs file:
>
> (custom-set-variables
> ;; custom-set-variables was added by Custom -- don't edit or
> ;; cut/paste it!  Your init file should contain only one such
> ;; instance.
> '(c-basic-offset 4)
> '(c-default-style "bsd")
> '(latin1-display t nil (latin1-disp)))
> (custom-set-faces
> ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
> ;; Your init file should contain only one such instance.
> )
>
> But it doesn't work with R code (with C code it works). So what is
> missing?

Try:
(setq ess-indent-level 4)

You may also be interested in the ESS mail list (a better place for
such questions):
 [hidden email] mailing list
 https://stat.ethz.ch/mailman/listinfo/ess-help


+ seth

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Indentation in emacs

Göran Broström
On 1/12/06, Seth Falcon <[hidden email]> wrote:

> On 12 Jan 2006, [hidden email] wrote:
>
> > I'm using emacs-21.4 on debian unstable, together with the latest
> > ESS implementation. I try to change indentation to 4 by following
> > the advise in "R-exts": It results in the following lines in my
> > .emacs file:
> >
> > (custom-set-variables
> > ;; custom-set-variables was added by Custom -- don't edit or
> > ;; cut/paste it!  Your init file should contain only one such
> > ;; instance.
> > '(c-basic-offset 4)
> > '(c-default-style "bsd")
> > '(latin1-display t nil (latin1-disp)))
> > (custom-set-faces
> > ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
> > ;; Your init file should contain only one such instance.
> > )
> >
> > But it doesn't work with R code (with C code it works). So what is
> > missing?
>
> Try:
> (setq ess-indent-level 4)
>
> You may also be interested in the ESS mail list (a better place for
> such questions):
>  [hidden email] mailing list
>  https://stat.ethz.ch/mailman/listinfo/ess-help

Thanks a lot. I asked here because it is discussed  in "R-exts". Still
(R-2.2.1) in an incomplete and misleading way, though.

Göran
>
>
> + seth
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>


--
Göran Broström

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html