python-mode 6.0.12 返回或传递后缩进

标签 python emacs mode

我在 emacs 中使用 python 模式。 我已经使用1个月了,没有任何问题。

现在我有一个问题,每当我在类中“返回”或“传递”函数时,缩进都会返回到下一行的开头

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 包含: lambda-mode.el python-mode.el-6.0.12 自动保存列表

最佳答案

无法用 trunk 重现。 如果可以的话,请检查一下。

bzr 分支 lp:python-mode

github 上也有一个镜像。

错误最好提交至

https://bugs.launchpad.net/python-mode

关于python-mode 6.0.12 返回或传递后缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13616691/

相关文章:

python - 如何在 jenkins 控制台输出中获取 python 打印结果

emacs - Clojure功能是否适用于Emacs?

emacs - Emacs 中 sexp 和 list 的区别?

java - HashMap 方法将其用作最常见的值

R 循环用于用行模式替换 NA

matlab - 元胞数组中最常见的字符串,不考虑字母顺序

python - 根据条件重置累计计数

python - 安装 Flask-socketio 时遇到问题

python - 无限循环服务GPIO的效率

以 Shell 模式启动并运行命令的 Emacs 宏