[Python-mode] [ python-mode-Bugs-783240 ] python-mode loops on if/else

SourceForge.net noreply at sourceforge.net
Mon Aug 4 21:11:48 EDT 2003


Bugs item #783240, was opened at 2003-08-04 22:11
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=581349&aid=783240&group_id=86916

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Nobody/Anonymous (nobody)
Summary: python-mode loops on if/else

Initial Comment:
(migrating from python project)

Original submission:

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.

Followup comments:

Date: 2003-07-31 22:41
Sender: montanaro
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?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=581349&aid=783240&group_id=86916



More information about the Python-mode mailing list