]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix #68
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 13 May 2016 14:12:06 +0000 (17:12 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 13 May 2016 14:12:06 +0000 (17:12 +0300)
diff-hl-flydiff.el

index 94dbbd7f6d9e89f68536d9a37ccd86884d18e3b3..7f0c6c7de03f41aa0c624bd09dc5f2c2afc6fff1 100644 (file)
@@ -39,7 +39,7 @@
   :type 'number)
 
 (defvar diff-hl-flydiff-modified-tick 0)
-(defvar diff-hl-flydiff-timer)
+(defvar diff-hl-flydiff-timer nil)
 (make-variable-buffer-local 'diff-hl-flydiff-modified-tick)
 
 (defun diff-hl-flydiff/vc-git--symbolic-ref (file)
@@ -167,6 +167,7 @@ This requires the external program `diff' to be in your `exec-path'."
     (advice-remove 'diff-hl-modified-p #'diff-hl-flydiff/modified-p)
     (advice-remove 'diff-hl-changes-buffer #'diff-hl-flydiff-buffer-with-head)
 
-    (cancel-timer diff-hl-flydiff-timer)))
+    (and diff-hl-flydiff-timer
+         (cancel-timer diff-hl-flydiff-timer))))
 
 (provide 'diff-hl-flydiff)