mercurial.el: ignore errors on hg-after-save-hook()
authorNIIMI Satoshi <sa2c@sa2c.net>
Tue, 22 May 2007 07:24:06 +0900
changeset 4694 6bf58c9400e2
parent 4693 3f484688c702
child 4695 c3da7b6cc975
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.
contrib/mercurial.el
--- 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)