aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2002-07-01 00:30:47 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2002-07-01 00:30:47 +0000
commit17daa0279a9e189bf5723a0a65967e2445ca2cba (patch)
tree02a1c3e8a239aadcf1b20cb122bfd81888ba5a62 /generic
parent40aba9efe1f037abe9f8e31361865959647df8fe (diff)
Use executable-find
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-utils.el21
1 files changed, 12 insertions, 9 deletions
diff --git a/generic/proof-utils.el b/generic/proof-utils.el
index c8ffdcc6..b938ecce 100644
--- a/generic/proof-utils.el
+++ b/generic/proof-utils.el
@@ -714,15 +714,18 @@ The name of the defined function is returned."
;; 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."
- (or (and
- (fboundp 'locate-file)
- (locate-file progname
- (split-path (getenv "PATH"))
- (if proof-running-on-win32 '(".exe"))
- 1))
- (and
- returnnopath
- progname)))
+ (or
+ (cond
+ ((fboundp 'executable-find)
+ (executable-find progname)) ;; PG 3.4: try a new Emacs function.
+ ((fboundp 'locate-file)
+ (locate-file progname
+ (split-path (getenv "PATH"))
+ (if proof-running-on-win32 '(".exe"))
+ 1))
+ (and
+ returnnopath
+ progname))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;