]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove tip in pre-command-hook
authorGerd Möllmann <gerd@gnu.org>
Wed, 6 Nov 2024 10:42:53 +0000 (11:42 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 14:54:17 +0000 (15:54 +0100)
* 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

index 7f600fd3772ee28690948f0da975d1aa612ce7a6..33b4c81bfca01d54071a98108a6bcd7b2308f1a9 100644 (file)
   "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)