Mercurial > emacs
diff lisp/vc-arch.el @ 79848:316ed7573095
* 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.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Tue, 15 Jan 2008 04:37:20 +0000 |
parents | 73661ddc7ac7 |
children | 5d58981e6690 |
line wrap: on
line diff
--- a/lisp/vc-arch.el Tue Jan 15 04:06:40 2008 +0000 +++ b/lisp/vc-arch.el Tue Jan 15 04:37:20 2008 +0000 @@ -341,9 +341,11 @@ (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")))