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

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

[elpa] master e576ee2 40/42: Make diff-hl-flydiff-delay customizable


From: Dmitry Gutov
Subject: [elpa] master e576ee2 40/42: Make diff-hl-flydiff-delay customizable
Date: Wed, 09 Sep 2015 19:03:49 +0000

branch: master
commit e576ee2b7122e92a502d6173472516f51a787e6c
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Make diff-hl-flydiff-delay customizable
---
 diff-hl-flydiff.el |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index 8ede0b5..53d31f7 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -30,6 +30,14 @@
 (unless (require 'nadvice nil t)
   (error "`diff-hl-flydiff-mode' requires Emacs 24.4 or newer"))
 
+(defgroup diff-hl-flydiff nil
+  "Highlight changes on the fly"
+  :group 'diff-hl)
+
+(defcustom diff-hl-flydiff-delay 0.3
+  "The idle delay in seconds before highlighting is updated."
+  :type 'number)
+
 (defvar diff-hl-flydiff-modified-tick 0)
 (defvar diff-hl-flydiff-timer)
 (make-variable-buffer-local 'diff-hl-flydiff-modified-tick)
@@ -160,7 +168,7 @@ This requires the external program `diff' to be in your 
`exec-path'."
                     #'diff-hl-flydiff/update-modified-tick)
 
         (setq diff-hl-flydiff-timer
-              (run-with-idle-timer 0.3 t #'diff-hl-update t)))
+              (run-with-idle-timer diff-hl-flydiff-delay t #'diff-hl-update 
t)))
 
     (advice-remove 'diff-hl-update #'diff-hl-flydiff/update)
     (advice-remove 'diff-hl-overlay-modified #'ignore)



reply via email to

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