# HG changeset patch # User bos@serpentine.internal.keyresearch.com # Date 1124833912 25200 # Node ID d06420c90d8b9da709daf6aa5302ebe09ad707d4 # Parent ad6fcceaf59b247dc0c8ae191e1c05fcf5afb856 Emacs: search for hg in path before looking in funny places. diff --git a/contrib/mercurial.el b/contrib/mercurial.el --- a/contrib/mercurial.el +++ b/contrib/mercurial.el @@ -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)