Emacs python-mode.el comments start a new line

Bug #1092847 reported by Andreas Roehler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

http://stackoverflow.com/questions/13978147/emacs-python-mode-el-comments-start-a-new-line

I am using python-mode.el in Emacs to edit some Python code and it has the most annoying feature where it auto-indents a comment and then starts a new line. For example, if I have this:

def x():
    y = 1
<cursor is here, at root indentation level>

And then add in one # at the root indentation level:

def x():
    y = 1
    #
<cursor is now here>

It automatically indents, inserts the #, and inserts a carriage return after the #. It's driving me crazy. I want my comments to stay exactly where I put them! Any suggestions?

I've looked through the elisp code for the mode and can't find anything yet nor can I find anything elsewhere online. All I can find is that comments won't be used for future indentation (py-honor-comment-indentation) but nothing related to the comment itself. Nor the strange carriage return.

Changed in python-mode:
status: New → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.