[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comment-dwim and uncommenting
From: |
Stefan Monnier |
Subject: |
Re: comment-dwim and uncommenting |
Date: |
Fri, 30 May 2003 15:50:10 -0400 |
> > > When I use comment-dwim to comment and uncomment a region, the
> > > uncomment leaves one space that I don't want.
> > > For example the file hello.cpp:
> > >
> > > Initial content
> > >
> > > void main() {
> > > int a=3;
> > > printf("hello world");
> > > a=a*2;
> > > }
> > >
> > > Called comment-dwim on the line printf...
> > >
> > >
> > > void main() {
> > > int a=3;
> > > // printf("hello world");
> > > a=a*2;
> > > }
> > >
> > > Called comment-dwim on the line // printf...
> > >
> > > void main() {
> > > int a=3;
> > > printf("hello world");
> > > a=a*2;
> > > }
> > >
> > > Now the printf... line has an extra space at the beginning.
> > > I would like to get the original (correctly indented) content.
> >
> > I can't reproduce it with `emacs -q --no-site-file ~/tmp/foo.cc'.
> > Can you give us some more information ?
> >
> >
> > Stefan
>
> Hi Stefan,
> I tried it also with emacs -q --no-site-file and it worked for me.
>
> However I found out, that I have the following statement in my .emacs:
> (setq comment-padding 0)
>
> When use this, I get the behaviour I described above.
I still can't reproduce it with
emacs -q --no-site-file \
--eval '(setq comment-add 0)' \
--eval '(transient-mark-mode 1)' \
~/tmp/foo.cc
I tried it with Emacs-21.3 and Emacs-CVS.
Stefan