help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How make comment-region NOT ignore blank lines but comment out those


From: Christian Seberino
Subject: Re: How make comment-region NOT ignore blank lines but comment out those too?
Date: 28 Aug 2003 00:37:35 -0700

Thanks.

Is it possible to do a search and replace automatically as a "hook" to
comment-region????

The file will have this problem as "\n#  \n".
I just have to replace that with "\n#\n".

I believe this is called a regular expression??

Can they be run every time we do a comment-region?

Chris


Jesper Harder <address@hidden> wrote in message news:<address@hidden>...
> address@hidden (Christian Seberino) writes:
> 
> > I noticed that the empty lines when they get commented have whitespace
> > after the comment character.....
> >
> > e.g. a blank line ---> "#  \n"
> > instead of                 "#\n"
> >
> > Is it too much to ask to try to make comment-region change blanks to
> > "#\n" instead of "# \n"????
> 
> I don't think that's currently possible (you could send a bug report
> and suggest it).
> 
> You can get rid of the padding after the comment character with (setq
> comment-padding nil), but that also removes it from non-empty lines.
> 
> There might be one small advantage with padding of empty lines -- if
> you later decide to write something on it, then the text will already
> be aligned.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]