diff options
author | João Távora <joaotavora@gmail.com> | 2020-07-08 20:20:14 +0100 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2020-07-08 20:20:19 +0100 |
commit | 6063b542f765e55f4e93a64e40f202fe4af7cce1 (patch) | |
tree | c76ff2d34afaf099152d98891b158220c8be8d74 /lisp/progmodes/python.el | |
parent | a85026c3afc8c2594ee475bd3bb5d46079d2771f (diff) | |
download | emacs-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.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r-- | lisp/progmodes/python.el | 18 |
1 files changed, 10 insertions, 8 deletions
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 |