Add warning if eldoc-box-hover-at-point-mode is enable too early
Early means eldoc-box-hover-mode is not enabled
This commit is contained in:
parent
b9a235b61c
commit
0649423e70
24
eldoc-box.el
24
eldoc-box.el
@ -145,17 +145,19 @@ It will be passes with two arguments: WIDTH and HEIGHT of the childframe.")
|
|||||||
"A convenient minor mode to display doc at point.
|
"A convenient minor mode to display doc at point.
|
||||||
You can use C-g to hide the doc."
|
You can use C-g to hide the doc."
|
||||||
:lighter ""
|
:lighter ""
|
||||||
(if eldoc-box-hover-at-point-mode
|
(if eldoc-box-hover-mode
|
||||||
(progn (setq-local
|
(if eldoc-box-hover-at-point-mode
|
||||||
eldoc-box-position-function
|
(progn (setq-local
|
||||||
#'eldoc-box--default-at-point-position-function)
|
eldoc-box-position-function
|
||||||
(setq-local eldoc-box-clear-with-C-g t)
|
#'eldoc-box--default-at-point-position-function)
|
||||||
(remove-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t)
|
(setq-local eldoc-box-clear-with-C-g t)
|
||||||
(add-hook 'pre-command-hook #'eldoc-box-quit-frame t t))
|
(remove-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t)
|
||||||
(add-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t)
|
(add-hook 'pre-command-hook #'eldoc-box-quit-frame t t))
|
||||||
(remove-hook 'pre-command-hook #'eldoc-box-quit-frame t)
|
(add-hook 'pre-command-hook #'eldoc-pre-command-refresh-echo-area t)
|
||||||
(kill-local-variable 'eldoc-box-position-function)
|
(remove-hook 'pre-command-hook #'eldoc-box-quit-frame t)
|
||||||
(kill-local-variable 'eldoc-box-clear-with-C-g)))
|
(kill-local-variable 'eldoc-box-position-function)
|
||||||
|
(kill-local-variable 'eldoc-box-clear-with-C-g))
|
||||||
|
(message "Enable eldoc-box-hover-mode first")))
|
||||||
|
|
||||||
;;;; Backstage
|
;;;; Backstage
|
||||||
;;;;; Variable
|
;;;;; Variable
|
||||||
|
Loading…
Reference in New Issue
Block a user