]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/python.el
; Revert "Use eldoc-documentation-functions"
[gnu-emacs] / lisp / progmodes / python.el
index ba3cdfe17cd8557fb99c4a10f34c314dd77d58eb..ad69f8779e01a78072ab6898d88e4659d6b57876 100644 (file)
@@ -5153,14 +5153,12 @@ returned as is."
                                                  (current-column))))
          (^ '(- (1+ (current-indentation))))))
 
-  (if (boundp 'eldoc-documentation-functions)
-      (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t)
-    (if (null eldoc-documentation-function)
-        ;; Emacs<25
-        (set (make-local-variable 'eldoc-documentation-function)
-             #'python-eldoc-function)
-      (add-function :before-until (local 'eldoc-documentation-function)
-                    #'python-eldoc-function)))
+  (if (null eldoc-documentation-function)
+      ;; Emacs<25
+      (set (make-local-variable 'eldoc-documentation-function)
+           #'python-eldoc-function)
+    (add-function :before-until (local 'eldoc-documentation-function)
+                  #'python-eldoc-function))
 
   (add-to-list
    'hs-special-modes-alist