This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: python-mode loops on if/else
Type: Stage:
Components: None Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, gvanrossum, skip.montanaro
Priority: normal Keywords:

Created on 2003-02-12 18:58 by gvanrossum, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Messages (3)
msg14590 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2003-02-12 18:58
Here's how to reproduce.  Create a .py file in XEmacs
containing this text:

x = (if 1: 2
 ____else: 3)

(except that the ____ really means four spaces).

Now position your cursor somewhere inside those 4
spaces, and hit TAB. XEmacs freezes until you hit ^G.
msg14591 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2003-08-01 03:41
Logged In: YES 
user_id=44345

The code gets into an infloop in py-outdent-p.  The loop looks
odd to me:

  (while (or (looking-at py-blank-or-comment-re)
                (bobp))
     (backward-to-indentation 1))

If you were at (bobp), why would you want to try to move back
a line?
msg14592 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2003-08-05 03:12
Logged In: YES 
user_id=44345

migrating this bug report to the new python-mode project.
you can follow it here:

https://sourceforge.net/tracker/
index.php?func=detail&aid=783240&group_id=86916&ati
d=581349
History
Date User Action Args
2022-04-10 16:06:46adminsetgithub: 37975
2003-02-12 18:58:26gvanrossumcreate