emacs-diffs
[Top][All Lists]
Advanced

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

master 6063b54 1/2: Shoosh warnings about obsolete eldoc-documentation-f


From: João Távora
Subject: master 6063b54 1/2: Shoosh warnings about obsolete eldoc-documentation-function
Date: Wed, 8 Jul 2020 15:24:37 -0400 (EDT)

branch: master
commit 6063b542f765e55f4e93a64e40f202fe4af7cce1
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Shoosh warnings about obsolete eldoc-documentation-function
    
    * lisp/progmodes/cfengine.el (cfengine3-mode): Remove mention to
    obsolete eldoc-documentation-function.
    
    * lisp/progmodes/python.el (python-mode): Use with-no-warnings.
---
 lisp/progmodes/cfengine.el | 11 ++---------
 lisp/progmodes/python.el   | 18 ++++++++++--------
 2 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index acf70a5..a8fe485 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -1390,15 +1390,8 @@ to the action header."
                  (when buffer-file-name
                    (shell-quote-argument buffer-file-name)))))
 
-  (if (boundp 'eldoc-documentation-functions)
-      (add-hook 'eldoc-documentation-functions
-                #'cfengine3-documentation-function nil t)
-    ;; For emacs < 25.1 where `eldoc-documentation-function' defaults
-    ;; to nil.
-    (or eldoc-documentation-function
-        (setq-local eldoc-documentation-function #'ignore))
-    (add-function :before-until (local 'eldoc-documentation-function)
-                  #'cfengine3-documentation-function))
+  (add-hook 'eldoc-documentation-functions
+            #'cfengine3-documentation-function nil t)
 
   (add-hook 'completion-at-point-functions
             #'cfengine3-completion-function nil t)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 36b62bf..165463a 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -5553,14 +5553,16 @@ REPORT-FN is Flymake's callback function."
                                                  (current-column))))
          (^ '(- (1+ (current-indentation))))))
 
-  (if (null eldoc-documentation-function)
-      ;; Emacs<25
-      (set (make-local-variable 'eldoc-documentation-function)
-           #'python-eldoc-function)
-    (if (boundp 'eldoc-documentation-functions)
-        (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t)
-      (add-function :before-until (local 'eldoc-documentation-function)
-                    #'python-eldoc-function)))
+  (with-no-warnings
+    ;; supress warnings about eldoc-documentation-function being obsolete
+   (if (null eldoc-documentation-function)
+       ;; Emacs<25
+       (set (make-local-variable 'eldoc-documentation-function)
+            #'python-eldoc-function)
+     (if (boundp 'eldoc-documentation-functions)
+         (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil 
t)
+       (add-function :before-until (local 'eldoc-documentation-function)
+                     #'python-eldoc-function))))
 
   (add-to-list
    'hs-special-modes-alist



reply via email to

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