From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfram Kraus Newsgroups: gmane.emacs.help Subject: Re: Python indent region Date: Mon, 10 Jul 2006 13:12:10 +0200 Message-ID: References: <1152528551.081898.38570@35g2000cwc.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1152531668 4165 80.91.229.2 (10 Jul 2006 11:41:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Jul 2006 11:41:08 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 10 13:41:07 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fzu8K-00023L-2X for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Jul 2006 13:41:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fzu8J-0007CJ-Jf for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Jul 2006 07:40:59 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!feeder.news-service.com!newsfeed.freenet.de!news.n-ix.net!noris.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: gate.hagen-partner.de Original-X-Trace: ork-un.noris.net 1152529930 29422 213.95.4.106 (10 Jul 2006 11:12:10 GMT) Original-X-Complaints-To: news@noris.net Original-NNTP-Posting-Date: Mon, 10 Jul 2006 11:12:10 +0000 (UTC) User-Agent: Thunderbird 1.5.0.4 (X11/20060527) In-Reply-To: <1152528551.081898.38570@35g2000cwc.googlegroups.com> Original-Xref: shelby.stanford.edu gnu.emacs.help:140259 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35884 Archived-At: On 10.07.2006 12:49, Shug Boabby wrote: > Hello all, > > As you may know, python recognises blocks of code by their indentation > level. Emacs handles this very well when writing code. However, Emacs > does not handle indenting/unindenting whole regions very well. > > I was wondering if somebody could please write me some lisp code that > would add 4 spaces (or the user defined indent character) to the > beginning of each line in a region, and a complementary function to > reduce each line in a region by one indentation level. These would > really help out when doing some code restructuring in Python. > > Thanks, > Shug > In Python-mode C-c < C-c > should do what you want HTH, Wolfram