]> code.delx.au - gnu-emacs-elpa/blob - packages/eldoc-eval/README.md
Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode
[gnu-emacs-elpa] / packages / eldoc-eval / README.md
1 Enable eldoc support when minibuffer is in use.
2
3 # Commentary:
4
5 This package enables eldoc support when minibuffer is in use.
6
7 Eldoc info is shown by default in mode-line,
8 but you can have eldoc info somewhere else by setting
9 `eldoc-in-minibuffer-show-fn` to another function (e.g `tooltip-show`).
10
11 By default with this package `M-:` will use `pp-eval-expression`
12 instead of `eval-expression`; you can change that by setting
13 `eval-preferred-function` to something else.
14
15 It also provides a convenient macro to enable eldoc support
16 in your own functions using minibuffer or in your defadvices,
17 that is `with-eldoc-in-minibuffer`, e.g:
18
19 ```lisp
20 (defadvice edebug-eval-expression (around with-eldoc activate)
21 "This advice enable eldoc support."
22 (interactive (list (with-eldoc-in-minibuffer
23 (read-from-minibuffer
24 "Eval: " nil read-expression-map t
25 'read-expression-history))))
26 ad-do-it)
27 ```
28
29 Users of own minibuffer frame will have to set
30 `eldoc-in-minibuffer-own-frame-p` to non-nil.
31
32 You can turn On/Off eldoc support in minibuffer at any time
33 with `eldoc-in-minibuffer-mode`.
34
35 # Install:
36
37 Add to .emacs:
38
39 ```lisp
40 (autoload 'eldoc-in-minibuffer-mode "eldoc-eval")
41 (eldoc-in-minibuffer-mode 1)
42 ```