[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 6d973dc 02/10: diff-hl-flydiff-create-revision: Use condit
From: |
Dmitry Gutov |
Subject: |
[elpa] master 6d973dc 02/10: diff-hl-flydiff-create-revision: Use condition-case |
Date: |
Sun, 10 Jan 2016 15:47:42 +0000 |
branch: master
commit 6d973dc8a7a1cbb5efd1c6c967d3c9c7f58bf2cd
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
diff-hl-flydiff-create-revision: Use condition-case
Fixes #59
---
diff-hl-flydiff.el | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index 53d31f7..a63bc06 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -105,19 +105,18 @@ the user should be returned."
(if (file-exists-p automatic-backup)
(rename-file automatic-backup filename nil)
(with-current-buffer filebuf
- (let ((failed t)
- (coding-system-for-read 'no-conversion)
+ (let ((coding-system-for-read 'no-conversion)
(coding-system-for-write 'no-conversion))
- (unwind-protect
+ (condition-case nil
(with-temp-file filename
(let ((outbuf (current-buffer)))
;; Change buffer to get local value of
;; vc-checkout-switches.
(with-current-buffer filebuf
(vc-call find-revision file revision outbuf))))
- (setq failed nil)
- (when (and failed (file-exists-p filename))
- (delete-file filename)))))))
+ (error
+ (when (file-exists-p filename)
+ (delete-file filename))))))))
filename))
(defun diff-hl-flydiff-buffer-with-head (file &optional backend)
- [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 <=
- [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, 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