* bug#3991: 23.1; autoindent problem with new exception formatting in lisp/progmodes/python.el
@ 2009-07-31 7:22 Chris Foote
2010-08-23 0:45 ` Chong Yidong
0 siblings, 1 reply; 2+ messages in thread
From: Chris Foote @ 2009-07-31 7:22 UTC (permalink / raw)
To: bug-gnu-emacs
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.")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-23 0:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-31 7:22 bug#3991: 23.1; autoindent problem with new exception formatting in lisp/progmodes/python.el Chris Foote
2010-08-23 0:45 ` Chong Yidong
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).