Skip to content
Browse files

tm 7.79.

  • Loading branch information...
1 parent 224e1da commit 246285c72e1f185f1b6a055e6e462a6422f4252e morioka committed Mar 9, 1998
Showing with 666 additions and 151 deletions.
  1. +222 −0 ChangeLog
  2. +25 −27 emu-18.el
  3. +39 −27 emu-e19.el
  4. +40 −33 emu-mule.el
  5. +33 −27 emu-nemacs.el
  6. +39 −37 emu.el
  7. +140 −0 file-detect.el
  8. +128 −0 install.el
View
222 ChangeLog
@@ -1,3 +1,225 @@
+Fri Aug 23 07:28:37 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl: Version 7.48 was released.
+
+Thu Aug 22 16:21:21 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * emu-mule.el (set-process-input-coding-system): New alias.
+
+Wed Aug 21 12:08:41 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * install.el (install-elisp-module, install-elisp-modules): New
+ function.
+
+ * file-detect.el (module-installed-p): New function.
+
+Mon Aug 19 17:38:23 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * install.el (install-files): New argument `overwrite'.
+
+ * install.el (install-overwritten-file-modes): New variable.
+
+ (install-file): Use variable `install-overwritten-file-modes'.
+
+ * install.el (install-file, install-files): New function.
+
+ * emu-mule.el (charsets-mime-charset-alist): add iso-2022-int-1 as
+ the largest MIME charset.
+
+Sun Aug 18 20:38:49 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * TL-ELS (tl-modules): Changed to list of symbols.
+
+ * mk-tl (compile-tl): Use function `compile-elisp-modules'.
+
+ * mk-tl: tl-els was renamed to TL-ELS.
+
+ * install.el: Initial revision
+
+ * emu-mule.el (charsets-mime-charset-alist): add lc-roman and
+ lc-jpold to iso-2022-jp, iso-2022-jp-2 and iso-2022-int-1.
+
+ * emu-18.el (buffer-undo-list): define default variable as nil.
+
+ * tl-list.el (put-alist): New implementation.
+
+ * tl-list.el (put-alist): Use `setcdr' instead of `rplacd'.
+
+Sun Aug 18 08:10:43 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el (set-alist): New implementation.
+
+ * tl-list.el (put-alist): DOC-string was modified.
+
+Sun Aug 18 07:30:38 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * emu.el: Alias `tl:read-string' was abolished.
+
+Sun Aug 18 07:29:06 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * mu-cite.el (mu-cite/get-prefix-register-verbose-method): Use
+ `read-string' instead of `tl:read-string'.
+
+ * mu-cite.el (mu-cite/get-prefix-register-method): Use
+ `read-string' instead of `tl:read-string'.
+
+ * mu-bbdb.el (mu-cite/get-bbdb-prefix-register-method): Use
+ `read-string' instead of `tl:read-string'.
+
+ (mu-cite/get-bbdb-prefix-register-verbose-method): Use
+ `read-string' instead of `tl:read-string'.
+
+ * emu.el: Redefine `read-string' for EMACS 19.28 or earlier.
+
+Sun Aug 18 06:39:40 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * emu-nemacs.el (decode-coding-string): New function.
+
+Sat Aug 17 03:25:51 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * emu-e19.el (mime-charset-to-coding-system): New function.
+
+ * emu-e19.el (decode-coding-string): New function.
+
+ * emu-mule.el: Function `character-decode-string' was renamed to
+ `decode-coding-string'.
+
+Fri Aug 16 06:06:40 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-seq.el: comment was modified.
+
+Fri Aug 16 06:05:21 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-seq.el: Don't autoload `position-if-not'.
+
+ * tl-seq.el: Function `position-mismatched' was abolished.
+
+ * tl-822.el (rfc822/analyze-comment): Use `string-match' instead
+ of `position-mismatched'.
+
+ * tl-822.el (rfc822/analyze-domain-literal): New implementation.
+
+ * tl-822.el (rfc822/analyze-atom): New implementation.
+
+ * tl-822.el (rfc822/analyze-spaces): New implementation.
+
+Fri Aug 16 05:02:08 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-seq.el: require file-detect.
+
+Fri Aug 16 04:59:13 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * genjis.el: Use function `find-if' instead of `some-element'.
+
+ * tl-seq.el: Function `some-element' was abolished.
+
+Fri Aug 16 04:36:45 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * file-detect.el (add-path): moved from tl-misc.el.
+
+ * tl-misc.el: Function `add-path' was moved to file-detect.el.
+
+Fri Aug 16 04:32:46 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * file-detect.el (get-latest-path): moved from tl-misc.el.
+
+ * tl-misc.el: Function `get-latest-path' was moved to
+ file-detect.el.
+
+Fri Aug 16 04:27:54 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-misc.el, tl-seq.el, tl-els, file-detect.el: module.el was
+ renamed to file-detect.el.
+
+Fri Aug 16 04:06:42 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-seq.el, tl-misc.el, tl-els, module.el: install.el was renamed
+ to module.el.
+
+Fri Aug 16 03:27:50 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-seq.el: Use `file-installed-p'.
+
+Fri Aug 16 03:09:15 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-seq.el: Don't use cl.el if cl-seq.el is not found.
+
+Fri Aug 16 03:00:43 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-els: Add install.el.
+
+ * install.el: Initial revision
+
+ * tl-misc.el: Function `file-installed-p' was moved to install.el.
+
+Fri Aug 16 02:04:24 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-els: Add range.el.
+
+Fri Aug 16 02:02:55 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * range.el: New module.
+
+ * tl-list.el: Range functions were moved to range.el.
+
+ * tl-list.el: Don't use cl.el for EMACS 18.
+
+Wed Aug 14 23:11:07 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-seq.el: Use cl.el; Don't define function `find' if it is
+ already exist.
+
+Wed Aug 14 02:32:13 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el: `(autoload 'last "cl")' instead of `(require 'cl)'.
+
+Wed Aug 14 02:15:12 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-str.el (replace-space-with-underline): fixed problem in
+ XEmacs 20.
+
+Wed Aug 14 01:19:22 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el (map-union): Use `nreverse' instead of `reverse'.
+
+ * tl-list.el (index): Use `nreverse' instead of `reverse'.
+
+Wed Aug 14 01:01:06 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el (permute): Use `nconc'.
+
+Wed Aug 14 00:53:35 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el (every-combination): Use `nreverse' instead of
+ `reverse'.
+
+Wed Aug 14 00:47:47 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el (except-nth): New implementation.
+
+ * tl-list.el (nexcept-nth): New function.
+
+Wed Aug 14 00:24:14 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el (nnth-prev): New function.
+ (nth-prev): New implementation.
+
+Tue Aug 13 23:55:20 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el: Function `butlast' and `nbutlast' were abolished;
+ Use cl.el.
+
+Tue Aug 13 23:46:50 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * tl-list.el: Function `last' was abolished.
+
+ * tl-list.el: Function `subsetp' was abolished.
+
+ * tl-list.el: Function `cadr' was abolished.
+
+ * tl-list.el: Function `caar' was abolished.
+
+
Tue Aug 6 12:18:37 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* tl: Version 7.44 was released.
View
52 emu-18.el
@@ -1,36 +1,34 @@
-;;;
;;; emu-18.el --- Emacs 19.* emulation module for Emacs 18.*
-;;;
-;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1994 .. 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.
-;;;
+
+;; 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 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; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
;;; Code:
;;; @ for EMACS 18.55
;;;
-(defvar buffer-undo-list)
+(defvar buffer-undo-list nil)
;;; @ hook
View
66 emu-e19.el
@@ -1,30 +1,29 @@
-;;;
-;;; emu-e19.el --- Mule 2 emulation module for Emacs 19 and XEmacs 19
-;;;
-;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko
-;;;
-;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version:
-;;; $Id$
-;;; Keywords: emulation, compatibility, Mule, Latin-1
-;;;
-;;; 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-e19.el --- emu module for Emacs 19 and XEmacs 19
+
+;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Version:
+;; $Id$
+;; Keywords: emulation, compatibility, mule, Latin-1
+
+;; 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; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
;;; Code:
;;; @ version and variant specific features
@@ -111,6 +110,11 @@ to TARGET. On successful conversion returns t,
else returns nil. [emu-e19.el; Mule emulating function]"
t)
+(defun decode-coding-string (string coding-system)
+ "Decode the STRING which is encoded in CODING-SYSTEM.
+\[emu-e19.el]"
+ string)
+
(defun code-detect-region (beg end)
"Detect coding-system of the text in the region
between START and END. [emu-e19.el; Mule emulating function]"
@@ -133,6 +137,14 @@ between START and END. [emu-e19.el; Mule emulating function]"
(defvar default-mime-charset 'iso-8859-1)
+(defun mime-charset-to-coding-system (charset)
+ (if (stringp charset)
+ (setq charset (intern (downcase charset)))
+ )
+ (and (memq charset (list 'us-ascii default-mime-charset))
+ charset)
+ )
+
(defun detect-mime-charset-region (start end)
"Return MIME charset for region between START and END.
\[emu-e19.el]"
View
73 emu-mule.el
@@ -1,30 +1,29 @@
-;;;
;;; emu-mule.el --- Mule 2.* emulation module for Mule
-;;;
-;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1994 .. 1996 MORIOKA Tomohiko
-;;;
-;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; Version:
-;;; $Id$
-;;; Keywords: emulation, compatibility, Mule
-;;;
-;;; 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.
-;;;
+
+;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Version:
+;; $Id$
+;; Keywords: emulation, compatibility, Mule
+
+;; 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; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
;;; Code:
;;; @ version specific features
@@ -69,7 +68,7 @@
;;; @ coding system
;;;
-(defun character-decode-string (str coding-system)
+(defun decode-coding-string (str coding-system)
"Decode the string STR which is encoded in CODING-SYSTEM.
\[emu-mule.el]"
(let ((len (length str))
@@ -95,6 +94,8 @@
(,@ body)
)))
+(defalias 'set-process-input-coding-system 'set-process-coding-system)
+
;;; @ MIME charset
;;;
@@ -112,13 +113,19 @@
(cons (list lc-ascii lc-grk) 'iso-8859-7)
(cons (list lc-ascii lc-hbw) 'iso-8859-8)
(cons (list lc-ascii lc-ltn5) 'iso-8859-9)
- (cons (list lc-ascii lc-jp) 'iso-2022-jp)
+ (cons (list lc-ascii lc-roman lc-jpold lc-jp) 'iso-2022-jp)
(cons (list lc-ascii lc-kr) 'euc-kr)
(cons (list lc-ascii lc-big5-1 lc-big5-2) 'big5)
- (cons (list lc-ascii lc-cn lc-jp lc-kr lc-jp2
- lc-ltn1 lc-grk) 'iso-2022-jp-2)
- (cons (list lc-ascii lc-cn lc-jp lc-kr lc-jp2
- lc-cns1 lc-cns2 lc-ltn1 lc-grk) 'iso-2022-int-1)
+ (cons (list lc-ascii lc-roman lc-ltn1 lc-grk
+ lc-jpold lc-cn lc-jp lc-kr lc-jp2) 'iso-2022-jp-2)
+ (cons (list lc-ascii lc-roman lc-ltn1 lc-grk
+ lc-jpold lc-cn lc-jp lc-kr lc-jp2
+ lc-cns1 lc-cns2) 'iso-2022-int-1)
+ (cons (list lc-ascii lc-roman
+ lc-ltn1 lc-ltn2 lc-crl lc-grk
+ lc-jpold lc-cn lc-jp lc-kr lc-jp2
+ lc-cns1 lc-cns2 lc-cns3 lc-cns4
+ lc-cns5 lc-cns6 lc-cns7) 'iso-2022-int-1)
))
(defvar default-mime-charset 'x-ctext)
@@ -176,7 +183,7 @@
"Decode the STRING which is encoded in MIME CHARSET. [emu-mule.el]"
(let ((cs (mime-charset-to-coding-system charset)))
(if cs
- (character-decode-string string cs)
+ (decode-coding-string string cs)
string)))
View
60 emu-nemacs.el
@@ -1,31 +1,29 @@
-;;;
;;; emu-nemacs.el --- Mule 2 emulation module for NEmacs
-;;;
-;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1993 .. 1996 MORIOKA Tomohiko
-;;;
-;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; modified by KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
-;;; Version:
-;;; $Id$
-;;; Keywords: emulation, compatibility, NEmacs, Mule
-;;;
-;;; 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.
-;;;
+
+;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Version:
+;; $Id$
+;; Keywords: emulation, compatibility, NEmacs, mule
+
+;; 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; 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 'emu-18)
@@ -129,6 +127,14 @@ else returns nil. [emu-nemacs.el; Mule emulating function]"
(convert-region-kanji-code beg end ic oc)
))))
+(defun decode-coding-string (string coding-system)
+ "Decode the STRING which is encoded in CODING-SYSTEM.
+\[emu-nemacs.el]"
+ (if (eq coding-system 3)
+ string
+ (convert-string-kanji-code string coding-system 3)
+ ))
+
(defun code-detect-region (start end)
"Detect coding-system of the text in the region between START and END.
\[emu-nemacs.el; Mule emulating function]"
View
76 emu.el
@@ -1,31 +1,28 @@
-;;;
;;; emu.el --- Emulation module for each Emacs variants
-;;;
-;;; Copyright (C) 1995 Free Software Foundation, Inc.
-;;; Copyright (C) 1995,1996 MORIOKA Tomohiko
-;;;
-;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;;; modified by KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>
-;;; Version:
-;;; $Id$
-;;; 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.
-;;;
+
+;; Copyright (C) 1995,1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Version: $Id$
+;; 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; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
;;; Code:
(or (boundp 'emacs-major-version)
@@ -111,16 +108,21 @@ and `default-mime-charset'. [emu.el]"
string))
)
-(cond ((or running-emacs-19_29-or-later running-xemacs)
- ;; for Emacs 19.29 or later and XEmacs
- (defalias 'tl:read-string 'read-string)
- )
- (t
- ;; for Emacs 19.28 or earlier
- (defun tl:read-string (prompt &optional initial-input history)
- (read-string prompt initial-input)
- )
- ))
+(or running-emacs-19_29-or-later
+ running-xemacs
+ ;; for Emacs 19.28 or earlier
+ (fboundp 'si:read-string)
+ (progn
+ (fset 'si:read-string (symbol-function 'read-string))
+
+ (defun read-string (prompt &optional initial-input history)
+ "Read a string from the minibuffer, prompting with string PROMPT.
+If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
+The third arg HISTORY, is dummy for compatibility. [emu.el]
+See `read-from-minibuffer' for details of HISTORY argument."
+ (si:read-string prompt initial-input)
+ )
+ ))
(or (fboundp 'add-to-list)
;; This function was imported Emacs 19.30.
View
140 file-detect.el
@@ -0,0 +1,140 @@
+;;; file-detect.el --- Emacs Lisp file detection utility
+
+;; Copyright (C) 1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Version:
+;; $Id$
+;; Keywords: install, module
+
+;; 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; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(defvar default-load-path load-path)
+
+(defun add-path (path &rest options)
+ "Add PATH to `load-path' if it exists under `default-load-path'
+directories and it does not exist in `load-path'.
+
+You can use following PATH styles:
+ load-path relative: \"PATH/\"
+ (it is searched from `defaul-load-path')
+ home directory relative: \"~/PATH/\" \"~USER/PATH/\"
+ absolute path: \"/HOO/BAR/BAZ/\"
+
+You can specify following OPTIONS:
+ 'all-paths search from `load-path'
+ instead of `default-load-path'
+ 'append add PATH to the last of `load-path'
+
+\[file-detect.el]"
+ (let ((rest (if (memq 'all-paths options)
+ load-path
+ default-load-path))
+ p)
+ (if (and (catch 'tag
+ (while rest
+ (setq p (expand-file-name path (car rest)))
+ (if (file-directory-p p)
+ (throw 'tag p)
+ )
+ (setq rest (cdr rest))
+ ))
+ (not (member p load-path))
+ )
+ (setq load-path
+ (if (memq 'append options)
+ (append load-path (list p))
+ (cons p load-path)
+ ))
+ )))
+
+(defun get-latest-path (pat &optional all-paths)
+ "Return latest directory in default-load-path
+which is matched to regexp PAT.
+If optional argument ALL-PATHS is specified,
+it is searched from all of load-path instead of default-load-path.
+\[file-detect.el]"
+ (catch 'tag
+ (let ((paths (if all-paths
+ load-path
+ default-load-path))
+ dir)
+ (while (setq dir (car paths))
+ (let ((files (sort (directory-files dir t pat t)
+ (function file-newer-than-file-p)))
+ file)
+ (while (setq file (car files))
+ (if (file-directory-p file)
+ (throw 'tag file)
+ )
+ (setq files (cdr files))
+ ))
+ (setq paths (cdr paths))
+ ))))
+
+(defun file-installed-p (file &optional paths)
+ "Return t if FILE exists in PATHS.
+If PATHS is omitted, `load-path' is used. [file-detect.el]"
+ (if (null paths)
+ (setq paths load-path)
+ )
+ (catch 'tag
+ (let (path)
+ (while paths
+ (setq path (expand-file-name file (car paths)))
+ (if (file-exists-p path)
+ (throw 'tag path)
+ )
+ (setq paths (cdr paths))
+ ))))
+
+(defun module-installed-p (module &optional paths)
+ "Return t if module is provided or exists in PATHS.
+If PATHS is omitted, `load-path' is used. [file-detect.el]"
+ (or (featurep module)
+ (let ((name (symbol-name module)))
+ (if (null paths)
+ (setq paths load-path)
+ )
+ (catch 'tag
+ (while paths
+ (let ((file (expand-file-name name (car paths))))
+ (let ((elc-file (concat file ".elc")))
+ (if (file-exists-p elc-file)
+ (throw 'tag elc-file)
+ ))
+ (let ((el-file (concat file ".el")))
+ (if (file-exists-p el-file)
+ (throw 'tag el-file)
+ ))
+ (if (file-exists-p file)
+ (throw 'tag file)
+ )
+ )
+ (setq paths (cdr paths))
+ )))))
+
+
+;;; @ end
+;;;
+
+(provide 'file-detect)
+
+;;; file-detect.el ends here
View
128 install.el
@@ -0,0 +1,128 @@
+;;; install.el --- Emacs Lisp package install utility
+
+;; Copyright (C) 1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Created: 1996/8/18
+;; Version: $Id$
+;; Keywords: install
+
+;; 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; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(defun compile-elisp-module (module &optional path every-time)
+ (setq module (expand-file-name (symbol-name module) path))
+ (let ((el-file (concat module ".el"))
+ (elc-file (concat module ".elc"))
+ )
+ (if (or every-time
+ (file-newer-than-file-p el-file elc-file))
+ (byte-compile-file el-file)
+ )
+ ))
+
+(defun compile-elisp-modules (modules &optional path every-time)
+ (mapcar (function
+ (lambda (module)
+ (compile-elisp-module module path every-time)
+ ))
+ modules))
+
+
+(defvar install-overwritten-file-modes (+ (* 64 6)(* 8 4) 4))
+
+(defun install-file (file src dest &optional move overwrite)
+ (let ((src-file (expand-file-name file src)))
+ (if (file-exists-p src-file)
+ (let ((full-path (expand-file-name file dest)))
+ (if (and (file-exists-p full-path) overwrite)
+ (set-file-modes full-path install-overwritten-file-modes)
+ )
+ (copy-file src-file full-path t t)
+ (if move
+ (catch 'tag
+ (while (file-exists-p src-file)
+ (condition-case err
+ (progn
+ (delete-file src-file)
+ (throw 'tag nil)
+ )
+ (error (princ (format "%s\n" (nth 1 err))))
+ ))))
+ (princ (format "%s -> %s\n" file dest))
+ ))
+ ))
+
+(defun install-files (files src dest &optional move overwrite)
+ (or (file-exists-p dest)
+ (make-directory dest t)
+ )
+ (mapcar (function (lambda (file)
+ (install-file file src dest move overwrite)
+ ))
+ files))
+
+(defun install-elisp-module (module src dest)
+ (let (el-file elc-file)
+ (let ((name (symbol-name module)))
+ (setq el-file (concat name ".el"))
+ (setq elc-file (concat name ".elc"))
+ )
+ (let ((src-file (expand-file-name el-file src)))
+ (if (file-exists-p src-file)
+ (let ((full-path (expand-file-name el-file dest)))
+ (if (file-exists-p full-path)
+ (set-file-modes full-path install-overwritten-file-modes)
+ )
+ (copy-file src-file full-path t t)
+ (princ (format "%s -> %s\n" el-file dest))
+ ))
+ (setq src-file (expand-file-name elc-file src))
+ (if (file-exists-p src-file)
+ (let ((full-path (expand-file-name elc-file dest)))
+ (copy-file src-file full-path t t)
+ (catch 'tag
+ (while (file-exists-p src-file)
+ (condition-case err
+ (progn
+ (delete-file src-file)
+ (throw 'tag nil)
+ )
+ (error (princ (format "%s\n" (nth 1 err))))
+ )))
+ (princ (format "%s -> %s\n" elc-file dest))
+ ))
+ )))
+
+(defun install-elisp-modules (modules src dest)
+ (or (file-exists-p dest)
+ (make-directory dest t)
+ )
+ (mapcar (function (lambda (module)
+ (install-elisp-module module src dest)
+ ))
+ modules))
+
+
+;;; @ end
+;;;
+
+(provide 'install)
+
+;;; install.el ends here

0 comments on commit 246285c

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