emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/why-this b8e612d4cb 20/59: Show tooltip on hover


From: ELPA Syncer
Subject: [nongnu] elpa/why-this b8e612d4cb 20/59: Show tooltip on hover
Date: Sun, 27 Nov 2022 16:02:50 -0500 (EST)

branch: elpa/why-this
commit b8e612d4cbaa3034fcbd2c34d729a2bf13729096
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Show tooltip on hover
---
 why-this.el | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/why-this.el b/why-this.el
index 3b175fe00f..e08415f38d 100644
--- a/why-this.el
+++ b/why-this.el
@@ -73,6 +73,12 @@ See `why-this-message-format'."
   :package-version '(why-this "1.0")
   :group 'why-this)
 
+(defcustom why-this-enable-tooltip t
+  "Non-nil means show tooltip."
+  :type 'boolean
+  :package-version '(why-this "1.0")
+  :group 'why-this)
+
 (defcustom why-this-nick-name-alist nil
   "Alist of nick name of authors.
 
@@ -239,7 +245,13 @@ When EXACT is non-nil, be as exact as possible."
                                       why-this-message-format
                                       (append `(:backend ,backend)
                                               (nth i data)))
-                                     'cursor t 'face 'why-this-face))
+                                     'cursor t 'face 'why-this-face
+                                     'help-echo
+                                     (when why-this-enable-tooltip
+                                       (why-this-format-data
+                                        why-this-echo-format
+                                        (append `(:backend ,backend)
+                                                (nth i data))))))
             (overlay-put ov 'why-this-line (+ begin i))
             (push (cons ov (current-buffer)) why-this--overlays)))))))
 
@@ -465,7 +477,8 @@ Actually the supported backend is returned."
 
 ;;;###autoload
 (define-globalized-minor-mode global-why-this-mode why-this-mode
-  why-this-mode)
+  why-this-mode
+  :group 'why-this)
 
 (define-derived-mode why-this-annotate-mode
   special-mode "Why-This-Annotate"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]