我在emacs中使用python模式。 我已經使用了1個月沒有問題。Python模式6.0.12退回或通過後縮進
現在我有一個問題,因爲每當我「迴歸」或「通行證」一類中的功能,縮進返回到下一行的開始
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
如果我不回或'通',我沒有問題。我不知道是什麼造成了這一點。
我的.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.
)
我.emacs.d包含: λ-mode.el中的python-mode.el-6.0.12自動保存列表
優選日提交。默認的python模式甚至不會自動縮進,所以當然這個問題不會發生。 – straykiwi
嗯......默認情況下當我嘗試它時會自動縮進(但我不使用Python,所以我很容易上當;-),所以也許你應該報告一個在你的情況下不起作用的錯誤(這隻有在你使用Emacs-24時纔有用,因爲早期版本有一個完全不同的python.el,它缺乏維護者)。 – Stefan
哦,我只使用emacs 23.3.1,我應該試試emacs-24嗎? – straykiwi