Like suggested in this question How to automatically run inferior process when loading major mode for the first time? I want to automatically run run-python
when entering python major mode. However,
(add-hook 'python-mode-hook 'run-python)
doesn't work and gives the error
Wrong number of arguments: (1 . 3), 0
Which argument is needed by run-python
? How to automatically start an inferior python interpreter when entering python-mode
?
Edit: After M-x
toggle-debug-on-error
the output gives
Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 3) 0)
run-python()
run-hooks(change-major-mode-after-body-hook prog-mode-hook python-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook python-mode-hook))
run-mode-hooks(python-mode-hook)
python-mode()
call-interactively(python-mode record nil)
command-execute(python-mode record)
execute-extended-command(nil "python-mode")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)