From 270a9a8948fc3f4ba3547b5584597841f93c7828 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Wed, 20 Sep 2023 21:01:20 -0700 Subject: [PATCH] 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. --- eldoc-box.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eldoc-box.el b/eldoc-box.el index 9ac04a7..fc4a1cc 100644 --- a/eldoc-box.el +++ b/eldoc-box.el @@ -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