From f58baa49ba7720cf0a446dcb4a6f688522fc6446 Mon Sep 17 00:00:00 2001 From: "bos@serpentine.internal.keyresearch.com" Date: Tue, 23 Aug 2005 14:51:52 -0700 Subject: [PATCH] Emacs: search for hg in path before looking in funny places. --- contrib/mercurial.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/contrib/mercurial.el b/contrib/mercurial.el index 54a664cdf8..cc770478b3 100644 --- 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)