> Done. I preferred to use locate-file instead of executable-find, > since the latter would load another package.
Actually, looking at the definition of executable-find, I'm surprised it doesn't use locate-file. The patch below should fix it so that executable-find uses the same code used by `call-process'. The new code is nothing else than a call to locate-file and I'd argue that Eli's change from executable-find to locate-file is a bad idea and instead we should simply move executable-find from executable.el to subr.el. Stefan --- orig/lisp/progmodes/executable.el +++ mod/lisp/progmodes/executable.el @@ -165,25 +165,7 @@ (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'." - (let ((list exec-path) - file) - (while list - (setq list - (if (and (setq file (expand-file-name command (car list))) - (let ((suffixes exec-suffixes) - candidate) - (while suffixes - (setq candidate (concat file (car suffixes))) - (if (and (file-executable-p candidate) - (not (file-directory-p candidate))) - (setq suffixes nil) - (setq suffixes (cdr suffixes)) - (setq candidate nil))) - (setq file candidate))) - nil - (setq file nil) - (cdr list)))) - file)) + (locate-file command exec-path exec-suffixes 1)) (defun executable-chmod () "This gets called after saving a file to assure that it be executable. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel