Mercurial > hg > mercurial-crew-with-dirclash
comparison contrib/mercurial.el @ 4694:6bf58c9400e2
mercurial.el: ignore errors on hg-after-save-hook()
Don't signal an error even if running hg command fails. Otherwise,
succeeding hooks won't be called.
author | NIIMI Satoshi <sa2c@sa2c.net> |
---|---|
date | Tue, 22 May 2007 07:24:06 +0900 |
parents | 3f484688c702 |
children | 97dbf330069a ea7b982b6c08 |
comparison
equal
deleted
inserted
replaced
4693:3f484688c702 | 4694:6bf58c9400e2 |
---|---|
762 (hg-mode)))) | 762 (hg-mode)))) |
763 | 763 |
764 (add-hook 'find-file-hooks 'hg-find-file-hook) | 764 (add-hook 'find-file-hooks 'hg-find-file-hook) |
765 | 765 |
766 (defun hg-after-save-hook () | 766 (defun hg-after-save-hook () |
767 (let ((old-status hg-status)) | 767 (ignore-errors |
768 (hg-mode-line) | 768 (let ((old-status hg-status)) |
769 (if (and (not old-status) hg-status) | 769 (hg-mode-line) |
770 (hg-mode)))) | 770 (if (and (not old-status) hg-status) |
771 (hg-mode))))) | |
771 | 772 |
772 (add-hook 'after-save-hook 'hg-after-save-hook) | 773 (add-hook 'after-save-hook 'hg-after-save-hook) |
773 | 774 |
774 | 775 |
775 ;;; User interface functions. | 776 ;;; User interface functions. |