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

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

[nongnu] elpa/annotate 3882a87839 5/6: - made delay before printing anno


From: ELPA Syncer
Subject: [nongnu] elpa/annotate 3882a87839 5/6: - made delay before printing annotations on minibuffer customizable;
Date: Fri, 30 Sep 2022 06:58:15 -0400 (EDT)

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

    - made delay before printing annotations on minibuffer customizable;
    
    - updated README.org.
---
 README.org  |  4 +++-
 annotate.el | 11 ++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 250960f06e..c461471be0 100644
--- a/README.org
+++ b/README.org
@@ -229,7 +229,8 @@ for a couple of examples.
 Moreover if ~annotate-use-echo-area~ and 
~annotate-print-annotation-under-cursor~
 value *both* non null, placing the cursor over an annotated text region will 
print
 the annotation's text in the minibuffer prefixed by the value of customizable 
variable
-~annotate-print-annotation-under-cursor-prefix~.
+~annotate-print-annotation-under-cursor-prefix~, after a delay (in seconds)
+defined by the variable ~annotate-print-annotation-under-cursor-delay~.
 
 Another alternative way to show annotations is provided by the command:
 ~annotate-summary-of-file-from-current-pos~.
@@ -242,6 +243,7 @@ buffer) beyond the current cursor position.
      - ~annotate-use-echo-area~
      - ~annotate-print-annotation-under-cursor~
      - ~annotate-print-annotation-under-cursor-prefix~
+     - ~annotate-print-annotation-under-cursor-delay~
      - ~annotate-summary-of-file-from-current-pos~.
 
 * Other commands
diff --git a/annotate.el b/annotate.el
index 70ce49413a..49a40b6168 100644
--- a/annotate.el
+++ b/annotate.el
@@ -216,6 +216,13 @@ annotate-use-echo-area must be non nil"
    annotate-print-annotation-under-cursor is non nil"
   :type 'string)
 
+(defcustom annotate-print-annotation-under-cursor-delay 0.5
+ "The delay (in seconds) after an annotation id printed in the
+minibuffer, when the pursor is placed over an annotated text.
+
+This variable works only if `annotate-print-annotation-under-cursor' is non 
nil"
+  :type 'float)
+
 (defcustom annotate-warn-if-hash-mismatch t
  "Whether a warning message should be printed if a mismatch
 occurs, for an annotated file, between the hash stored in the
@@ -525,7 +532,9 @@ local version (i.e. a different database for each annotated 
file"
 (defun annotate--maybe-make-timer-print-annotation ()
   (when (annotate-print-annotation-under-cursor-p)
     (setf annotate-echo-annotation-timer
-          (run-with-idle-timer 0.1 t 
#'annotate-timer-print-annotation-function))))
+          (run-with-idle-timer annotate-print-annotation-under-cursor-delay
+                               t
+                               #'annotate-timer-print-annotation-function))))
 
 (defun annotate--maybe-cancel-timer-print-annotation ()
   (when (and (annotate-print-annotation-under-cursor-p)



reply via email to

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