[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3991: 23.1; autoindent problem with new exception formatting in lisp
From: |
Chris Foote |
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 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090320) |
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.")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#3991: 23.1; autoindent problem with new exception formatting in lisp/progmodes/python.el,
Chris Foote <=