# HG changeset patch # User Dan Nicolaescu # Date 1200371840 0 # Node ID 316ed757309501aabb18678ef175c235775e786f # Parent 1fd2919ac5448564b7dd849341bc47550f523e8c * 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. diff -r 1fd2919ac544 -r 316ed7573095 lisp/ChangeLog --- a/lisp/ChangeLog Tue Jan 15 04:06:40 2008 +0000 +++ b/lisp/ChangeLog Tue Jan 15 04:37:20 2008 +0000 @@ -1,3 +1,10 @@ +2008-01-15 Dan Nicolaescu + + * 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. + 2008-01-15 Glenn Morris * diff-mode.el (diff-end-of-hunk): Revert 2008-01-08 change. diff -r 1fd2919ac544 -r 316ed7573095 lisp/vc-arch.el --- 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"))) diff -r 1fd2919ac544 -r 316ed7573095 lisp/vc-svn.el --- a/lisp/vc-svn.el Tue Jan 15 04:06:40 2008 +0000 +++ b/lisp/vc-svn.el Tue Jan 15 04:37:20 2008 +0000 @@ -497,8 +497,10 @@ "Call \"svn resolved\" if the conflict markers have been removed." (save-excursion (goto-char (point-min)) - (if (not (re-search-forward "^<<<<<<< " nil t)) - (vc-svn-command nil 0 buffer-file-name "resolved")))) + (unless (re-search-forward "^<<<<<<< " nil t) + (vc-svn-command nil 0 buffer-file-name "resolved") + ;; Remove the hook so that it is not called multiple times. + (remove-hook 'after-save-hook 'vc-svn-resolve-when-done t)))) ;; Inspired by vc-arch-find-file-hook. (defun vc-svn-find-file-hook ()