Search code examples
emacspython-mode

Emacs python-mode file mode specification error


I am using GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600) of 2013-03-17 on MARVIN on a Windows 7 Enterprise, SP1 machine.

I have tried to install python-modevia ELPA, but got the following message in the *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

Needless to say, M-x python-mode does not work on my .py file. In the messages buffer, I get the following:

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

Whereas if I find the file anew, that is reported in the minibuffer:

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

EDIT

Although the original source of error may remain unclear, instead of going through ELPA I just followed the link posted in the answer, unpacked the archive in a suitable directory, and followed the instruction to activate the package. python-mode works just fine.


Solution

  • AFAIK python.el is built-in. i.e. no need to install the elpa-version.

    Alternatively there is python-mode.el, providing a different python-mode, available from melpa or

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