[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 06e551b 05/10: Replace diff-hl-flydiff/update with a norma
From: |
Dmitry Gutov |
Subject: |
[elpa] master 06e551b 05/10: Replace diff-hl-flydiff/update with a normal function |
Date: |
Sun, 10 Jan 2016 15:47:44 +0000 |
branch: master
commit 06e551bd5ecd996621bb267297ef4644c7221207
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Replace diff-hl-flydiff/update with a normal function
---
diff-hl-flydiff.el | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index 4d22813..138ca20 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -136,12 +136,11 @@ This requires the external program `diff' to be in your
`exec-path'."
(diff-no-select rev (current-buffer) "-U 0 --strip-trailing-cr" 'noasync
(get-buffer-create " *diff-hl-diff*")))))
-(defun diff-hl-flydiff/update (old-fun &optional auto)
- (unless (and auto
- (or
- (= diff-hl-flydiff-modified-tick (buffer-modified-tick))
- (file-remote-p default-directory)))
- (funcall old-fun)))
+(defun diff-hl-flydiff-update ()
+ (unless (or
+ (= diff-hl-flydiff-modified-tick (buffer-modified-tick))
+ (file-remote-p default-directory))
+ (diff-hl-update)))
(defun diff-hl-flydiff/modified-p (state)
(buffer-modified-p))
@@ -153,7 +152,6 @@ This requires the external program `diff' to be in your
`exec-path'."
:global t
(if diff-hl-flydiff-mode
(progn
- (advice-add 'diff-hl-update :around #'diff-hl-flydiff/update)
(advice-add 'diff-hl-overlay-modified :override #'ignore)
(advice-add 'diff-hl-modified-p :before-until
@@ -161,9 +159,8 @@ This requires the external program `diff' to be in your
`exec-path'."
(advice-add 'diff-hl-changes-buffer :override
#'diff-hl-flydiff-buffer-with-head)
(setq diff-hl-flydiff-timer
- (run-with-idle-timer diff-hl-flydiff-delay t #'diff-hl-update
t)))
+ (run-with-idle-timer diff-hl-flydiff-delay t
#'diff-hl-flydiff-update)))
- (advice-remove 'diff-hl-update #'diff-hl-flydiff/update)
(advice-remove 'diff-hl-overlay-modified #'ignore)
(advice-remove 'diff-hl-modified-p #'diff-hl-flydiff/modified-p)
- [elpa] master updated (5f09f80 -> bf6098d), Dmitry Gutov, 2016/01/10
- [elpa] master 89e08d6 01/10: diff-hl-revert-hunk: Kill the diff buffer afterwards, Dmitry Gutov, 2016/01/10
- [elpa] master 6d973dc 02/10: diff-hl-flydiff-create-revision: Use condition-case, Dmitry Gutov, 2016/01/10
- [elpa] master 5badd5d 03/10: Remove diff-hl-flydiff/update-modified-tick advice, Dmitry Gutov, 2016/01/10
- [elpa] master 06e551b 05/10: Replace diff-hl-flydiff/update with a normal function,
Dmitry Gutov <=
- [elpa] master 125bf44 04/10: Use save-current-buffer, Dmitry Gutov, 2016/01/10
- [elpa] master b674856 07/10: diff-hl-flydiff-update: Check whether diff-hl-mode is enabled, Dmitry Gutov, 2016/01/10
- [elpa] master dd28a9c 06/10: Bump copyright years, Dmitry Gutov, 2016/01/10
- [elpa] master d0e6660 09/10: Bump the version, Dmitry Gutov, 2016/01/10
- [elpa] master 8082947 08/10: Add "using VC" to the summary, Dmitry Gutov, 2016/01/10
- [elpa] master bf6098d 10/10: Merge commit 'd0e6660ee501efea3e9b0936ed64fff09e66df02' from diff-hl, Dmitry Gutov, 2016/01/10