all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dale Sedivec <dale@codefu.org>
To: 42513@debbugs.gnu.org
Subject: bug#42513: Possible fix for Python indentation problem
Date: Tue, 15 Sep 2020 18:25:29 -0500	[thread overview]
Message-ID: <B178FF95-8EE5-4570-8791-3A686595302D@codefu.org> (raw)
In-Reply-To: <20200724114012.7bb27a6d@parabola>

FYI I'm testing this fix against master:

diff --git a/python.el b/python.el
index b36a583..24f5f87 100644
--- a/python.el
+++ b/python.el
@@ -4991,6 +4991,7 @@ likely an invalid python file."
                            ;; block and the current line, otherwise it
                            ;; is not an opening block.
                            (save-excursion
+                             (python-nav-end-of-statement)
                              (forward-line)
                              (let ((no-back-indent t))
                                (save-match-data

(https://github.com/dsedivec/python/commit/7d2a97ca995c4a6673fa68861e42c54c9e8f6596.diff if my MUA mangles that.)

All this does is move to the end of the block opener (e.g. the "if" statement) before moving to the next line, where it expects to be within the "if"s block.

Dale




  reply	other threads:[~2020-09-15 23:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24  9:40 bug#42513: Python indentation bug when using multi-line on an if-condition swedebugia
2020-09-15 23:25 ` Dale Sedivec [this message]
2021-01-27  6:47 ` Lars Ingebrigtsen
2021-01-27 18:20   ` Dale Sedivec
2021-01-28  4:55     ` Lars Ingebrigtsen

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=B178FF95-8EE5-4570-8791-3A686595302D@codefu.org \
    --to=dale@codefu.org \
    --cc=42513@debbugs.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.