;;; ;;; emu.el --- Emulation module for each Emacs variants ;;; ;;; Copyright (C) 1995 Free Software Foundation, Inc. ;;; Copyright (C) 1995,1996 MORIOKA Tomohiko ;;; ;;; Author: MORIOKA Tomohiko ;;; modified by Shuhei KOBAYASHI ;;; Version: ;;; $Id: emu.el,v 7.3 1996/03/13 17:13:31 morioka Exp $ ;;; Keywords: emulation, compatibility, NEmacs, Mule, XEmacs ;;; ;;; This file is part of tl (Tiny Library). ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as ;;; published by the Free Software Foundation; either version 2, or ;;; (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;; General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with This program. If not, write to the Free Software ;;; Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;;; ;;; Code: (cond ((boundp 'MULE) (require 'emu-mule)) ((boundp 'NEMACS)(require 'emu-nemacs)) (t (require 'emu-orig)) ) ;;; @ Emacs 19.29 emulation ;;; (or (fboundp 'buffer-substring-no-properties) (defun buffer-substring-no-properties (beg end) "Return the text from BEG to END, without text properties, as a string." (let ((string (buffer-substring beg end))) (tl:set-text-properties 0 (length string) nil string) string)) ) (cond ((or (<= emacs-major-version 18) (<= emacs-minor-version 28)) ;; for Emacs 19.28 or earlier (defun tl:read-string (prompt &optional initial-input history) (read-string prompt initial-input) ) ) (t ;; for Emacs 19.29 or later (defalias 'tl:read-string 'read-string) )) ;;; @ XEmacs emulation ;;; (or (fboundp 'functionp) (defun functionp (obj) "Returns t if OBJ is a function, nil otherwise. \[emu.el; XEmacs emulating function]" (or (subrp obj) (byte-code-function-p obj) (and (symbolp obj)(fboundp obj)) (and (consp obj)(eq (car obj) 'lambda)) )) ) ;;; @ end ;;; (provide 'emu) ;;; emu.el ends here