From: morioka Date: Wed, 11 Mar 1998 12:14:30 +0000 (+0000) Subject: tm 7.95. X-Git-Tag: tm-7_95~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=25c29c99728fe41b3bc7bb98eacd0dff74389ef0;p=elisp%2Fapel.git tm 7.95. --- diff --git a/emu-18.el b/emu-18.el index 517ef64..22370b9 100644 --- a/emu-18.el +++ b/emu-18.el @@ -1,12 +1,12 @@ -;;; 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 -;; 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 diff --git a/emu-19.el b/emu-19.el index 28fe92d..60dfbf5 100644 --- a/emu-19.el +++ b/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 -;;; 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 +;; 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 diff --git a/emu-e20.el b/emu-e20.el index 5f10996..f52994f 100644 --- a/emu-e20.el +++ b/emu-e20.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; 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). @@ -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)) diff --git a/emu-xemacs.el b/emu-xemacs.el index a1eb807..5f28536 100644 --- a/emu-xemacs.el +++ b/emu-xemacs.el @@ -5,7 +5,7 @@ ;; Author: MORIOKA Tomohiko ;; 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. diff --git a/emu.el b/emu.el index 3a7d971..89b1e8b 100644 --- a/emu.el +++ b/emu.el @@ -3,10 +3,10 @@ ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; 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 @@ -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 ;;; diff --git a/richtext.el b/richtext.el index 62da059..0ef10f4 100644 --- a/richtext.el +++ b/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 -;;; 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 +;; 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) @@ -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