diff options
| author | Mark Oteiza | 2020-02-25 17:53:04 -0500 |
|---|---|---|
| committer | Mark Oteiza | 2020-02-25 18:15:12 -0500 |
| commit | c0fcbd2c119b8418855f0931aceefbef717c5e53 (patch) | |
| tree | e082296f7c739d7e4420ddd7210a0f022174640b /doc | |
| parent | 03c07c88d90b5747456b9d286bace2dd4a713aac (diff) | |
| download | emacs-c0fcbd2c119b8418855f0931aceefbef717c5e53.tar.gz emacs-c0fcbd2c119b8418855f0931aceefbef717c5e53.zip | |
Expose ElDoc functions in a hook (Bug#28257)
* lisp/emacs-lisp/eldoc.el: Update commentary.
(eldoc--eval-expression-setup): Use new hook.
(eldoc--supported-p): Accomodate new hook.
(eldoc-documentation-functions): New hook.
(eldoc-documentation-default, eldoc-documentation-compose): New
functions.
(eldoc-documentation-function): Use 'eldoc-documentation-default' as new
default value. Update documentation and custom attributes.
(eldoc-print-current-symbol-info): Accomodate possible null value for
'eldoc-documentation-function'.
* etc/NEWS: Mention them.
* doc/emacs/programs.texi (Emacs Lisp Documentation Lookup): Mention
new hook and changes to 'eldoc-documentation-function'.
* lisp/hexl.el (hexl-mode, hexl-revert-buffer-function):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/progmodes/cfengine.el (cfengine3-mode):
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
* lisp/progmodes/octave.el (octave-mode):
* lisp/progmodes/python.el (python-mode): Use new hook.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/programs.texi | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 683374c6153..865a3a67d56 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi | |||
| @@ -1269,9 +1269,27 @@ information whenever there is a Lisp function or variable at point; | |||
| 1269 | for a function, it shows the argument list, and for a variable it | 1269 | for a function, it shows the argument list, and for a variable it |
| 1270 | shows the first line of the variable's documentation string. To | 1270 | shows the first line of the variable's documentation string. To |
| 1271 | toggle Eldoc mode, type @kbd{M-x eldoc-mode}. There's also a Global | 1271 | toggle Eldoc mode, type @kbd{M-x eldoc-mode}. There's also a Global |
| 1272 | Eldoc mode, which is turned on by default, and affects buffers, such | 1272 | Eldoc mode, which is turned on by default, and affects buffers whose |
| 1273 | as @samp{*scratch*}, whose major mode is Emacs Lisp or Lisp | 1273 | major mode sets the variables described below. Use @w{@kbd{M-x |
| 1274 | Interaction (@w{@kbd{M-x global-eldoc-mode}} to turn it off globally). | 1274 | global-eldoc-mode}} to turn it off globally. |
| 1275 | |||
| 1276 | @vindex eldoc-documentation-function | ||
| 1277 | @vindex eldoc-documentation-functions | ||
| 1278 | These variables can be used to configure ElDoc mode: | ||
| 1279 | |||
| 1280 | @table @code | ||
| 1281 | @item eldoc-documentation-function | ||
| 1282 | This variable holds the function which is used to retrieve | ||
| 1283 | documentation for the item at point from the functions in the hook | ||
| 1284 | @code{eldoc-documentation-functions}. By default, | ||
| 1285 | @code{eldoc-documentation-function} returns the first documentation | ||
| 1286 | string produced by the @code{eldoc-documentation-functions} hook. | ||
| 1287 | |||
| 1288 | @item eldoc-documentation-functions | ||
| 1289 | This abnormal hook holds documentation functions. It acts as a | ||
| 1290 | collection of backends for ElDoc. This is what modes should use to | ||
| 1291 | register their documentation functions with ElDoc. | ||
| 1292 | @end table | ||
| 1275 | 1293 | ||
| 1276 | @node Hideshow | 1294 | @node Hideshow |
| 1277 | @section Hideshow minor mode | 1295 | @section Hideshow minor mode |