Mercurial > emacs
comparison lisp/vc-arch.el @ 91367:c70e45a7acfd
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-324
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 30 Jan 2008 07:57:28 +0000 |
parents | 606f2d163a64 5d58981e6690 |
children |
comparison
equal
deleted
inserted
replaced
91366:86f3a8f0a3a6 | 91367:c70e45a7acfd |
---|---|
345 (defun vc-arch-delete-rej-if-obsolete () | 345 (defun vc-arch-delete-rej-if-obsolete () |
346 "For use in `after-save-hook'." | 346 "For use in `after-save-hook'." |
347 (save-excursion | 347 (save-excursion |
348 (let ((rej (concat buffer-file-name ".rej"))) | 348 (let ((rej (concat buffer-file-name ".rej"))) |
349 (when (and buffer-file-name (vc-arch-diff3-rej-p rej)) | 349 (when (and buffer-file-name (vc-arch-diff3-rej-p rej)) |
350 (if (not (re-search-forward "^<<<<<<< " nil t)) | 350 (unless (re-search-forward "^<<<<<<< " nil t) |
351 ;; The .rej file is obsolete. | 351 ;; The .rej file is obsolete. |
352 (condition-case nil (delete-file rej) (error nil))))))) | 352 (condition-case nil (delete-file rej) (error nil)) |
353 ;; Remove the hook so that it is not called multiple times. | |
354 (remove-hook 'after-save-hook 'vc-arch-delete-rej-if-obsolete t)))))) | |
353 | 355 |
354 (defun vc-arch-find-file-hook () | 356 (defun vc-arch-find-file-hook () |
355 (let ((rej (concat buffer-file-name ".rej"))) | 357 (let ((rej (concat buffer-file-name ".rej"))) |
356 (when (and buffer-file-name (file-exists-p rej)) | 358 (when (and buffer-file-name (file-exists-p rej)) |
357 (if (vc-arch-diff3-rej-p rej) | 359 (if (vc-arch-diff3-rej-p rej) |