summaryrefslogtreecommitdiff
path: root/lisp/vc-arch.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-01-22 23:53:46 +0000
committerMiles Bader <miles@gnu.org>2008-01-22 23:53:46 +0000
commit1bad168e59601c1c843a38b2962e77b29f497f11 (patch)
tree26f29332811458573579bb0b807ff85a8d32b807 /lisp/vc-arch.el
parent22f9eb9e4f09de5570ba5ede033b0a8f0973a0e9 (diff)
parent645b6388d5bae5304098c1e773694beffc3478e9 (diff)
downloademacs-1bad168e59601c1c843a38b2962e77b29f497f11.tar.gz
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1006
Diffstat (limited to 'lisp/vc-arch.el')
-rw-r--r--lisp/vc-arch.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/vc-arch.el b/lisp/vc-arch.el
index 284fe032a25..58a3bd0183d 100644
--- a/lisp/vc-arch.el
+++ b/lisp/vc-arch.el
@@ -347,9 +347,11 @@ Return non-nil if FILE is unchanged."
(save-excursion
(let ((rej (concat buffer-file-name ".rej")))
(when (and buffer-file-name (vc-arch-diff3-rej-p rej))
- (if (not (re-search-forward "^<<<<<<< " nil t))
- ;; The .rej file is obsolete.
- (condition-case nil (delete-file rej) (error nil)))))))
+ (unless (re-search-forward "^<<<<<<< " nil t)
+ ;; The .rej file is obsolete.
+ (condition-case nil (delete-file rej) (error nil))
+ ;; Remove the hook so that it is not called multiple times.
+ (remove-hook 'after-save-hook 'vc-arch-delete-rej-if-obsolete t))))))
(defun vc-arch-find-file-hook ()
(let ((rej (concat buffer-file-name ".rej")))