I recently installed python-mode (via package-list-packages). Since then, whenever I put my cursor by a function I've defined, it jumps to it, and if I put my cursor by a builtin function or operator (or some installed third party thing, like a module name), it opens python-help.

I would like to stop this happening. Any ideas on how to stop this, or even really what might be doing this if it's not python-mode would be very helpful.

  • Do you see the same thing with the builtin python-mode (which should generally give you pretty much the same featureset)?
    – Stefan
    Mar 21, 2017 at 12:09
  • @Stefan I do not
    – Marcin
    Mar 21, 2017 at 17:38

3 Answers 3


FWIW, Emacs comes with a python-mode by default, that comes from a file called python.el. There is also a package available on MELPA called python-mode, which will override the built-in python-mode.

When I installed the MELPA python-mode and tried to use it, various sorts of oddness happened -- it kind of looked like it was trying to execute the code as I was typing it, maybe? It was similar to what you describe.

I would try deleting the python-mode package you installed, restart Emacs, and open up a Python script and see if Emacs doesn't just do the right thing all by itself, without needing to install anything.


What worked for me was:

(add-hook 'python-mode-hook
          (lambda ()
            (kill-local-variable 'eldoc-documentation-function)))
  • 2
    Can you elaborate on your answer?
    – user12563
    Aug 15, 2019 at 19:29
  • While I am not sure why this works, this copy-pasting this answer into my .emacs file solved the problem :) Thanks!!!
    – Zuza
    Jun 27, 2021 at 10:08

Does this happen also when you start Emacs using emacs -Q (no init file), and you just load the python-mode package? If not, bisect your init file to find the problem. If yes, check the doc or code of that package for a way out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.