[ESS] M-; makes double hash in R files
A.J. Rossini
blindglobe at gmail.com
Fri Apr 8 12:04:38 CEST 2005
On Apr 8, 2005 11:11 AM, Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk> wrote:
> > When I open an R file with ess, typing M-; on a line which has
> > something on it puts a ## comment mark like this:
> >
> > a <- 1 ##
> >
> > If I delete one of the hash marks and type M-; again, the comment is
> > correctly positioned, eg
> >
> > a <- 1 #
> >
> > What can I do to get the single hash mark (correctly positioned) by
> > simply typing M-;? I am using Ess 5.2.6-1 in Emacs 21.4a-1 (both
> > debian testing).
>
> This is a good point. ESS tries to follow elisp for indentation of
> comments if ess-fancy-comments is non-nil, so presumably it would be
> good to follow the elisp mode for adding comments as in elisp code
> (which is bascially above). [If you type M-; at the start of a line
> in foo.el, you get two semicolons at the start of the line, indented
> appropriately, which I think is nice.
>
> ESS core: I think the approach would be to set comment-char to "#"
> rather than "##" and then set `comment-add' to 1, rather than default
> of 0 (as is for elisp mode). There may be other changes needed, but I
> can take a look if this is the desired approach.
I think we just introduced this "fix" recently, without thinking of
Tamas's use case. The point is that we need to consider the context
better. (it was just "#" until recently).
--
best,
-tony
"Commit early,commit often, and commit in a repository from which we can easily
roll-back your mistakes" (AJR, 4Jan05).
A.J. Rossini
blindglobe at gmail.com
More information about the ESS-help
mailing list