From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lawrence mitchell Newsgroups: gmane.emacs.help Subject: Re: How add "#" to blank lines when using py-comment-region??? Date: Tue, 12 Aug 2003 21:30:01 +0100 Organization: funfunfun Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1060720806 12449 80.91.224.253 (12 Aug 2003 20:40:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2003 20:40:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 12 22:40:04 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 19mfw4-0001zf-00 for ; Tue, 12 Aug 2003 22:40:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mfn7-0000Lg-Va for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Aug 2003 16:30:49 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!vegetable.demon.co.UK!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: vegetable.demon.co.uk (80.177.16.3) Original-X-Trace: news.uni-berlin.de 1060720201 34173936 80.177.16.3 (16 [97657]) X-No-Yes: No Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 Cancel-Lock: sha1:82YMCPbqCxDK2XEdBr8pvWiUFow= Original-Xref: shelby.stanford.edu gnu.emacs.help:115850 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:11768 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11768 Christian Seberino wrote: > py-comment-region lets me > add "#" at beginning of non-blank lines that I have > highlighted with mouse. > It does not add "#" for the blank lines. > How can I modify behavior of py-comment-region to do this? py-comment-region is just a minor wrapper around comment-region, so the variable you want to look at is comment-empty-lines. If you only want to comment blank lines in python mode, you'll have to make comment-empty-lines buffer local and set it in a hook. -- lawrence mitchell