From da3c205a67f8aa56581dcc2d05eecdeea3dc5196 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Wed, 6 Nov 2024 11:42:53 +0100 Subject: [PATCH] Remove tip in pre-command-hook * lisp/tty-tip.el (tty-tip-mode): install pre-command-hook that deleted the tip frame. (cherry picked from commit 907c735402dd26e721ca8534df1e326fc53a3012) --- lisp/tty-tip.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/tty-tip.el b/lisp/tty-tip.el index 7f600fd3772..33b4c81bfca 100644 --- a/lisp/tty-tip.el +++ b/lisp/tty-tip.el @@ -190,9 +190,12 @@ "Global minor mode for displaying help in tty child frames." :global t :group 'help (unless (display-graphic-p) - (if tty-tip-mode - (setq show-help-function #'tty-tip--show-help) - (setq show-help-function nil)))) + (cond (tty-tip-mode + (setq show-help-function #'tty-tip--show-help) + (add-hook 'pre-command-hook #'tty-tip--delete-frame)) + (t + (setq show-help-function nil) + (remove-hook 'pre-command-hook #'tty-tip--delete-frame))))) (provide 'tty-tip) -- 2.39.5