From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Foote Newsgroups: gmane.emacs.bugs Subject: bug#3991: 23.1; autoindent problem with new exception formatting in lisp/progmodes/python.el Date: Fri, 31 Jul 2009 16:52:32 +0930 Message-ID: <4A729BB8.9070702@foote.com.au> Reply-To: Chris Foote , 3991@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249050048 26707 80.91.229.12 (31 Jul 2009 14:20:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2009 14:20:48 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 31 16:20:41 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWsyJ-0000Sg-RQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 16:20:36 +0200 Original-Received: from localhost ([127.0.0.1]:44918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWsyJ-0006l7-81 for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 10:20:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWmVy-0007tp-2q for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:26:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWmVs-0007tJ-6m for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:26:52 -0400 Original-Received: from [199.232.76.173] (port=51009 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWmVr-0007tG-RB for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:26:47 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:29952) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWmVr-0004Mv-Ab for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:26:47 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWmVq-0000kT-Fn for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:26:46 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V7QiuI001575; Fri, 31 Jul 2009 00:26:45 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6V7P6HJ001253; Fri, 31 Jul 2009 00:25:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Chris Foote Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 31 Jul 2009 07:25:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 3991 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12490249801122 (code B ref -1); Fri, 31 Jul 2009 07:25:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 31 Jul 2009 07:23:00 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V7MtDh001111 for ; Fri, 31 Jul 2009 00:22:57 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWmS6-0007RC-Vr for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:22:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWmS2-0007Qz-2R for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:22:54 -0400 Original-Received: from [199.232.76.173] (port=50965 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWmS2-0007Qw-0v for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:22:50 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:29508) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWmS1-0003tK-F6 for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:22:49 -0400 Original-Received: from ping.foote.com.au ([203.161.156.93]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWmRx-0000OP-2l for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 03:22:45 -0400 Original-Received: by ping.foote.com.au (Postfix, from userid 5001) id EBEFC5E04E; Fri, 31 Jul 2009 16:52:38 +0930 (CST) Original-Received: from sed.foote.com.au (202-6-145-31.static.adam.com.au [202.6.145.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: chris@foote.com.au) by ping.foote.com.au (Postfix) with ESMTPSA id 701265E01F for ; Fri, 31 Jul 2009 16:52:33 +0930 (CST) User-Agent: Thunderbird 2.0.0.21 (X11/20090320) X-Enigmail-Version: 0.96.0 OpenPGP: id=B3CC1B68 X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Fri, 31 Jul 2009 03:26:52 -0400 X-Mailman-Approved-At: Fri, 31 Jul 2009 10:19:44 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29760 Archived-At: Python2.5 introduced the available use of "finally" with "except" in the same "try" exception handling block. The standard GNU Emacs Python mode (python.el) won't perform an autoindent correctly when the code reaches the "finally" clause - e.g.: def myfunc(): try: foo() except Bar, e: pass else: foo() finally: this patch fixes the problem for me: --- python.el.orig 2009-06-21 14:08:04.000000000 +0930 +++ python.el.new 2009-07-31 16:27:27.000000000 +0930 @@ -748,7 +748,7 @@ '(("else" "if" "elif" "while" "for" "try" "except") ("elif" "if" "elif") ("except" "try" "except") - ("finally" "try" "except")) + ("finally" "else" "try" "except")) "Alist of keyword matches. The car of an element is a keyword introducing a statement which can close a block opened by a keyword in the cdr.")