Disable the other minor mode before enabling either one

This commit is contained in:
Yuan Fu 2018-12-26 16:35:27 -05:00
parent 291e5ac97c
commit 1d9b0bb000
No known key found for this signature in database
GPG Key ID: 1CF5ECABEC37A901

View File

@ -125,7 +125,8 @@ It will be passes with two arguments: WIDTH and HEIGHT of the childframe.")
"Displays hover documentations in a childframe. This mode is buffer local."
:lighter " ELDOC-BOX"
(if eldoc-box-hover-mode
(progn (add-function :before-until (local 'eldoc-message-function)
(progn (eldoc-box-hover-at-point-mode -1)
(add-function :before-until (local 'eldoc-message-function)
#'eldoc-box--eldoc-message-function)
(when eldoc-box-clear-with-C-g
(advice-add #'keyboard-quit :before #'eldoc-box-quit-frame)))
@ -143,7 +144,8 @@ It will be passes with two arguments: WIDTH and HEIGHT of the childframe.")
You can use C-g to hide the doc."
:lighter ""
(if eldoc-box-hover-at-point-mode
(progn (setq-local
(progn (eldoc-box-hover-mode -1)
(setq-local
eldoc-box-position-function
#'eldoc-box--default-at-point-position-function)
(setq-local eldoc-box-clear-with-C-g t)