From 07071cb2a2c5919f7b85b8cf68238d10baeca5f6 Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 10 Mar 1998 05:00:54 +0000 Subject: [PATCH] tm 7.86. --- ChangeLog | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ emu-18.el | 33 ++++++++++++++++--- emu-e19.el | 18 +++++++---- emu-e20.el | 74 +++++++++++++++++++++++++++++++++--------- emu-mule.el | 18 ++++++++--- emu-nemacs.el | 7 +++- emu-x20.el | 6 +++- emu.el | 17 ++++++++-- 8 files changed, 237 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index c18a8be..80876ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,103 @@ +Mon Sep 23 12:36:01 1996 MORIOKA Tomohiko + + * tl: Version 7.61.6 was released. + + * tl-atype.el (set-atype): new option `ignore'. + + * tl-atype.el (set-atype): option `replaced-by' was abolished. + +Sat Sep 21 20:52:12 1996 MORIOKA Tomohiko + + * emu-e20.el (mime-charset-coding-system-alist): Add `cn-big5'. + +Sat Sep 21 16:29:25 1996 MORIOKA Tomohiko + + * emu-18.el: add autoload setting for function `setenv'. + +Sat Sep 21 16:23:41 1996 MORIOKA Tomohiko + + * TL-ELS (tl-modules): add `env' if `running-emacs-18' is not nil. + +Sat Sep 21 16:16:40 1996 MORIOKA Tomohiko + + * emu-18.el (parse-colon-path): New function. + +Sat Sep 21 16:08:35 1996 MORIOKA Tomohiko + + * emu.el (path-separator): New variable. + + * emu-e20.el (mime-charset-coding-system-alist): add + `iso-2022-int-1'. + +Fri Sep 20 07:21:42 1996 MORIOKA Tomohiko + + * emu-e20.el (mime-charset-coding-system-alist): Add `hz-gb-2312' + and `cn-gb-2312'. + +Thu Sep 19 16:30:19 1996 MORIOKA Tomohiko + + * emu.el (insert-file-contents-literally): New alias for anything + older than Emacs 19.29. (cf. [os2-emacs-ja:427]) + + +Wed Sep 18 13:40:26 1996 MORIOKA Tomohiko + + * tl: Version 7.61.5 was released. + + * emu-nemacs.el, emu-e19.el (as-binary-input-file): New macro. + +Wed Sep 18 12:48:09 1996 MORIOKA Tomohiko + + * emu-e20.el (sset): changed to alias of `string-embed-string'. + +Wed Sep 18 08:55:56 1996 MORIOKA Tomohiko + + * emu-x20.el, emu-mule.el (as-binary-input-file): New macro. + +Wed Sep 18 07:39:22 1996 MORIOKA Tomohiko + + * emu-e20.el (truncate-string): `char-bytes' returns 1 for charset + and `charset-bytes' returns 0 for character. + +Tue Sep 17 08:41:36 1996 MORIOKA Tomohiko + + * emu-e20.el (as-binary-process): Use Common Lisp like quote. + + * emu-e20.el (as-binary-input-file): New macro. + + * emu-e20.el (as-binary-process): set + `default-process-coding-system' to `no-conversion'. + + * TL-ELS (tl-modules): Add bitmap, x-face-mule and smiley-mule if + running mule merged EMACS. + + * bitmap.el: modified to support mule merged EMACS. + + * emu-e20.el (sset): New function. + + * emu-e20.el (make-character): New alias. + + * cless.el (define-cless-alias): New function. + +Mon Sep 16 11:55:08 1996 MORIOKA Tomohiko + + * emu-mule.el (charset-bytes): New alias. + + * emu-e20.el (char-category): New function. + +Mon Sep 16 09:22:42 1996 MORIOKA Tomohiko + + * emu-e20.el (find-charset-string): New function. + +Mon Sep 16 09:01:33 1996 MORIOKA Tomohiko + + * emu-e20.el (find-charset-region): New function. + +Sun Sep 15 10:53:59 1996 MORIOKA Tomohiko + + * TL-ELS (tl-modules): add genjis for mule merged EMACS. + + Sun Sep 15 08:04:02 1996 MORIOKA Tomohiko * tl: Version 7.61.4 was released. diff --git a/emu-18.el b/emu-18.el index 4f40bfa..54ef37f 100644 --- a/emu-18.el +++ b/emu-18.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu-18.el,v 7.24 1996/09/15 07:50:56 morioka Exp $ +;; Version: $Id: emu-18.el,v 7.26 1996/09/21 16:29:25 morioka Exp $ ;; Keywords: emulation, compatibility ;; This file is part of tl (Tiny Library). @@ -19,12 +19,20 @@ ;; 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, +;; 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: +(autoload 'setenv "env" + "Set the value of the environment variable named VARIABLE to VALUE. +VARIABLE should be a string. VALUE is optional; if not provided or is +`nil', the environment variable VARIABLE will be removed. +This function works by modifying `process-environment'." + t) + + ;;; @ for EMACS 18.55 ;;; @@ -151,7 +159,7 @@ Associates the function with the current load file, if any. ))) -;;; @ directory +;;; @ file ;;; (defun make-directory-internal (dirname) @@ -194,6 +202,23 @@ to create parent directories if they don't exist. )) ;; Imported from files.el of EMACS 19.33. +(defun parse-colon-path (cd-path) + "Explode a colon-separated list of paths into a string list." + (and cd-path + (let (cd-prefix cd-list (cd-start 0) cd-colon) + (setq cd-path (concat cd-path path-separator)) + (while (setq cd-colon (string-match path-separator cd-path cd-start)) + (setq cd-list + (nconc cd-list + (list (if (= cd-start cd-colon) + nil + (substitute-in-file-name + (file-name-as-directory + (substring cd-path cd-start cd-colon))))))) + (setq cd-start (+ cd-colon 1))) + cd-list))) + +;; Imported from files.el of EMACS 19.33. (defun file-relative-name (filename &optional directory) "Convert FILENAME to be relative to DIRECTORY (default: default-directory)." (setq filename (expand-file-name filename) diff --git a/emu-e19.el b/emu-e19.el index 817d63f..c861349 100644 --- a/emu-e19.el +++ b/emu-e19.el @@ -3,8 +3,7 @@ ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: -;; $Id: emu-e19.el,v 7.35 1996/09/05 12:29:01 morioka Exp $ +;; Version: $Id: emu-e19.el,v 7.37 1996/09/18 13:50:09 morioka Exp $ ;; Keywords: emulation, compatibility, mule, Latin-1 ;; This file is part of tl (Tiny Library). @@ -100,22 +99,22 @@ (defun decode-coding-string (string coding-system) "Decode the STRING which is encoded in CODING-SYSTEM. -\[emu-e19.el; EMACS 20 emulating function]" +\[emu-e19.el; Emacs 20 emulating function]" string) (defun encode-coding-string (string coding-system) "Encode the STRING as CODING-SYSTEM. -\[emu-e19.el; EMACS 20 emulating function]" +\[emu-e19.el; Emacs 20 emulating function]" string) (defun decode-coding-region (start end coding-system) "Decode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-e19.el; EMACS 20 emulating function]" +\[emu-e19.el; Emacs 20 emulating function]" 0) (defun encode-coding-region (start end coding-system) "Encode the text between START and END to CODING-SYSTEM. -\[emu-e19.el; EMACS 20 emulating function]" +\[emu-e19.el; Emacs 20 emulating function]" 0) (defun code-detect-region (beg end) @@ -131,6 +130,11 @@ between START and END. [emu-e19.el; Mule emulating function]" (,@ body) ))) +(defmacro as-binary-input-file (&rest body) + (` (let ((emx-binary-mode t)) ; Stop CRLF to LF conversion in OS/2 + (,@ body) + ))) + ;;; @@ for old MULE emulation ;;; @@ -214,7 +218,7 @@ else returns nil. [emu-e19.el; old MULE emulating function]" (defun char-columns (character) "Return number of columns a CHARACTER occupies when displayed. -\[emu-nemacs.el]" +\[emu-e19.el]" 1) ;;; @@ for old MULE emulation diff --git a/emu-e20.el b/emu-e20.el index 4eb9f2d..deb733d 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 1.2 1996/09/14 07:57:51 morioka Exp $ +;; Version: $Id: emu-e20.el,v 2.6 1996/09/21 20:52:12 morioka Exp $ ;; Keywords: emulation, compatibility, MULE ;; This file is part of tl (Tiny Library). @@ -36,6 +36,19 @@ (defalias 'charset-columns 'charset-width) +(defun find-charset-string (string) + "Return a list of charsets in the STRING except ascii. +\[emu-e20.el; MULE emulating function]" + (delq charset-ascii (find-charset-in-string string)) + ) + +(defun find-charset-region (start end) + "Return a list of charsets except ascii +in the region between START and END. +\[emu-e20.el; MULE emulating function]" + (delq charset-ascii (find-charset-in-string (buffer-substring start end))) + ) + ;;; @ coding system ;;; @@ -43,12 +56,15 @@ (defconst *noconv* 'no-conversion) (defmacro as-binary-process (&rest body) - (` (let (selective-display ; Disable ^M to nl translation. - ;; Mule merged EMACS - default-process-coding-system - program-coding-system-alist) - (,@ body) - ))) + `(let (selective-display ; Disable ^M to nl translation. + ;; for mule merged EMACS + (default-process-coding-system 'no-conversion) + ) + ,@ body)) + +(defmacro as-binary-input-file (&rest body) + `(let ((coding-system-for-read 'no-conversion)) + ,@body)) (defalias 'set-process-input-coding-system 'set-process-coding-system) @@ -117,10 +133,14 @@ (defvar default-mime-charset 'x-ctext) (defvar mime-charset-coding-system-alist - '((x-ctext . coding-system-ctext) - (gb2312 . coding-system-euc-china) - (iso-2022-jp-2 . coding-system-iso-2022-ss2-7) - (shift_jis . coding-system-sjis) + '((x-ctext . coding-system-ctext) + (hz-gb-2312 . coding-system-hz) + (cn-gb-2312 . coding-system-euc-china) + (gb2312 . coding-system-euc-china) + (cn-big5 . coding-system-big5) + (iso-2022-jp-2 . coding-system-iso-2022-ss2-7) + (iso-2022-int-1 . coding-system-iso-2022-int) + (shift_jis . coding-system-sjis) )) (defun mime-charset-to-coding-system (charset) @@ -175,11 +195,28 @@ (defalias 'char-columns 'char-width) +;;; @@ Mule emulating aliases +;;; +;;; You should not use them. + +(defalias 'make-character 'make-char) + +(defun char-category (character) + "Return string of category mnemonics for CHAR in TABLE. +CHAR can be any multilingual character +TABLE defaults to the current buffer's category table. +\[emu-e20.el; MULE emulating function]" + (category-set-mnemonics (char-category-set character)) + ) + + ;;; @ string ;;; (defalias 'string-columns 'string-width) +(defalias 'sset 'string-embed-string) + (defun string-to-char-list (string) "Return a list of which elements are characters in the STRING. \[emu-e20.el; MULE 2.3 emulating function]" @@ -197,7 +234,6 @@ (defalias 'string-to-int-list 'string-to-char-list) (or (fboundp 'truncate-string) -;;; Imported from Mule-2.3 (defun truncate-string (str width &optional start-column) "Truncate STR to fit in WIDTH columns. Optional non-nil arg START-COLUMN specifies the starting column. @@ -208,7 +244,7 @@ Optional non-nil arg START-COLUMN specifies the starting column. (len (length str)) (from 0) (column 0) - to-prev to ch) + to-prev to ch b) (if (>= width max-width) (setq width max-width)) (if (>= start-column width) @@ -216,7 +252,11 @@ Optional non-nil arg START-COLUMN specifies the starting column. (while (< column start-column) (setq ch (aref str from) column (+ column (char-width ch)) - from (+ from (char-bytes ch)))) + from (if (= (setq b (charset-bytes ch)) 0) + (1+ from) + (+ from b) + )) + ) (if (< width max-width) (progn (setq to from) @@ -224,7 +264,11 @@ Optional non-nil arg START-COLUMN specifies the starting column. (setq ch (aref str to) column (+ column (char-width ch)) to-prev to - to (+ to (char-bytes ch)))) + to (if (= (setq b (charset-bytes ch)) 0) + (1+ to) + (+ to b) + )) + ) (setq to to-prev))) (substring str from to)))) ;;; diff --git a/emu-mule.el b/emu-mule.el index 9d63e5f..a0b8470 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; Version: -;; $Id: emu-mule.el,v 7.50 1996/09/05 08:58:28 morioka Exp $ +;; $Id: emu-mule.el,v 7.52 1996/09/18 08:32:56 morioka Exp $ ;; Keywords: emulation, compatibility, Mule ;; This file is part of tl (Tiny Library). @@ -59,10 +59,11 @@ ;;; @ character set ;;; -(defalias 'charset-description 'char-description) -(defalias 'charset-registry 'char-registry) -(defalias 'charset-columns 'char-width) -(defalias 'charset-direction 'char-direction) +(defalias 'charset-bytes 'char-bytes) +(defalias 'charset-description 'char-description) +(defalias 'charset-registry 'char-registry) +(defalias 'charset-columns 'char-width) +(defalias 'charset-direction 'char-direction) ;;; @ coding system @@ -100,6 +101,13 @@ (,@ body) ))) +(defmacro as-binary-input-file (&rest body) + (` (let (mc-flag + (file-coding-system-for-read *noconv*) + ) + (,@ body) + ))) + (defalias 'set-process-input-coding-system 'set-process-coding-system) diff --git a/emu-nemacs.el b/emu-nemacs.el index ebf12ae..eb306b5 100644 --- a/emu-nemacs.el +++ b/emu-nemacs.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; Version: -;; $Id: emu-nemacs.el,v 7.43 1996/09/05 13:28:51 morioka Exp $ +;; $Id: emu-nemacs.el,v 7.44 1996/09/18 13:40:26 morioka Exp $ ;; Keywords: emulation, compatibility, NEmacs, mule ;; This file is part of tl (Tiny Library). @@ -169,6 +169,11 @@ (,@ body) ))) +(defmacro as-binary-input-file (&rest body) + (` (let (kanji-flag) + (,@ body) + ))) + ;;; @@ for old MULE emulation ;;; diff --git a/emu-x20.el b/emu-x20.el index cd31b15..5b99ae0 100644 --- a/emu-x20.el +++ b/emu-x20.el @@ -4,7 +4,7 @@ ;; Copyright (C) 1994,1995,1996 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu-x20.el,v 7.35 1996/09/15 08:04:02 morioka Exp $ +;; Version: $Id: emu-x20.el,v 7.36 1996/09/18 08:55:56 morioka Exp $ ;; Keywords: emulation, compatibility, Mule, XEmacs ;; This file is part of tl (Tiny Library). @@ -98,6 +98,10 @@ in the region between START and END. process-output-coding-system) ,@body)) +(defmacro as-binary-input-file (&rest body) + `(let ((file-coding-system-for-read 'noconv)) + ,@body)) + ;;; @ MIME charset ;;; diff --git a/emu.el b/emu.el index 7f641a8..03af4f3 100644 --- a/emu.el +++ b/emu.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Id: emu.el,v 7.30 1996/09/15 07:27:12 morioka Exp $ +;; Version: $Id: emu.el,v 7.32 1996/09/21 16:08:35 morioka Exp $ ;; Keywords: emulation, compatibility, NEmacs, MULE, XEmacs ;; This file is part of tl (Tiny Library). @@ -19,8 +19,8 @@ ;; 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, +;; 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: @@ -111,6 +111,9 @@ and `default-mime-charset'. [emu.el]" ;;; @ EMACS 19.29 emulation ;;; +(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. @@ -149,6 +152,14 @@ into a hook function that will be run only after loading the package. ) +;;; @ EMACS 19.30 emulation +;;; + +(or (fboundp 'insert-file-contents-literally) + (defalias 'insert-file-contents-literally 'insert-file-contents) + ) + + ;;; @ EMACS 19.31 emulation ;;; -- 1.7.10.4