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.