summaryrefslogtreecommitdiff
path: root/lisp/vc-arch.el
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2008-01-15 04:37:20 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2008-01-15 04:37:20 +0000
commit54648b5c23a37346e89c99e622bc81e7a5f30d3f (patch)
tree4b39f7fe0ffc7d9a8860247bdff08382b39248c8 /lisp/vc-arch.el
parent7d3169dbbdb106076475d537d0657295e603e8e0 (diff)
downloademacs-54648b5c23a37346e89c99e622bc81e7a5f30d3f.tar.gz
* vc-arch.el (vc-arch-delete-rej-if-obsolete): Remove the
after-save-hook so that it is not called multiple times. * vc-svn.el (vc-svn-resolve-when-done): Likewise.
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 137dcf9e20f..c027d981b3a 100644
--- a/lisp/vc-arch.el
+++ b/lisp/vc-arch.el
@@ -341,9 +341,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")))