From 64f5c40cdfc5baff640475bfae8bf1cd2589dc29 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 9 Mar 1998 17:42:04 +0000 Subject: [PATCH] tm 7.52.2. --- ChangeLog | 46 ++++++++++++++++++++++++++++++++++++++++++++++ emu-18.el | 2 +- emu-19.el | 4 +++- emu-mule.el | 4 +++- emu-nemacs.el | 30 +++++++++++++++++++++--------- emu-xemacs.el | 9 ++++++++- emu.el | 15 ++++++++++++++- 7 files changed, 96 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4659da9..3ff5a0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,49 @@ +Thu Apr 25 12:08:33 1996 MORIOKA Tomohiko + + * tl: Version 7.19.3 was released. + +Wed Apr 24 15:27:17 1996 MORIOKA Tomohiko + + * emu-orig.el (sref): New alias. + + * emu-mule.el (char-charset): New alias. + +Wed Apr 24 13:46:56 1996 MORIOKA Tomohiko + + * emu-nemacs.el, emu-orig.el: Function `char-leading-char' was + renamed to `char-charset'; `char-leading-char' became alias of + function `char-charset'. + + * tl-str.el (replace-char-by-char): abolished. + + * emu-nemacs.el (sref): fixed. + + * emu-nemacs.el (string-to-int-list): moved from emu-18.el. + + * emu-18.el (string-to-int-list): moved to emu-nemacs.el. + + * emu-xemacs.el, emu-19.el (string-to-int-list): fixed to define. + + * emu-18.el (string-to-int-list): fixed. + +Wed Apr 24 00:57:07 1996 MORIOKA Tomohiko + + * mu-replace.el: defvar for global variables. + + * tl-misc.el (get-latest-path): New implementation. + +Wed Apr 24 00:16:45 1996 MORIOKA Tomohiko + + * tl-str.el (filename-special-char-range): use function `char-int' + and `string-to-int-list'. + + * emu-xemacs.el, emu-19.el, emu-18.el (string-to-int-list): + New function. + + * emu.el (char-int): New function. + (int-char): New function. + + Sat Apr 20 13:10:42 1996 MORIOKA Tomohiko * tl: Version 7.19.2 was released. diff --git a/emu-18.el b/emu-18.el index b9df350..9fc84b2 100644 --- a/emu-18.el +++ b/emu-18.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: emu-18.el,v 7.10 1996/04/11 01:04:34 morioka Exp $ +;;; $Id: emu-18.el,v 7.13 1996/04/24 12:04:27 morioka Exp $ ;;; Keywords: emulation, compatibility ;;; ;;; This file is part of tl (Tiny Library). diff --git a/emu-19.el b/emu-19.el index 1f9d089..9f9ac3c 100644 --- a/emu-19.el +++ b/emu-19.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: emu-19.el,v 7.1 1996/04/11 01:05:34 morioka Exp $ +;;; $Id: emu-19.el,v 7.3 1996/04/24 11:57:52 morioka Exp $ ;;; Keywords: emulation, compatibility ;;; ;;; This file is part of tl (Tiny Library). @@ -55,6 +55,8 @@ "") )) +(fset 'string-to-int-list 'string-to-char-list) + ;;; @ end ;;; diff --git a/emu-mule.el b/emu-mule.el index 02528b3..a9be584 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: emu-mule.el,v 7.2 1996/04/17 15:17:24 morioka Exp $ +;;; $Id: emu-mule.el,v 7.3 1996/04/24 13:48:31 morioka Exp $ ;;; Keywords: emulation, compatibility, Mule ;;; ;;; This file is part of tl (Tiny Library). @@ -45,6 +45,8 @@ whose return value applied function PRED is not nil. ;;; @ leading-character ;;; +(defalias 'char-charset 'char-leading-char) + (defun get-lc (chr) "Return leading character of CHAR or LEADING-CHARACTER." (if (< chr 128) diff --git a/emu-nemacs.el b/emu-nemacs.el index 4097331..af80db9 100644 --- a/emu-nemacs.el +++ b/emu-nemacs.el @@ -7,7 +7,7 @@ ;;; Author: MORIOKA Tomohiko ;;; modified by KOBAYASHI Shuhei ;;; Version: -;;; $Id: emu-nemacs.el,v 7.9 1996/04/17 15:14:17 morioka Exp $ +;;; $Id: emu-nemacs.el,v 7.12 1996/04/24 13:45:09 morioka Exp $ ;;; Keywords: emulation, compatibility, NEmacs, Mule ;;; ;;; This file is part of tl (Tiny Library). @@ -37,14 +37,15 @@ (defconst lc-ascii 0) (defconst lc-jp 146) -(defun char-leading-char (chr) - "Return leading character of CHAR. -\[emu-nemacs.el; Mule emulating function]" +(defun char-charset (chr) + "Return the character set of char CHR. +\[emu-nemacs.el; XEmacs 20 emulating function]" (if (< chr 128) lc-ascii lc-jp)) -(defalias 'get-lc 'char-leading-char) +(defalias 'char-leading-char 'char-charset) +(defalias 'get-lc 'char-charset) ;;; @ coding-system @@ -74,7 +75,7 @@ else returns nil. [emu-nemacs.el; Mule emulating function]" (defun code-detect-region (start end) "Detect coding-system of the text in the region between START and END. -\[emu-orig.el; Mule emulating function]" +\[emu-nemacs.el; Mule emulating function]" (if (save-excursion (save-restriction (narrow-to-region start end) @@ -94,19 +95,28 @@ else returns nil. [emu-nemacs.el; Mule emulating function]" (defun char-bytes (chr) "Return number of bytes CHAR will occupy in a buffer. -\[Mule compatible function in tm-nemacs]" +\[emu-nemacs.el; Mule emulating function]" (if (< chr 128) 1 2)) (defun char-width (chr) "Return number of columns CHAR will occupy when displayed. -\[Mule compatible function in tm-nemacs]" +\[emu-nemacs.el; Mule emulating function]" (if (< chr 128) 1 2)) (defun string-width (str) "Return number of columns STRING will occupy. -\[Mule compatible function in tm-nemacs]" +\[emu-nemacs.el; Mule emulating function]" (length str)) +(defun sref (str idx) + "Return the character in STR at index IDX. +\[emu-nemacs.el; Mule emulating function]" + (let ((chr (aref str idx))) + (if (< chr 128) + chr + (logior (lsh (aref str (1+ idx)) 8) chr) + ))) + (defun string-to-char-list (str) (let ((i 0)(len (length str)) dest chr) (while (< i len) @@ -121,6 +131,8 @@ else returns nil. [emu-nemacs.el; Mule emulating function]" (reverse dest) )) +(fset 'string-to-int-list (symbol-function 'string-to-char-list)) + (defun find-charset-string (str) "Return a list of leading-chars in the string. \[emu-nemacs.el; Mule emulating function]" diff --git a/emu-xemacs.el b/emu-xemacs.el index bc94124..6c0ca6d 100644 --- a/emu-xemacs.el +++ b/emu-xemacs.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: emu-xemacs.el,v 7.2 1996/04/11 01:05:58 morioka Exp $ +;;; $Id: emu-xemacs.el,v 7.4 1996/04/24 11:58:31 morioka Exp $ ;;; Keywords: emulation, compatibility, XEmacs ;;; ;;; This file is part of tl (Tiny Library). @@ -96,6 +96,13 @@ "Convert list of character CHAR-LIST to string. [emu-xemacs.el]" `(mapconcat #'char-to-string ,char-list "")) +(if running-xemacs-20 + (defun string-to-int-list (str) + (mapcar #'char-int str) + ) + (fset 'string-to-int-list 'string-to-char-list) + ) + ;;; @ end ;;; diff --git a/emu.el b/emu.el index 1142e7b..7af8d70 100644 --- a/emu.el +++ b/emu.el @@ -7,7 +7,7 @@ ;;; Author: MORIOKA Tomohiko ;;; modified by Shuhei KOBAYASHI ;;; Version: -;;; $Id: emu.el,v 7.7 1996/04/17 15:18:54 morioka Exp $ +;;; $Id: emu.el,v 7.8 1996/04/24 00:13:31 morioka Exp $ ;;; Keywords: emulation, compatibility, NEmacs, Mule, XEmacs ;;; ;;; This file is part of tl (Tiny Library). @@ -33,6 +33,8 @@ (defvar running-emacs-18 (<= emacs-major-version 18)) (defvar running-xemacs (string-match "XEmacs" emacs-version)) +(defvar running-xemacs-20 (and running-xemacs + (>= emacs-major-version 20))) (defvar running-emacs-19 (and (not running-xemacs) (= emacs-major-version 19))) (defvar running-emacs-19_29-or-later @@ -83,6 +85,17 @@ ) +;;; @ for XEmacs 20 +;;; + +(or (fboundp 'char-int) + (fset 'char-int (symbol-function 'identity)) + ) +(or (fboundp 'int-char) + (fset 'int-char (symbol-function 'identity)) + ) + + ;;; @ end ;;; -- 1.7.10.4