-;;; emu-18.el --- EMACS 19.* emulation module for EMACS 18.*
+;;; emu-18.el --- emu API implementation for Emacs 18.*
;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: emu-18.el,v 7.27 1996/10/24 07:56:18 morioka Exp $
+;; Version: $Id: emu-18.el,v 7.29 1996/11/28 18:18:19 morioka Exp $
;; Keywords: emulation, compatibility
-;; This file is part of tl (Tiny Library).
+;; This file is part of emu.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
-;;;
-;;; emu-19.el --- emu module for FSF original Emacs 19.*
-;;;
-;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
-;;;
-;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version:
-;;; $Id: emu-19.el,v 7.8 1996/07/22 18:52:53 morioka Exp $
-;;; Keywords: emulation, compatibility
-;;;
-;;; 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.
-;;;
+;;; emu-19.el --- emu API implementation for Emacs 19.*
+
+;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Version: $Id: emu-19.el,v 7.10 1996/11/28 18:17:45 morioka Exp $
+;; Keywords: emulation, compatibility
+
+;; This file is part of emu.
+
+;; 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 GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
;;; Code:
;;; @ text property
;; Copyright (C) 1996 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: emu-e20.el,v 6.0 1996/11/07 20:06:52 morioka Exp $
+;; Version: $Id: emu-e20.el,v 7.0 1996/11/27 13:40:42 morioka Exp $
;; Keywords: emulation, compatibility, Mule
;; This file is part of tl (Tiny Library).
(require 'emu-19)
-(defun fontset-pixel-height (fontset)
+(defun fontset-pixel-size (fontset)
(require 'cl)
(let* ((info (fontset-info fontset))
(height (aref info 1))
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Version:
-;; $Id: emu-xemacs.el,v 7.12 1996/11/15 14:02:56 morioka Exp $
+;; $Id: emu-xemacs.el,v 7.14 1996/11/28 18:18:49 morioka Exp $
;; Keywords: emulation, compatibility, XEmacs
;; This file is part of emu.
;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: emu.el,v 7.34 1996/09/23 17:42:26 morioka Exp $
-;; Keywords: emulation, compatibility, NEmacs, MULE, XEmacs
+;; Version: $Id: emu.el,v 7.37 1996/11/29 21:22:25 shuhei-k Exp $
+;; Keywords: emulation, compatibility, NEmacs, MULE, Emacs/mule, XEmacs
-;; This file is part of tl (Tiny Library).
+;; This file is part of emu.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;;; Code:
+(defmacro defun-maybe (name &rest everything-else)
+ (or (and (fboundp name)
+ (not (get name 'defun-maybe))
+ )
+ (` (or (fboundp (quote (, name)))
+ (progn
+ (defun (, name) (,@ everything-else))
+ (put (quote (, name)) 'defun-maybe t)
+ ))
+ )))
+
+(put 'defun-maybe 'lisp-indent-function 'defun)
+
+
(or (boundp 'emacs-major-version)
(defconst emacs-major-version (string-to-int emacs-version)))
(or (boundp 'emacs-minor-version)
(defvar path-separator ":"
"Character used to separate concatenated paths.")
-(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.
+(defun-maybe buffer-substring-no-properties (beg end)
+ "Return the text from BEG to END, without text properties, as a string.
\[emu.el; EMACS 19.29 emulating function]"
- (let ((string (buffer-substring beg end)))
- (tl:set-text-properties 0 (length string) nil string)
- string))
- )
+ (let ((string (buffer-substring beg end)))
+ (tl:set-text-properties 0 (length string) nil string)
+ string))
+
+(defun-maybe match-string (num &optional string)
+ "Return string of text matched by last search.
+NUM specifies which parenthesized expression in the last regexp.
+ Value is nil if NUMth pair didn't match, or there were less than NUM pairs.
+Zero means the entire text matched by the whole regexp or whole string.
+STRING should be given if the last search was by `string-match' on STRING.
+\[emu.el; EMACS 19.29 emulating function]"
+ (if (match-beginning num)
+ (if string
+ (substring string (match-beginning num) (match-end num))
+ (buffer-substring (match-beginning num) (match-end num)))))
(or running-emacs-19_29-or-later
running-xemacs
)
))
-(or (fboundp 'add-to-list)
- ;; This function was imported Emacs 19.30.
- (defun add-to-list (list-var element)
- "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet.
+;; This function was imported Emacs 19.30.
+(defun-maybe add-to-list (list-var element)
+ "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet.
If you want to use `add-to-list' on a variable that is not defined
until a certain package is loaded, you should put the call to `add-to-list'
into a hook function that will be run only after loading the package.
\[emu.el; EMACS 19.30 emulating function]"
- (or (member element (symbol-value list-var))
- (set list-var (cons element (symbol-value list-var)))))
- )
+ (or (member element (symbol-value list-var))
+ (set list-var (cons element (symbol-value list-var)))
+ ))
;;; @ EMACS 19.30 emulation
;;; @ EMACS 19.31 emulation
;;;
-(or (fboundp 'buffer-live-p)
- (defun buffer-live-p (object)
- "Return non-nil if OBJECT is a buffer which has not been killed.
+(defun-maybe buffer-live-p (object)
+ "Return non-nil if OBJECT is a buffer which has not been killed.
Value is nil if OBJECT is not a buffer or if it has been killed.
\[emu.el; EMACS 19.31 emulating function]"
- (and object
- (get-buffer object)
- (buffer-name (get-buffer object))
- ))
- )
+ (and object
+ (get-buffer object)
+ (buffer-name (get-buffer object))
+ ))
(or (fboundp 'save-selected-window)
;; This function was imported Emacs 19.33.
;;; @ XEmacs emulation
;;;
-(or (fboundp 'functionp)
- (defun functionp (obj)
- "Returns t if OBJ is a function, nil otherwise.
+(defun-maybe 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))
- ))
- )
-
+ (or (subrp obj)
+ (byte-code-function-p obj)
+ (and (symbolp obj)(fboundp obj))
+ (and (consp obj)(eq (car obj) 'lambda))
+ ))
+
;;; @ for XEmacs 20
;;;
-;;;
;;; richtext.el -- read and save files in text/richtext format
-;;;
-;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1995 MORIOKA Tomohiko
-;;;
-;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Created: 1995/7/15
-;;; Version:
-;;; $Id: richtext.el,v 3.0 1995/11/22 11:36:06 morioka Exp $
-;;; Keywords: wp, faces, MIME, multimedia
-;;;
-;;; This file is part of GNU Emacs.
-;;;
-;;; GNU Emacs 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.
-;;;
-;;; GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to
-;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Created: 1995/7/15
+;; Version: $Id: richtext.el,v 3.3 1996/11/28 19:26:19 morioka Exp $
+;; Keywords: wp, faces, MIME, multimedia
+
+;; This file is not part of GNU Emacs yet.
+
+;; 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 GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
(require 'enriched)
(narrow-to-region from to)
(goto-char from)
(let ((file-width (enriched-get-file-width))
- (use-hard-newlines t) pc nc)
+ (use-hard-newlines t))
(enriched-remove-header)
(goto-char from)
;;;
(provide 'richtext)
+
+;;; richtext.el ends here