Make eldoc-box-clear-with-C-g work for help-at-point too

* eldoc-box.el (eldoc-box-help-at-point): Add advice if
eldoc-box-clear-with-C-g is non-nil.
This commit is contained in:
Yuan Fu 2023-09-20 21:01:20 -07:00
parent 2663fd8834
commit 270a9a8948
No known key found for this signature in database
GPG Key ID: 56E19BC57664A442

View File

@ -290,7 +290,9 @@ If point != last point, hide the childframe.")
(with-current-buffer eldoc--doc-buffer
(buffer-string))))
(setq eldoc-box--help-at-point-last-point (point))
(run-with-timer 0.1 nil #'eldoc-box--help-at-point-cleanup)))
(run-with-timer 0.1 nil #'eldoc-box--help-at-point-cleanup)
(when eldoc-box-clear-with-C-g
(advice-add #'keyboard-quit :before #'eldoc-box-quit-frame))))
;;;; Backstage
;;;;; Variable