From: seberino@spawar.navy.mil (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 [thread overview]
Message-ID: <bf23f78f.0308272337.7a81651c@posting.google.com> (raw)
In-Reply-To: m3n0dud0ia.fsf@defun.localdomain
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 <harder@myrealbox.com> wrote in message news:<m3n0dud0ia.fsf@defun.localdomain>...
> seberino@spawar.navy.mil (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.
next prev parent reply other threads:[~2003-08-28 7:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-14 17:12 How make comment-region NOT ignore blank lines but comment out those too? Christian Seberino
2003-08-14 22:06 ` Jesper Harder
2003-08-15 20:39 ` Christian Seberino
2003-08-15 23:36 ` Jesper Harder
2003-08-26 0:04 ` Christian Seberino
2003-08-26 0:37 ` Christian Seberino
2003-08-26 14:04 ` Jesper Harder
2003-08-27 21:57 ` Christian Seberino
2003-08-28 1:38 ` Jesper Harder
2003-08-28 7:37 ` Christian Seberino [this message]
2003-08-28 16:49 ` Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf23f78f.0308272337.7a81651c@posting.google.com \
--to=seberino@spawar.navy.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.