Mercurial > hg
changeset 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 | c3da7b6cc975 |
files | contrib/mercurial.el |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/mercurial.el Tue May 22 08:05:16 2007 +0900 +++ b/contrib/mercurial.el Tue May 22 07:24:06 2007 +0900 @@ -764,10 +764,11 @@ (add-hook 'find-file-hooks 'hg-find-file-hook) (defun hg-after-save-hook () - (let ((old-status hg-status)) - (hg-mode-line) - (if (and (not old-status) hg-status) - (hg-mode)))) + (ignore-errors + (let ((old-status hg-status)) + (hg-mode-line) + (if (and (not old-status) hg-status) + (hg-mode))))) (add-hook 'after-save-hook 'hg-after-save-hook)