;; Copyright (C) 1996,1997 MORIOKA Tomohiko
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: filename.el,v 1.1.2.1 2000/02/03 02:26:43 tomo Exp $
+;; Version: $Id: filename.el,v 1.1.2.1 2000/08/12 02:45:46 handa Exp $
;; Keywords: file name, string
;; This file is part of APEL (A Portable Emacs Library).
;;; Code:
-(require 'emu) ; for backward compatibility.
-(require 'poe) ; functionp.
-(require 'poem) ; char-int, and char-length.
(require 'path-util)
+(or (fboundp 'char-int)
+ (defalias 'char-int 'identity))
+
+;; Emacs 20.1/XEmacs 20.3 (but first appeared in Epoch?): (functionp OBJECT)
+(or (fboundp 'functionp)
+ (defun functionp (object)
+ "Non-nil if OBJECT is a type of object that can be called as a function."
+ (or (subrp object) (byte-code-function-p object)
+ (eq (car-safe object) 'lambda)
+ (and (symbolp object) (fboundp object)))))
+
+
(defsubst poly-funcall (functions argument)
"Apply initial ARGUMENT to sequence of FUNCTIONS.
FUNCTIONS is list of functions.
(setq lst (cdr lst))))
(if ret
(setq dest (concat dest (substring string b i)(cdr (car lst)))
- i (+ i (char-length chr))
+ i (1+ i)
+ ;; i (+ i (char-length chr))
b i)
- (setq i (+ i (char-length chr))))))
+ (setq i (1+ i))
+ ;; (setq i (+ i (char-length chr)))
+ )))
(concat dest (substring string b))))
(defun filename-eliminate-top-low-lines (string)