From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Fabián E. Gallina" <fabian@anue.biz>
Cc: 15163@debbugs.gnu.org
Subject: bug#15163: 24.3; python-mode, electric colon bug
Date: Mon, 26 Aug 2013 23:00:10 -0400 [thread overview]
Message-ID: <jwv7gf76du2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <52163995.8060709@gmail.com> (Alexis Roda's message of "Thu, 22 Aug 2013 18:17:25 +0200")
> if a:
> if b:
> pass
> else:
> pass
> else:
> The last 'else' isn't indented properly.
Fabián, could you look into it?
When tracing through python-indent-electric-colon, I see that
python-info-closing-block-message returns nil, so we indent back to the
original indentation.
And while you're looking at this code, could you add a comment
explaining why you do
(python-info-closing-block-message)
(when (> indentation calculated-indentation)
(save-excursion
(indent-line-to calculated-indentation)
(when (not (python-info-closing-block-message))
(indent-line-to indentation)))))))
instead of (say)
(when (and (python-info-closing-block-message)
(> indentation calculated-indentation))
(save-excursion
(indent-line-to calculated-indentation)))
-- Stefan
next prev parent reply other threads:[~2013-08-27 3:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 16:17 bug#15163: 24.3; python-mode, electric colon bug Alexis Roda
2013-08-23 6:35 ` Andreas Röhler
2013-08-23 11:17 ` Alexis Roda
2013-08-27 3:00 ` Stefan Monnier [this message]
2014-07-09 3:58 ` Fabián Ezequiel Gallina
2014-07-09 4:01 ` Fabián Ezequiel Gallina
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=jwv7gf76du2.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=15163@debbugs.gnu.org \
--cc=fabian@anue.biz \
/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.