]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/executable.el
(f90-end-block-re, f90-start-block-re): New constants.
[gnu-emacs] / lisp / progmodes / executable.el
index 4d12031588de96d3ad3208841ded334cb43c7b04..a5d401a5f5e8ec969c1c633780a865a60246c63a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; 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
@@ -143,14 +143,10 @@ See `compilation-error-regexp-alist'.")
 ;;;###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