# HG changeset patch # User Stefan Monnier # Date 1115828695 0 # Node ID b484427cfa6b489e50d88ee31f136a6ed40b4ead # Parent 5dfcab314a42e934c866edfb509e21dfc30c4aa4 (executable-find): Move from executable.el. Use locate-file. diff -r 5dfcab314a42 -r b484427cfa6b lisp/files.el --- a/lisp/files.el Wed May 11 15:55:16 2005 +0000 +++ b/lisp/files.el Wed May 11 16:24:55 2005 +0000 @@ -676,6 +676,13 @@ ((null action) (try-completion string names)) (t (test-completion string names)))))) +(defun executable-find (command) + "Search for COMMAND in `exec-path' and return the absolute file name. +Return nil if COMMAND is not found anywhere in `exec-path'." + ;; Use 1 rather than file-executable-p to better match the behavior of + ;; call-process. + (locate-file command exec-path exec-suffixes 1)) + (defun load-library (library) "Load the library named LIBRARY. This is an interface to the function `load'." @@ -4855,5 +4862,5 @@ (define-key ctl-x-5-map "\C-f" 'find-file-other-frame) (define-key ctl-x-5-map "r" 'find-file-read-only-other-frame) -;;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f +;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f ;;; files.el ends here