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

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

bug#23609: 25.0.92; Python eldoc freeze


From: Jules Tamagnan
Subject: bug#23609: 25.0.92; Python eldoc freeze
Date: Fri, 27 May 2016 14:57:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 05/27/2016 09:39 PM, Jules Tamagnan wrote:
>
>> What do you mean by private?
>
> It's when a variable or a function has "--" in its name. This
> functions purely as a documentation that external code should not rely
> on it (or refer to it, really).
>
> E.g. python-eldoc--get-doc.

Oh yes, well here it is with the different naming convention:

diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 5aeefe4..2da72fd 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -4293,12 +4293,18 @@ python-eldoc--get-doc-at-point
         (unless (zerop (length docstring))
           docstring)))))
 
+(defvar-local python-eldoc--get-doc t
+  "If eldoc should be used to get the documentation automatically")
+
 (defun python-eldoc-function ()
   "`eldoc-documentation-function' for Python.
 For this to work as best as possible you should call
 `python-shell-send-buffer' from time to time so context in
 inferior Python process is updated properly."
-  (python-eldoc--get-doc-at-point))
+  (when python-eldoc--get-doc
+    (with-timeout (1
+                   (setq python-eldoc--get-doc nil))
+      (python-eldoc--get-doc-at-point))))
 
 (defun python-eldoc-at-point (symbol)
   "Get help on SYMBOL using `help'.





reply via email to

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