From c10acff90e740935a3165f75bfdf97205cafb734 Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 15 Dec 2000 09:52:57 +0000 Subject: [PATCH] Don't require `emu', `poe' and `poem'. (char-int): New alias. (functionp): New function. --- emacs-lisp/filename.el | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/emacs-lisp/filename.el b/emacs-lisp/filename.el index ea11042..8c0b0da 100644 --- a/emacs-lisp/filename.el +++ b/emacs-lisp/filename.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996,1997 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko -;; 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). @@ -25,11 +25,20 @@ ;;; 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. @@ -104,9 +113,12 @@ List of characters represents characters not allowed as file-name.") (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) -- 1.7.10.4