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.
--- 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)