make at-point minor mode a add-on of the other minor mode

This way there is no confusion.
This commit is contained in:
Yuan Fu 2019-01-06 20:54:54 -05:00
parent 5deb2fbe10
commit 18829272b8
No known key found for this signature in database
GPG Key ID: 1CF5ECABEC37A901
2 changed files with 3 additions and 9 deletions

View File

@ -11,13 +11,9 @@ Get the file, add to load path, and
#+END_SRC
* Usage
** Function
Enable either mode will make eldoc display documentation on a popup childframe. The difference is the position of the childframe — the first minor mode displays the childframe on the (left or right) upper corner, while the second displays the childframe right below point.
Note that =eldoc-box-hover-at-point-mode= enables =eldoc-box-hover-mode= — it just adds some more configuration on top of the latter, so you want to disable “at-point” mode before switching to =eldoc-box-hover-mode=.
- =eldoc-box-hover-mode= :: Display documentation of the symbol at point in a childframe on upper corner.
- =eldoc-box-hover-at-point-mode= :: Display documentation of the symbol at point in a childframe below point. (That's what the =at-point= part mean)
- =eldox-box-eglot-help-at-point= :: See below.
- =eldoc-box-hover-at-point-mode= :: If you enable this minor mode *on top of* =eldoc-box-hover-mode=, the childframe is displayed at point, instead of on the upper corner.
- =eldox-box-eglot-help-at-point= :: [[Use with eglot][See below]]
** Face
- =eldoc-box-border= :: Adjust =:background= of this face for border color.
- =eldoc-box-body= :: Adjust =:background= and =:font= of this face for background color and font of the childframe. I suggest to use a nice Sans Serif font, such as Source Sans Pro.

View File

@ -150,9 +150,7 @@ You can use C-g to hide the doc."
#'eldoc-box--default-at-point-position-function)
(setq-local eldoc-box-clear-with-C-g t)
(remove-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t)
(add-hook 'pre-command-hook #'eldoc-box-quit-frame t t)
(eldoc-box-hover-mode))
(eldoc-box-hover-mode -1)
(add-hook 'pre-command-hook #'eldoc-box-quit-frame t t))
(add-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t)
(remove-hook 'pre-command-hook #'eldoc-box-quit-frame t)
(kill-local-variable 'eldoc-box-position-function)