From: dsheets@MIT.EDU
To: bug-gnu-emacs@gnu.org
Subject: bug#1987: emacs22 python mode doesn't indent all valid "finally" blocks
Date: Thu, 22 Jan 2009 01:55:12 -0500 (EST) [thread overview]
Message-ID: <200901220655.n0M6tCRb025603@outgoing-legacy.mit.edu> (raw)
"finally" block indentation does not work correctly for "try" constructs with more than one clause. To wit:
if True:
try:
print "try"
except:
print "except"
else:
print "else"
finally:
print "finally"
The mode states simply that this indentation of "finally" is the "sole indentation". If I find the Right Thing to do, I will report back, of course.
Thanks,
David Sheets <dsheets@mit.edu>
In GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2008-05-02 on king, modified by Ubuntu
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.1/leim' '--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: Python
Minor modes in effect:
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <tab> <down> <tab> <down> <up> <up> <down-mouse-1>
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<menu-bar> <help-menu> <emacs-problems> <next> <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> <next> <next> <next> <next> <next> <next> <next>
<next> <next> <next> <next> <next> <next> <next> C-s
p y t h o n C-g C-s C-s p y t h o n C-s C-s C-s C-s
C-s C-s <down-mouse-1> <mouse-1> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<menu-bar> <help-menu> <about> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <help-echo> <help-echo> <help-echo> <help-echo>
<menu-bar> <buffer> "decorators.py" <down-mouse-1>
<mouse-1> C-x C-s <right> <tab> <down> <tab> <up> <tab>
<up> <end> <return> <tab> e l s e : <return> <tab>
p a s s <down> <tab> <down> <tab> <up> <up> <tab> <up>
<tab> <down> <end> <return> <return> <tab> t r y :
<tab> <return> <tab> p a s s <down> <tab> <down> <tab>
<up> <tab> <up> <tab> <up> <tab> <up> <down> <down>
<end> <return> <tab> e l s e : <return> <tab> p a s
s <tab> <up> <tab> <up> <tab> <up> <tab> <down> <tab>
<down> <tab> <down> <tab> <down> <tab> <down> <tab>
<help-echo> <down-mouse-1> <mouse-1> M-x r e p o r
t - e m a c s - b u g <return>
Recent messages:
Loading easy-mmode...done
Loading outline...done
View mode: type C-h for help, h for commands, q to quit.
Quit
Mark saved where search started
Wrote /home/dsheets/Desktop/Code/Hive/decorators.py
Auto-saving...done
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
next reply other threads:[~2009-01-22 6:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-22 6:55 dsheets [this message]
2010-08-23 1:01 ` bug#1987: emacs22 python mode doesn't indent all valid "finally" blocks Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200901220655.n0M6tCRb025603@outgoing-legacy.mit.edu \
--to=dsheets@mit.edu \
--cc=1987@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.