From f172a01046934d6883d784bc86412eaff76b1fdf Mon Sep 17 00:00:00 2001 From: "Billy.Zheng" Date: Sun, 30 Jan 2022 13:20:31 +0800 Subject: [PATCH] Add hover-global-minor-mode. --- README.md | 2 +- hover.el | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 829e02e..24f18d6 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ The following example uses **all available** configurations above, you can custo hover-screenshot-prefix "my-prefix-" hover-observatory-uri "http://my-custom-host:50300" hover-clear-buffer-on-hot-restart t)) - (hover-minor-mode 1)) + (hover-global-minor-mode t)) ``` _Thanks to [flutter.el](https://github.com/amake/flutter.el) which inspired this project._ diff --git a/hover.el b/hover.el index 2cb1c1d..3cb185b 100644 --- a/hover.el +++ b/hover.el @@ -294,5 +294,15 @@ args." :keymap hover-minor-mode-map :group 'hover) +(defun hover-turn-on-hover-minor-mode () + "Turn on `hover-minor-mode'." + (hover-minor-mode t)) + +;;;###autoload +(define-globalized-minor-mode hover-global-minor-mode + hover-minor-mode hover-turn-on-hover-minor-mode + :group 'hover + :require 'hover-minor-mode) + (provide 'hover) ;;; hover.el ends here