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

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

[elpa] master 2992efd 31/42: Simplify diff-hl-flydiff/modified-p advice


From: Dmitry Gutov
Subject: [elpa] master 2992efd 31/42: Simplify diff-hl-flydiff/modified-p advice
Date: Wed, 09 Sep 2015 19:03:44 +0000

branch: master
commit 2992efd07244df5ff8c1833e9c3e3716ecb2de93
Author: PythonNut <address@hidden>
Commit: PythonNut <address@hidden>

    Simplify diff-hl-flydiff/modified-p advice
---
 diff-hl-flydiff.el |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index 6215ab7..b5f6b4c 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -132,14 +132,7 @@ This requires the external program `diff' to be in your 
`exec-path'."
     (funcall old-fun)))
 
 (defun diff-hl-flydiff/modified-p (state)
-  (or
-    (buffer-modified-p)
-    (eq state 'edited)
-    (and (eq state 'up-to-date)
-      ;; VC state is stale in after-revert-hook.
-      (or revert-buffer-in-progress-p
-        ;; Diffing against an older revision.
-        diff-hl-reference-revision))))
+  (buffer-modified-p))
 
 (defun diff-hl-flydiff/update-modified-tick (&rest args)
   (setq diff-hl-flydiff-modified-tick (buffer-modified-tick)))
@@ -154,7 +147,7 @@ This requires the external program `diff' to be in your 
`exec-path'."
       (advice-add 'diff-hl-update :around #'diff-hl-flydiff/update)
       (advice-add 'diff-hl-overlay-modified :override #'ignore)
 
-      (advice-add 'diff-hl-modified-p :override
+      (advice-add 'diff-hl-modified-p :before-until
         #'diff-hl-flydiff/modified-p)
       (advice-add 'diff-hl-changes-buffer :override
         #'diff-hl-flydiff-buffer-with-head)



reply via email to

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