From 81a038a185dac18aa4dcdbb25e9405b86f3fed92 Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Thu, 29 Aug 2002 10:06:43 +0000 Subject: Add additional path to proof-locate-executable. --- generic/proof-utils.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'generic') diff --git a/generic/proof-utils.el b/generic/proof-utils.el index 9d9ecb11..1ac5710e 100644 --- a/generic/proof-utils.el +++ b/generic/proof-utils.el @@ -674,24 +674,24 @@ The name of the defined function is returned." ;; Finding executables ;; -(defun proof-locate-executable (progname &optional returnnopath) +(defun proof-locate-executable (progname &optional returnnopath extrapath) ;; XEmacs can search the paths for us. Probably FSF Emacs is too ;; daft to provide a useful function to do that, and I don't have ;; the time to waste writing one or trying to find one. "Search for PROGNAME on PATH. Return the full path to PROGNAME, or nil. -If RETURNNOPATH is non-nil, return PROGNAME even if we can't find a full path." +If RETURNNOPATH is non-nil, return PROGNAME even if we can't find a full path. +EXTRAPATH is a list of extra path components" (or (cond ((fboundp 'executable-find) - (executable-find progname)) ;; PG 3.4: try a new Emacs function. + (let ((exec-path (append exec-path extrapath))) + (executable-find progname))) ;; PG 3.4: try a new Emacs function. ((fboundp 'locate-file) (locate-file progname - (split-path (getenv "PATH")) + (append (split-path (getenv "PATH") extrapth)) (if proof-running-on-win32 '(".exe")) - 1)) - (and - returnnopath - progname)))) + 1))) + (if returnnopath progname))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; -- cgit v1.2.3