emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python-mode's eldoc-mode support does not work correctly


From: Marien Zwart
Subject: python-mode's eldoc-mode support does not work correctly
Date: Wed, 11 Jan 2006 18:26:46 +0100

Hi,

Using GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.8.9) of
2006-01-11, the following (with testfile.py a file that does not exist
yet):

emacs -nw -q
C-x C-f ~/testfile.py
M-x eldoc-mode

gives in the messages buffer:

python-args-to-list: Wrong type argument: stringp, 0

and eldoc-mode does not work: typing "os.remove" in the testfile.py
buffer does not show the function signature in the minibuffer.

This seems to be because progmodes/python.el does:

  (add-hook 'eldoc-mode-hook
            '(lambda () (run-python 0 t)) nil t) ; need it running

while run-python's signature is:

(defun run-python (&optional cmd noshow)
  "Run an inferior Python process, input and output via buffer *Python*.
CMD is the Python command to run.  NOSHOW non-nil means don't show the
buffer automatically.
..."

So the first argument to run-python should be a string or nil to use
the default, not the integer 0. Patch that changes this 0 to nil
attached. With this patch applied the minibuffer should say
"remove(path)" after typing "os.remove" in a python buffer with
eldoc-mode enabled.

-- 
Marien.

Attachment: python.el.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]