From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: seberino@spawar.navy.mil (Christian Seberino) Newsgroups: gmane.emacs.help Subject: Re: How make comment-region NOT ignore blank lines but comment out those too? Date: 28 Aug 2003 00:37:35 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1062057861 6097 80.91.224.253 (28 Aug 2003 08:04:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2003 08:04:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 28 10:04:19 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19sHlT-000387-00 for ; Thu, 28 Aug 2003 10:04:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sHev-0001g0-Pd for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Aug 2003 03:57:33 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: 64.169.241.206 Original-X-Trace: posting.google.com 1062056257 2402 127.0.0.1 (28 Aug 2003 07:37:37 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 28 Aug 2003 07:37:37 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:116202 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12121 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12121 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 wrote in message news:... > 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.