aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-02-04 21:47:22 -0500
committerStefan Monnier2015-02-04 21:47:22 -0500
commit683d4b6e92ae355510ffe106b5ec7c644abdcce7 (patch)
treefff16a4e8b6c509a9394149f0d502daa5f4d86e7
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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/python.el8
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5f6a9c8bc0b..73f155243f5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12015-02-05 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * progmodes/python.el: Try to preserve compatibility with Emacs-24.
4 (python-mode): Don't assume eldoc-documentation-function has a non-nil
5 default.
6
12015-02-04 Sam Steingold <sds@gnu.org> 72015-02-04 Sam Steingold <sds@gnu.org>
2 8
3 * progmodes/python.el (python-indent-calculate-indentation): Avoid 9 * progmodes/python.el (python-indent-calculate-indentation): Avoid
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 "#"