;;; executable.el --- base functionality for executable interpreter scripts -*- byte-compile-dynamic: t -*-
-;; Copyright (C) 1994, 1995, 1996, 2000, 2003 by Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996, 2000, 2003, 2004 by Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Keywords: languages, unix
;;;###autoload
(defun executable-command-find-posix-p (&optional program)
"Check if PROGRAM handles arguments Posix-style.
-If PROGRAM is non-nil, use that instead of "find"."
+If PROGRAM is non-nil, use that instead of \"find\"."
;; Pick file to search from location we know
- (let* ((dir (car load-path))
- (file (find-if
- (lambda (x)
- ;; Filter directories . and ..
- (not (string-match "^\\.\\.?$" x)))
- (directory-files dir))))
+ (let* ((dir (file-truename data-directory))
+ (file (car (directory-files dir nil "^[^.]"))))
(with-temp-buffer
(call-process (or program "find")
nil