From 2feb78b5c986bc9c2b0dd203abe7af68eb51fd09 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 26 Aug 1999 12:32:32 +0000 Subject: [PATCH] (directory-files): Emulate as Emacs 19 or later to accept the optional fourth argument for old Emacsen. It is needed here for compiling other packages. --- path-util.el | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/path-util.el b/path-util.el index 5ff9826..25db6e5 100644 --- a/path-util.el +++ b/path-util.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: path-util.el,v 1.1 1997-11-06 15:47:23 morioka Exp $ +;; Version: $Id: path-util.el,v 1.2 1999-08-26 12:32:32 yamaoka Exp $ ;; Keywords: file detection, install, module ;; This file is part of APEL (A Portable Emacs Library). @@ -79,6 +79,25 @@ of load-path instead of default-load-path." (add-to-list 'load-path path) ))) +(condition-case nil + (directory-files "." nil nil t) + (file-error nil);; unreadable directory. + (wrong-number-of-arguments + (or (fboundp 'si:directory-files) + (fset 'si:directory-files (symbol-function 'directory-files))) + ;; This function is also defined in poe-18, but it is needed here + ;; for compiling other packages under old Emacsen. + (defun directory-files (directory &optional full match nosort) + "Return a list of names of files in DIRECTORY. +There are three optional arguments: +If FULL is non-nil, return absolute file names. Otherwise return names + that are relative to the specified directory. +If MATCH is non-nil, mention only file names that match the regexp MATCH. +If NOSORT is dummy for compatibility. +\[poe-18.el; EMACS 19 emulating function]" + (si:directory-files directory full match)) + )) + ;;;###autoload (defun get-latest-path (pattern &optional all-paths) "Return latest directory in default-load-path -- 1.7.10.4