Skip to content
Browse files

tm 7.95.

  • Loading branch information...
1 parent eb2cbf2 commit ced1e2b8b6ddbe26146719c5d34a01a4dc18872a morioka committed
Showing with 110 additions and 91 deletions.
  1. +2 −2 emu-18.el
  2. +25 −27 emu-19.el
  3. +1 −1 emu-e20.el
  4. +53 −34 emu.el
  5. +29 −27 richtext.el
View
4 emu-18.el
@@ -1,4 +1,4 @@
-;;; 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.
@@ -6,7 +6,7 @@
;; Version: $Id$
;; 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
View
52 emu-19.el
@@ -1,30 +1,28 @@
-;;;
-;;; 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$
-;;; 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$
+;; 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
View
2 emu-e20.el
@@ -30,7 +30,7 @@
(require 'emu-19)
-(defun fontset-pixel-height (fontset)
+(defun fontset-pixel-size (fontset)
(require 'cl)
(let* ((info (fontset-info fontset))
(height (aref info 1))
View
87 emu.el
@@ -4,9 +4,9 @@
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Version: $Id$
-;; Keywords: emulation, compatibility, NEmacs, MULE, XEmacs
+;; 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
@@ -25,6 +25,20 @@
;;; 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)
@@ -130,14 +144,24 @@ and `default-mime-charset'. [emu.el]"
(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
@@ -155,17 +179,16 @@ See `read-from-minibuffer' for details of HISTORY argument."
)
))
-(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
@@ -194,16 +217,14 @@ find-file-hooks, etc.
;;; @ 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.
@@ -221,17 +242,15 @@ Value is nil if OBJECT is not a buffer or if it has been killed.
;;; @ 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
;;;
View
56 richtext.el
@@ -1,30 +1,30 @@
-;;;
;;; 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$
-;;; 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$
+;; 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)
@@ -143,7 +143,7 @@ Return value is \(begin end name positive-p), or nil if none was found."
(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)
@@ -181,3 +181,5 @@ Return value is \(begin end name positive-p), or nil if none was found."
;;;
(provide 'richtext)
+
+;;; richtext.el ends here

0 comments on commit ced1e2b

Please sign in to comment.
Something went wrong with that request. Please try again.