* lisp/progmodes/python.el: Preserve compatibility with Emacs-24
(python-mode): Don't assume eldoc-documentation-function has a non-nil default.
This commit is contained in:
parent
4188e3cc2b
commit
683d4b6e92
2 changed files with 12 additions and 2 deletions
|
@ -4684,8 +4684,12 @@ Arguments START and END narrow the buffer region to work on."
|
|||
(current-column))))
|
||||
(^ '(- (1+ (current-indentation))))))
|
||||
|
||||
(add-function :before-until (local 'eldoc-documentation-function)
|
||||
#'python-eldoc-function)
|
||||
(if (null eldoc-documentation-function)
|
||||
;; Emacs<25
|
||||
(setq (make-local-variable 'eldoc-documentation-function)
|
||||
#'python-eldoc-function)
|
||||
(add-function :before-until (local 'eldoc-documentation-function)
|
||||
#'python-eldoc-function))
|
||||
|
||||
(add-to-list 'hs-special-modes-alist
|
||||
`(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue