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

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

[nongnu] elpa/annotate b63b3b7501 1/6: - added idle timer to print annot


From: ELPA Syncer
Subject: [nongnu] elpa/annotate b63b3b7501 1/6: - added idle timer to print annotation under point.
Date: Fri, 30 Sep 2022 06:58:13 -0400 (EDT)

branch: elpa/annotate
commit b63b3b7501e5dbfac9d7f154f0c44950a6d87532
Author: cage <cage@invalid>
Commit: cage <cage@invalid>

    - added idle timer to print annotation under point.
---
 annotate.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/annotate.el b/annotate.el
index 121dc59be7..27717d70d1 100644
--- a/annotate.el
+++ b/annotate.el
@@ -70,6 +70,15 @@
     (define-key map (kbd "C-c [")   #'annotate-goto-previous-annotation)
     map))
 
+(defun annotate-timer-print-annotation ()
+  (with-current-buffer (current-buffer)
+    (when annotate-mode
+      (when-let ((annotation (annotate-annotation-at (point))))
+        (message (overlay-get annotation 'annotation))))))
+
+(defvar-local annotate-echo-annotation-timer
+  (run-with-idle-timer 0.1 t #'annotate-timer-print-annotation))
+
 ;;;###autoload
 (define-minor-mode annotate-mode
   "Toggle Annotate mode.



reply via email to

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