aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aspinall2002-08-29 10:06:43 +0000
committerDavid Aspinall2002-08-29 10:06:43 +0000
commit81a038a185dac18aa4dcdbb25e9405b86f3fed92 (patch)
tree80fb732b19000b1719b5bf17c12c0185647dc423
parent6199ac1b23f3c1663d0b6e2793c599361a4e08db (diff)
Add additional path to proof-locate-executable.
-rw-r--r--generic/proof-utils.el16
1 files changed, 8 insertions, 8 deletions
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)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;