1

I'm using python-mode.el, and when I try to indent comments, it always wants to put them all the way to the left. I want them indented in line with the rest of the code. Is there an easy way to achieve this?

Brian Postow
  • 11,709
  • 17
  • 81
  • 125

2 Answers2

1

Recent python-mode.el comes with a customizable variable py-indent-comments When t, comment lines are indented.

get it from http://launchpad.net/python-mode

Andreas Röhler
  • 4,804
  • 14
  • 18
0

Also running python-mode.el and when I tab a comment it cycles through the indentation levels. What version of emacs are you using?

edit getting the behavior you describe if there is a non-space immediately following the #. I always put a space after, but it sounds like a bug to me. I'd ask on the python-mode.el list.

Matt Harrison
  • 1,225
  • 11
  • 12