Emacs python-mode 文件模式规范错误

Emacs python-mode file mode specification error

我在 Windows 7 Enterprise, SP1 机器上使用 GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600) of 2013-03-17 on MARVIN

我已尝试通过 ELPA 安装 python-mode,但在 *Compile-log* 中收到以下消息:

Leaving directory c:/Users/my_user/AppData/Roaming/.emacs.d/elpa/python-0.25.1

Compiling file c:/Users/my_user/AppData/Roaming/.emacs.d/elpa/python-0.25.1/python-pkg.el at Wed Dec  9 08:15:52 2015

Entering directory c:/Users/my_user/AppData/Roaming/.emacs.d/elpa/python-0.25.1

Compiling file c:/Users/my_user/AppData/Roaming/.emacs.d/elpa/python-0.25.1/python.el at Wed Dec  9 08:15:52 2015

python.el:2779:1:Warning: Unused lexical variable `inferior-python-mode-hook'

python.el:4033:1:Error: Symbol's function definition is void: format-message

Compiling no file at Wed Dec  9 08:15:54 2015

不用说,M-x python-mode 对我的 .py 文件不起作用。在 messages 缓冲区中,我得到以下内容:

Eager macro-expansion failure: (void-function format-message)
let*: Symbol's function definition is void: format-message

而如果我重新找到该文件,则会在 minibuffer:

中报告
File mode specification error: (void-function format-message)

编辑

虽然错误的原始来源可能仍然不清楚,但我没有通过 ELPA 只是按照答案中发布的 link 进行操作,将存档解压缩到合适的目录中,然后按照说明进行操作激活包。 python-mode 工作正常。

AFAIK python.el 是内置的。即无需安装 elpa 版本。

或者 python-mode.el,提供不同的 python-模式,可从 melpa 或

https://gitlab.com/groups/python-mode-devs