Function: executable-command-find-posix-p

executable-command-find-posix-p is an autoloaded and byte-compiled function defined in executable.el.gz.

Signature

(executable-command-find-posix-p &optional PROGRAM)

Documentation

Check if PROGRAM handles arguments Posix-style.

If PROGRAM is non-nil, use that instead of "find".

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/executable.el.gz
;;;###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\"."
  ;;  Pick file to search from location we know
  (let* ((dir (file-truename data-directory))
         (file (car (directory-files dir nil "\\`[^.]"))))
    (with-temp-buffer
      (call-process (or program "find")
                    nil
                    (current-buffer)
                    nil
                    dir
                    "-name"
                    file
                    "-maxdepth"
                    "1")
        (goto-char (point-min))
        (if (search-forward file nil t)
            t))))