From: yamaoka Date: Tue, 2 Nov 1999 01:36:37 +0000 (+0000) Subject: (file-executable-p): New function. X-Git-Tag: of-tm-8_8~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=519b2fe2cba7f7802851bad94e6fa85cee378cfb;p=elisp%2Fapel.git (file-executable-p): New function. --- diff --git a/ChangeLog b/ChangeLog index ba1bafd..c214a2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-11-02 Katsumi Yamaoka + + * poe-18.el (file-executable-p): New function. + + 1999-10-22 Katsumi Yamaoka * APEL: Version 9.23 released. diff --git a/poe-18.el b/poe-18.el index 73403d1..8a684e3 100644 --- a/poe-18.el +++ b/poe-18.el @@ -25,7 +25,7 @@ ;;; Commentary: ;; Note to developers: -;; +;; ;; If old (v18) compiler is used, top-level macros are expanded at ;; *load-time*, not compile-time. So, you cannot use macros defined ;; in this file using `defmacro-maybe'. In addition, due to this @@ -104,7 +104,7 @@ for this variable. (autoload 'setenv "env" "Set the value of the environment variable named VARIABLE to VALUE. VARIABLE should be a string. VALUE is optional; if not provided or is -`nil', the environment variable VARIABLE will be removed. +`nil', the environment variable VARIABLE will be removed. This function works by modifying `process-environment'." t) @@ -291,7 +291,15 @@ If NOSORT is dummy for compatibility. \[poe-18.el; EMACS 19 emulating function]" (si:directory-files directory full match)) - +(defun file-executable-p (filename) + "Return t if FILENAME can be executed by you. +For a directory, this means you can access files in that directory. +\[poe-18.el; EMACS 19 emulating function]" + (let ((process (start-process "test" nil "test" "-x" filename))) + (while (eq 'run (process-status process))) + (zerop (process-exit-status process)))) + + ;;; @ Display Features ;;; @@ -354,7 +362,7 @@ With optional non-nil ALL, force redisplay of all mode-lines. (set-marker (nth posto attr-value) to)) (setcdr (nthcdr posfrom attr-value) (nthcdr posto attr-value))))) - + (defalias 'make-overlay 'cons) (defun overlay-put (overlay prop value)