From: Gerd Möllmann Date: Wed, 6 Nov 2024 10:42:53 +0000 (+0100) Subject: Remove tip in pre-command-hook X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da3c205a67f8aa56581dcc2d05eecdeea3dc5196;p=emacs.git 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) --- 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)