+1997-03-10 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * 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 <morioka@jaist.ac.jp>
+
+ * 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 <morioka@jaist.ac.jp>
* file-detect.el (file-installed-p): Fixed DOC-string.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; 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).
(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
;; Copyright (C) 1996 MORIOKA Tomohiko
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; 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).
(defvar filename-filters
(nconc
- (and (file-installed-p "kakasi" exec-path)
+ (and (exec-installed-p "kakasi")
'(filename-japanese-to-roman-string)
)
'(filename-special-filter