summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2020-07-08 20:20:14 +0100
committerJoão Távora <joaotavora@gmail.com>2020-07-08 20:20:19 +0100
commit6063b542f765e55f4e93a64e40f202fe4af7cce1 (patch)
treec76ff2d34afaf099152d98891b158220c8be8d74
parenta85026c3afc8c2594ee475bd3bb5d46079d2771f (diff)
downloademacs-6063b542f765e55f4e93a64e40f202fe4af7cce1.tar.gz
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."
(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 36b62bfe96e..165463aef59 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