aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorStefan Monnier2015-02-04 21:47:22 -0500
committerStefan Monnier2015-02-04 21:47:22 -0500
commit683d4b6e92ae355510ffe106b5ec7c644abdcce7 (patch)
treefff16a4e8b6c509a9394149f0d502daa5f4d86e7 /lisp/progmodes/python.el
parent4188e3cc2bc69e75d4387b369e72e89fecc46a86 (diff)
downloademacs-683d4b6e92ae355510ffe106b5ec7c644abdcce7.tar.gz
emacs-683d4b6e92ae355510ffe106b5ec7c644abdcce7.zip
* lisp/progmodes/python.el: Preserve compatibility with Emacs-24
(python-mode): Don't assume eldoc-documentation-function has a non-nil default.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9bfafeb20cd..65515362b4e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -4684,8 +4684,12 @@ Arguments START and END narrow the buffer region to work on."
4684 (current-column)))) 4684 (current-column))))
4685 (^ '(- (1+ (current-indentation)))))) 4685 (^ '(- (1+ (current-indentation))))))
4686 4686
4687 (add-function :before-until (local 'eldoc-documentation-function) 4687 (if (null eldoc-documentation-function)
4688 #'python-eldoc-function) 4688 ;; Emacs<25
4689 (setq (make-local-variable 'eldoc-documentation-function)
4690 #'python-eldoc-function)
4691 (add-function :before-until (local 'eldoc-documentation-function)
4692 #'python-eldoc-function))
4689 4693
4690 (add-to-list 'hs-special-modes-alist 4694 (add-to-list 'hs-special-modes-alist
4691 `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#" 4695 `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"