From d2390ef04ba3df03852d456634e41de92f8e3609 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 9 Nov 1999 02:59:16 +0000 Subject: [PATCH] (file-executable-p): Returns nil if the file does not exist. --- ChangeLog | 5 +++++ poe-18.el | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 237fcf9..8780a58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-11-09 Katsumi Yamaoka + + * poe-18.el (file-executable-p): Returns nil if the file does not + exist. + 1999-11-08 Yuuichi Teranishi * poe-18.el (put-text-property, next-property-change, diff --git a/poe-18.el b/poe-18.el index 4e7047f..2ca24e6 100644 --- a/poe-18.el +++ b/poe-18.el @@ -304,9 +304,10 @@ If NOSORT is dummy for compatibility. "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)))) + (if (file-exists-p filename) + (let ((process (start-process "test" nil "test" "-x" filename))) + (while (eq 'run (process-status process))) + (zerop (process-exit-status process))))) ;;; @ Display Features -- 1.7.10.4