eldoc: modify eldoc-documentation-function' using add-function'

* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Describe how
major modes should use `add-function' to alter value of the variable.

* lisp/hexl.el (hexl-mode): Set `eldoc-documentation-function' using
`add-function' so the default value is always used.
* lisp/ielm.el (inferior-emacs-lisp-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/cfengine.el (cfengine3-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/elisp-mode (emacs-lisp-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/octave.el (octave-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/progmodes/python.el (python-mode): Set
`eldoc-documentation-function' using `add-function' so the default
value is always used.
* lisp/simple.el (read--expression): Set `eldoc-documentation-function'
using `add-function' so the default value is always used.
This commit is contained in:
Michal Nazarewicz 2014-12-05 19:34:42 +01:00
parent 81681ed9a1
commit fd020a2931
9 changed files with 44 additions and 14 deletions

View file

@ -4662,8 +4662,8 @@ Arguments START and END narrow the buffer region to work on."
(current-column))))
(^ '(- (1+ (current-indentation))))))
(set (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 "#"