aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2020-07-08 20:20:14 +0100
committerJoão Távora2020-07-08 20:20:19 +0100
commit6063b542f765e55f4e93a64e40f202fe4af7cce1 (patch)
treec76ff2d34afaf099152d98891b158220c8be8d74
parenta85026c3afc8c2594ee475bd3bb5d46079d2771f (diff)
downloademacs-6063b542f765e55f4e93a64e40f202fe4af7cce1.tar.gz
emacs-6063b542f765e55f4e93a64e40f202fe4af7cce1.zip
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.
-rw-r--r--lisp/progmodes/cfengine.el11
-rw-r--r--lisp/progmodes/python.el18
2 files changed, 12 insertions, 17 deletions
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index acf70a5ad90..a8fe485b702 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -1390,15 +1390,8 @@ to the action header."
1390 (when buffer-file-name 1390 (when buffer-file-name
1391 (shell-quote-argument buffer-file-name))))) 1391 (shell-quote-argument buffer-file-name)))))
1392 1392
1393 (if (boundp 'eldoc-documentation-functions) 1393 (add-hook 'eldoc-documentation-functions
1394 (add-hook 'eldoc-documentation-functions 1394 #'cfengine3-documentation-function nil t)
1395 #'cfengine3-documentation-function nil t)
1396 ;; For emacs < 25.1 where `eldoc-documentation-function' defaults
1397 ;; to nil.
1398 (or eldoc-documentation-function
1399 (setq-local eldoc-documentation-function #'ignore))
1400 (add-function :before-until (local 'eldoc-documentation-function)
1401 #'cfengine3-documentation-function))
1402 1395
1403 (add-hook 'completion-at-point-functions 1396 (add-hook 'completion-at-point-functions
1404 #'cfengine3-completion-function nil t) 1397 #'cfengine3-completion-function nil t)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 36b62bfe96e..165463aef59 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -5553,14 +5553,16 @@ REPORT-FN is Flymake's callback function."
5553 (current-column)))) 5553 (current-column))))
5554 (^ '(- (1+ (current-indentation)))))) 5554 (^ '(- (1+ (current-indentation))))))
5555 5555
5556 (if (null eldoc-documentation-function) 5556 (with-no-warnings
5557 ;; Emacs<25 5557 ;; supress warnings about eldoc-documentation-function being obsolete
5558 (set (make-local-variable 'eldoc-documentation-function) 5558 (if (null eldoc-documentation-function)
5559 #'python-eldoc-function) 5559 ;; Emacs<25
5560 (if (boundp 'eldoc-documentation-functions) 5560 (set (make-local-variable 'eldoc-documentation-function)
5561 (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t) 5561 #'python-eldoc-function)
5562 (add-function :before-until (local 'eldoc-documentation-function) 5562 (if (boundp 'eldoc-documentation-functions)
5563 #'python-eldoc-function))) 5563 (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t)
5564 (add-function :before-until (local 'eldoc-documentation-function)
5565 #'python-eldoc-function))))
5564 5566
5565 (add-to-list 5567 (add-to-list
5566 'hs-special-modes-alist 5568 'hs-special-modes-alist