changeset 4413:b008deae9910

mercurial.el: don't raise an error from find-file-hook find-file() shouldn't fail even if unreadable .hg directory is exists. Not enabling hg-mode is sufficient for that senario.
author NIIMI Satoshi <sa2c@sa2c.net>
date Sat, 05 May 2007 15:56:49 +0900
parents 189a8ca52bfc
children 0912d8df5e19
files contrib/mercurial.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/mercurial.el	Sat May 05 15:50:40 2007 +0900
+++ b/contrib/mercurial.el	Sat May 05 15:56:49 2007 +0900
@@ -750,8 +750,9 @@
   (run-hooks 'hg-mode-hook))
 
 (defun hg-find-file-hook ()
-  (when (hg-mode-line)
-    (hg-mode)))
+  (ignore-errors
+    (when (hg-mode-line)
+      (hg-mode))))
 
 (add-hook 'find-file-hooks 'hg-find-file-hook)