From: morioka Date: Tue, 10 Mar 1998 17:52:21 +0000 (+0000) Subject: tm 7.105.2. X-Git-Tag: tm-7_95~4 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e283c85bee06c15221e883b2a66d85d69110c6d;p=elisp%2Fapel.git tm 7.105.2. --- diff --git a/ChangeLog b/ChangeLog index 92b599d..a9d54fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +1997-03-10 MORIOKA Tomohiko + + * tl: Version 7.61.18 was released. + + * filename.el (filename-filters): Use `exec-installed-p' instead + of `file-installed-p' to search "kakasi". + +1997-03-10 MORIOKA Tomohiko + + * file-detect.el (module-installed-p): Use function + `exec-installed-p'. + + * file-detect.el (exec-suffix-list): New variable. + (exec-installed-p): New function. + 1997-03-03 MORIOKA Tomohiko * file-detect.el (file-installed-p): Fixed DOC-string. diff --git a/file-detect.el b/file-detect.el index e6544db..fc4ddfb 100644 --- a/file-detect.el +++ b/file-detect.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; Version: -;; $Id: file-detect.el,v 2.1 1997/03/03 09:24:27 morioka Exp $ +;; $Id: file-detect.el,v 3.1 1997/03/10 12:32:23 morioka Exp $ ;; Keywords: install, module ;; This file is part of tl (Tiny Library). @@ -117,31 +117,40 @@ If PATHS is omitted, `load-path' is used. [file-detect.el]" (setq paths (cdr paths)) )))) +(defvar exec-suffix-list '("") + "*List of suffixes for executable.") + +(defun exec-installed-p (file &optional paths suffixes) + "Return absolute-path of FILE if FILE exists in PATHS. +If PATHS is omitted, `exec-path' is used. +If suffixes is omitted, `exec-suffix-list' is used. [file-detect.el]" + (or paths + (setq paths exec-path) + ) + (or suffixes + (setq suffixes exec-suffix-list) + ) + (catch 'tag + (while paths + (let ((stem (expand-file-name file (car paths))) + (sufs suffixes) + ) + (while sufs + (let ((file (concat stem (car sufs)))) + (if (file-exists-p file) + (throw 'tag file) + )) + (setq sufs (cdr sufs)) + )) + (setq paths (cdr paths)) + ))) + (defun module-installed-p (module &optional paths) "Return t if module is provided or exists in PATHS. If PATHS is omitted, `load-path' is used. [file-detect.el]" (or (featurep module) - (let ((name (symbol-name module))) - (if (null paths) - (setq paths load-path) - ) - (catch 'tag - (while paths - (let ((file (expand-file-name name (car paths)))) - (let ((elc-file (concat file ".elc"))) - (if (file-exists-p elc-file) - (throw 'tag elc-file) - )) - (let ((el-file (concat file ".el"))) - (if (file-exists-p el-file) - (throw 'tag el-file) - )) - (if (file-exists-p file) - (throw 'tag file) - ) - ) - (setq paths (cdr paths)) - ))))) + (exec-installed-p (symbol-name module) load-path '(".elc" ".el")) + )) ;;; @ end diff --git a/filename.el b/filename.el index 7de7295..38b9145 100644 --- a/filename.el +++ b/filename.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko -;; Version: $Id: filename.el,v 1.2 1996/12/19 10:06:42 morioka Exp $ +;; Version: $Id: filename.el,v 1.3 1997/03/10 13:09:34 morioka Exp $ ;; Keywords: string, file name ;; This file is part of tl (Tiny Library). @@ -43,7 +43,7 @@ (defvar filename-filters (nconc - (and (file-installed-p "kakasi" exec-path) + (and (exec-installed-p "kakasi") '(filename-japanese-to-roman-string) ) '(filename-special-filter