Emacs: search for hg in path before looking in funny places.
authorbos@serpentine.internal.keyresearch.com
Tue, 23 Aug 2005 14:51:52 -0700
changeset 1011 d06420c90d8b
parent 1004 ad6fcceaf59b
child 1012 d74bcc61be6f
child 1024 5b257e419816
Emacs: search for hg in path before looking in funny places.
contrib/mercurial.el
--- a/contrib/mercurial.el	Mon Aug 22 15:29:55 2005 -0700
+++ b/contrib/mercurial.el	Tue Aug 23 14:51:52 2005 -0700
@@ -67,11 +67,10 @@
   :group 'tools)
 
 (defcustom hg-binary
-  (dolist (path '("~/bin/hg"
-		  "/usr/bin/hg"
-		  "/usr/local/bin/hg"))
-    (when (file-executable-p path)
-      (return path)))
+    (or (executable-find "hg")
+	(dolist (path '("~/bin/hg" "/usr/bin/hg" "/usr/local/bin/hg"))
+	  (when (file-executable-p path)
+	    (return path))))
   "The path to Mercurial's hg executable."
   :type '(file :must-match t)
   :group 'mercurial)