fgallina / python.el

Python's flying circus support for Emacs
GNU General Public License v3.0
267 stars 53 forks source link

method ending with "return" statement produces wrong indent for subsequent method #142

Closed canoeberry closed 11 years ago

canoeberry commented 11 years ago

In the example below:

class foo(object): def unicode(self): return "test string"

    ####

I'd except the #### to be indented for a new 'def', a new method in my class.

Any thoughts?

asmeurer commented 11 years ago

The keywords return, break, continue, raise, and pass should all automatically dedent on the next line.

fgallina commented 11 years ago

Added break, continue and raise keywords in revno 111352.

http://bzr.savannah.gnu.org/lh/emacs/emacs-24/revision/111352

For now it's only available in the emacs-24 branch but it's should to be merged to the trunk soon.

BTW, notice the github repository is no longer updated. See the updated README for details on how to upgrade your python.el copy.

asmeurer commented 11 years ago

Do I have something configured wrong (this is my .emacs)? Typing any of those words does not deindent for me. I am on the most recent emacs-24 branch.

fgallina commented 11 years ago

ensure the version you installed is the one that's loaded.

asmeurer commented 11 years ago

Oh sorry. I forgot to stop using this git version.