[ESS] commenting region

Charles C. Berry cberry at tajo.ucsd.edu
Tue Aug 7 17:35:14 CEST 2007




M-; runs the command comment-dwim
   which is an interactive compiled Lisp function in `newcomment.el'.
It is bound to M-;.
(comment-dwim arg)

Call the comment command you want (Do What I Mean).
If the region is active and `transient-mark-mode' is on, call
   `comment-region' (unless it only consists of comments, in which
   case it calls `uncomment-region').
Else, if the current line is empty, insert a comment and indent it.
Else if a prefix arg is specified, call `comment-kill'.
Else, call `comment-indent'.
You can configure `comment-style' to change the way regions are commented.


Google 'ESS comment region' for more discussion.


On Tue, 7 Aug 2007, Stephen Bond wrote:

> Is there a way to comment out a whole region in ESS similar to the emacs
> capability in C and Fortran modes?
>
> Thank you all
>
> Stephen C. Bond
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901




More information about the ESS-help mailing list