Reputation: 546
I use python-mode in emacs. I have been using for 1 month with no problems.
Now I have a problem, in that whenever I 'return' or 'pass' a function inside a class, the indent returns to the start of the next line
EG
class test(object):
def method1(self):
return 1
|cursor returns here, cant press tab to indent
|cursor should be here, tab should allow free indentation
If I dont return or 'pass', i have no problems. I don't know what has caused this.
my .emacs:
(add-to-list 'load-path "~/.emacs.d/")
(require 'lambda-mode)
(add-hook 'python-mode-hook #'lambda-mode 1)
(setq lambda-symbol (string (make-char 'greek-iso8859-7 107)))
(add-to-list 'load-path "~/.emacs.d/python-mode.el-6.0.12")
(setq py-install-directory "~/.emacs.d/python-mode.el-6.0.12")
(require 'python-mode)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
my .emacs.d contains: lambda-mode.el python-mode.el-6.0.12 auto-save-list
Upvotes: 0
Views: 357
Reputation: 4804
Can't reproduce with trunk. If possible, please check it out.
bzr branch lp:python-mode
Exists a mirror at github too.
Bugs are filed preferably at
https://bugs.launchpad.net/python-mode
Upvotes: 1
Reputation: 28531
In the default python-mode
that comes from Emacs (i.e. python.el
as opposed to python-mode.el
), I cannot reproduce your problem. So maybe you're using python-mode.el
and could simply switch to the builtin python-mode
instead.
Upvotes: 1