[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5badd5d 03/10: Remove diff-hl-flydiff/update-modified-tick
From: |
Dmitry Gutov |
Subject: |
[elpa] master 5badd5d 03/10: Remove diff-hl-flydiff/update-modified-tick advice |
Date: |
Sun, 10 Jan 2016 15:47:43 +0000 |
branch: master
commit 5badd5def53d8e8d0c7e937c671eb09a4a7587c6
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Remove diff-hl-flydiff/update-modified-tick advice
It was broken:
* There's no function called diff-hl-change.
* Calling it from after-change-functions meant the tick value seemed
always up to date.
---
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 a63bc06..e5a6111 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -124,6 +124,7 @@ the user should be returned."
This requires the external program `diff' to be in your `exec-path'."
(interactive)
(vc-ensure-vc-buffer)
+ (setq diff-hl-flydiff-modified-tick (buffer-modified-tick))
(with-current-buffer (get-buffer (current-buffer))
(let* ((temporary-file-directory
(if (file-directory-p "/dev/shm/")
@@ -139,16 +140,12 @@ This requires the external program `diff' to be in your
`exec-path'."
(unless (and auto
(or
(= diff-hl-flydiff-modified-tick (buffer-modified-tick))
- (file-remote-p default-directory)
- (not (buffer-modified-p))))
+ (file-remote-p default-directory)))
(funcall old-fun)))
(defun diff-hl-flydiff/modified-p (state)
(buffer-modified-p))
-(defun diff-hl-flydiff/update-modified-tick (&rest args)
- (setq diff-hl-flydiff-modified-tick (buffer-modified-tick)))
-
;;;###autoload
(define-minor-mode diff-hl-flydiff-mode
"Highlight diffs on-the-fly"
@@ -163,9 +160,6 @@ This requires the external program `diff' to be in your
`exec-path'."
#'diff-hl-flydiff/modified-p)
(advice-add 'diff-hl-changes-buffer :override
#'diff-hl-flydiff-buffer-with-head)
- (advice-add 'diff-hl-change :after
- #'diff-hl-flydiff/update-modified-tick)
-
(setq diff-hl-flydiff-timer
(run-with-idle-timer diff-hl-flydiff-delay t #'diff-hl-update
t)))
@@ -174,7 +168,6 @@ 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)
- (advice-remove 'diff-hl-change #'diff-hl-flydiff/update-modified-tick)
(cancel-timer diff-hl-flydiff-timer)))
- [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 <=
- [elpa] master 06e551b 05/10: Replace diff-hl-flydiff/update with a normal function, Dmitry Gutov, 2016/01/10
- [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