From: morioka Date: Mon, 9 Mar 1998 18:07:48 +0000 (+0000) Subject: tm 7.59. X-Git-Tag: tm7_59~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74116756c558cf006fa942fff1f5da0dce6c597b;p=elisp%2Fapel.git tm 7.59. --- diff --git a/ChangeLog b/ChangeLog index 49a7e09..77dc611 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,82 @@ +Sat May 11 08:36:35 1996 MORIOKA Tomohiko + + * tl: Version 7.22.4 was released. + + * emu.el (add-to-list): New function for Emacs 19.28 or earlier. + +Thu May 9 16:38:20 1996 MORIOKA Tomohiko + + * emu-mule.el (fontset-pixel-size): New implementation. + +Thu May 9 15:09:00 1996 MORIOKA Tomohiko + + * emu-18.el (tl:add-text-properties): New function; moved from + emu-nemacs.el or emu-mule.el. + + * emu-mule.el, emu-nemacs.el: Function `tl:add-text-properties' + was moved to emu-18.el. + +Thu May 9 15:01:57 1996 MORIOKA Tomohiko + + * emu-18.el (remove-text-properties): New function. + + * emu-nemacs.el (character-encode-string): + Renamed from `encode-coding-string'. + (character-decode-string): Renamed from `decode-coding-string'. + +Thu May 9 14:26:27 1996 MORIOKA Tomohiko + + * emu-e19.el (character-encode-string): Renamed from + `encode-coding-string'. + (character-decode-string): Renamed from `decode-coding-string'. + +Thu May 9 14:07:02 1996 MORIOKA Tomohiko + + * emu-mule.el (character-encode-string): Renamed from + `encode-coding-string'. + (character-decode-string): Renamed from `decode-coding-string'. + +Thu May 9 13:48:25 1996 MORIOKA Tomohiko + + * emu-x20.el (character-encode-string, character-decode-string): + New alias. + + * emu-x20.el (character-encode-region, character-decode-region): + New alias. + +Thu May 9 13:22:18 1996 MORIOKA Tomohiko + + * emu-e19.el (character-encode-region): New function. + (character-decode-region): New function. + Function `encode-coding-region' and `decode-coding-region' were + abolished. + +Thu May 9 12:54:58 1996 MORIOKA Tomohiko + + * emu-mule.el (character-encode-region): New function. + (character-decode-region): New function. + Function `encode-coding-region' and `decode-coding-region' were + abolished. + +Thu May 9 12:45:03 1996 MORIOKA Tomohiko + + * emu-nemacs.el (character-encode-region): fixed for NEmacs bug? + (character-decode-region): fixed for NEmacs bug? + + * emu-nemacs.el (code-convert-region): fixed for NEmacs bug? + (character-encode-region): New function. + (character-decode-region): New function. + Function `encode-coding-region' and `decode-coding-region' were + abolished. + + +Wed May 8 13:56:30 1996 MORIOKA Tomohiko + + * tl: Version 7.22.3 was released. + + * tl-list.el (last): New implementation. + + Tue May 7 18:16:38 1996 MORIOKA Tomohiko * tl: Version 7.22.2 was released. diff --git a/Makefile b/Makefile index af391fc..f2c5a68 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ FILES = tl/README.en tl/Makefile tl/mk-tl tl/tl-els \ tl/*.el tl/*.bdf \ tl/doc/*.texi tl/ChangeLog -TARFILE = tl-7.22.2.tar +TARFILE = tl-7.22.4.tar elc: diff --git a/emu-18.el b/emu-18.el index 9fc84b2..97f0ac1 100644 --- a/emu-18.el +++ b/emu-18.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: emu-18.el,v 7.13 1996/04/24 12:04:27 morioka Exp $ +;;; $Id: emu-18.el,v 7.15 1996/05/09 15:09:00 morioka Exp $ ;;; Keywords: emulation, compatibility ;;; ;;; This file is part of tl (Tiny Library). @@ -215,7 +215,9 @@ With optional non-nil ALL, force redisplay of all mode-lines. ;;; @ text property ;;; -(defun tl:set-text-properties (start end props &optional object)) +(defun tl:set-text-properties (start end properties &optional object)) +(defun tl:add-text-properties (start end properties &optional object)) +(defun remove-text-properties (start end properties &optional object)) (defun tl:overlay-buffer (overlay)) diff --git a/emu-e19.el b/emu-e19.el index c992f6b..7a0d509 100644 --- a/emu-e19.el +++ b/emu-e19.el @@ -6,8 +6,8 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: emu-e19.el,v 7.10 1996/04/27 13:48:55 morioka Exp $ -;;; Keywords: emulation, compatibility, Mule +;;; $Id: emu-e19.el,v 7.12 1996/05/09 14:26:27 morioka Exp $ +;;; Keywords: emulation, compatibility, Mule, Latin-1 ;;; ;;; This file is part of tl (Tiny Library). ;;; @@ -69,20 +69,28 @@ (defconst *ctext* nil) (defconst *noconv* nil) -(defun code-convert-string (str ic oc) - "Convert code in STRING from SOURCE code to TARGET code, -On successful converion, returns the result string, -else returns nil. [emu-e19.el; Mule emulating function]" +(defun character-encode-string (str coding-system) + "Encode the string STR which is encoded in CODING-SYSTEM. [emu-e19.el]" str) -(defun decode-coding-string (str coding-system) - "Decode the string STR which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" +(defun character-decode-string (str coding-system) + "Decode the string STR which is encoded in CODING-SYSTEM. [emu-e19.el]" str) -(defun encode-coding-string (str coding-system) - "Encode the string STR which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" +(defun character-encode-region (start end coding-system) + "Encode the text between START and END which is +encoded in CODING-SYSTEM. [emu-e19.el]" + t) + +(defun character-decode-region (start end coding-system) + "Decode the text between START and END which is +encoded in CODING-SYSTEM. [emu-e19.el]" + t) + +(defun code-convert-string (str ic oc) + "Convert code in STRING from SOURCE code to TARGET code, +On successful converion, returns the result string, +else returns nil. [emu-e19.el; Mule emulating function]" str) (defun code-convert-region (beg end ic oc) @@ -91,19 +99,9 @@ to TARGET. On successful conversion returns t, else returns nil. [emu-e19.el; Mule emulating function]" t) -(defun decode-coding-region (start end coding-system &optional buffer) - "Decode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" - t) - -(defun encode-coding-region (start end coding-system &optional buffer) - "Encode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" - t) - (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]" + "Detect coding-system of the text in the region +between START and END. [emu-e19.el; Mule emulating function]" ) (defun set-file-coding-system (coding-system &optional force) diff --git a/emu-mule.el b/emu-mule.el index c0af990..bffee9e 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: emu-mule.el,v 7.7 1996/04/27 13:27:06 morioka Exp $ +;;; $Id: emu-mule.el,v 7.11 1996/05/09 16:38:20 morioka Exp $ ;;; Keywords: emulation, compatibility, Mule ;;; ;;; This file is part of tl (Tiny Library). @@ -36,36 +36,28 @@ ;;; @ coding system ;;; -(defun decode-coding-region (start end coding-system &optional buffer) - "Decode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" - (save-excursion - (if buffer - (set-buffer buffer) - ) - (code-convert start end coding-system *internal*) - )) - -(defun encode-coding-region (start end coding-system &optional buffer) - "Encode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" - (save-excursion - (if buffer - (set-buffer buffer) - ) - (code-convert start end *internal* coding-system) - )) - -(defun decode-coding-string (str coding-system) +(defun character-encode-string (str coding-system) + "Encode the string STR which is encoded in CODING-SYSTEM. +\[emu-mule.el]" + (code-convert-string str *internal* coding-system) + ) + +(defun character-decode-string (str coding-system) "Decode the string STR which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" +\[emu-mule.el]" (code-convert-string str coding-system *internal*) ) -(defun encode-coding-string (str coding-system) - "Encode the string STR which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" - (code-convert-string str *internal* coding-system) +(defun character-encode-region (start end coding-system) + "Encode the text between START and END which is +encoded in CODING-SYSTEM. [emu-mule.el]" + (code-convert start end *internal* coding-system) + ) + +(defun character-decode-region (start end coding-system) + "Decode the text between START and END which is +encoded in CODING-SYSTEM. [emu-mule.el]" + (code-convert start end coding-system *internal*) ) @@ -75,30 +67,27 @@ (cond (running-emacs-19 (require 'emu-19) + ;; Suggested by SASAKI Osamu + ;; (cf. [os2-emacs-ja:78]) (defun fontset-pixel-size (fontset) - (let* ((fonts (cdr (get-fontset-info fontset))) - (font - (let ((i 0) - (len (length fonts)) - n) - (catch 'tag - (while (< i len) - (setq n (aref fonts i)) - (if (/= n -1) - (throw 'tag n) - ) - (setq i (1+ i)) - )))) - ) - (if font - (aref (get-font-info font) 5) + (let* ((font (get-font-info + (aref (cdr (get-fontset-info fontset)) 0))) + (open (aref font 4))) + (if (= open 1) + (aref font 5) + (if (= open 0) + (let ((pat (aref font 1))) + (if (string-match "-[0-9]+-" pat) + (string-to-number + (substring + pat (1+ (match-beginning 0)) (1- (match-end 0)))) + 0))) ))) ) (running-emacs-18 (require 'emu-18) (defun tl:make-overlay (beg end &optional buffer type)) (defun tl:overlay-put (overlay prop value)) - (defun tl:add-text-properties (start end properties &optional object)) )) diff --git a/emu-nemacs.el b/emu-nemacs.el index a34a110..f12efec 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.15 1996/04/27 13:36:32 morioka Exp $ +;;; $Id: emu-nemacs.el,v 7.19 1996/05/09 15:06:53 morioka Exp $ ;;; Keywords: emulation, compatibility, NEmacs, Mule ;;; ;;; This file is part of tl (Tiny Library). @@ -57,6 +57,34 @@ (defconst *internal* 3) (defconst *euc-japan* 3) +(defun character-encode-string (str coding-system) + "Encode the string STR which is encoded in CODING-SYSTEM. [emu-nemacs.el]" + (convert-string-kanji-code str 3 coding-system) + ) + +(defun character-decode-string (str coding-system) + "Decode the string STR which is encoded in CODING-SYSTEM. [emu-nemacs.el]" + (convert-string-kanji-code str coding-system 3) + ) + +(defun character-encode-region (start end coding-system) + "Encode the text between START and END which is +encoded in CODING-SYSTEM. [emu-nemacs.el]" + (save-excursion + (save-restriction + (narrow-to-region beg end) + (convert-region-kanji-code start end 3 coding-system) + ))) + +(defun character-decode-region (start end coding-system) + "Decode the text between START and END which is +encoded in CODING-SYSTEM. [emu-nemacs.el]" + (save-excursion + (save-restriction + (narrow-to-region beg end) + (convert-region-kanji-code start end coding-system 3) + ))) + (defun code-convert-string (str ic oc) "Convert code in STRING from SOURCE code to TARGET code, On successful converion, returns the result string, @@ -65,45 +93,16 @@ else returns nil. [emu-nemacs.el; Mule emulating function]" (convert-string-kanji-code str ic oc) str)) -(defun decode-coding-string (str coding-system) - "Decode the string STR which is encoded in CODING-SYSTEM. -\[emu-nemacs.el; XEmacs 20 emulating function]" - (convert-string-kanji-code str coding-system 3) - ) - -(defun encode-coding-string (str coding-system) - "Encode the string STR which is encoded in CODING-SYSTEM. -\[emu-nemacs.el; XEmacs 20 emulating function]" - (convert-string-kanji-code str 3 coding-system) - ) - (defun code-convert-region (beg end ic oc) "Convert code of the text between BEGIN and END from SOURCE to TARGET. On successful conversion returns t, else returns nil. [emu-nemacs.el; Mule emulating function]" - (if (not (eq ic oc)) - (convert-region-kanji-code beg end ic oc) - )) - -(defun decode-coding-region (start end coding-system &optional buffer) - "Decode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-nemacs.el; XEmacs 20 emulating function]" - (save-excursion - (if buffer - (set-buffer buffer) - ) - (convert-region-kanji-code start end coding-system 3) - )) - -(defun encode-coding-region (start end coding-system &optional buffer) - "Encode the text between START and END which is encoded in CODING-SYSTEM. -\[emu-mule.el; XEmacs 20 emulating function]" - (save-excursion - (if buffer - (set-buffer buffer) - ) - (convert-region-kanji-code start end 3 coding-system) - )) + (if (/= ic oc) + (save-excursion + (save-restriction + (narrow-to-region beg end) + (convert-region-kanji-code beg end ic oc) + )))) (defun code-detect-region (start end) "Detect coding-system of the text in the region between START and END. @@ -288,8 +287,6 @@ Optional non-nil arg START-COLUMN specifies the starting column. (car overlay)(cdr overlay)) ))) -(defun tl:add-text-properties (start end properties &optional object)) - ;;; @ end ;;; diff --git a/emu-x20.el b/emu-x20.el index 2fe1042..4b6b969 100644 --- a/emu-x20.el +++ b/emu-x20.el @@ -6,7 +6,7 @@ ;;; ;;; Author: MORIOKA Tomohiko ;;; Version: -;;; $Id: emu-x20.el,v 5.0 1996/05/07 18:16:38 morioka Exp $ +;;; $Id: emu-x20.el,v 7.0 1996/05/09 13:48:25 morioka Exp $ ;;; Keywords: emulation, compatibility, Mule, XEmacs ;;; ;;; This file is part of tl (Tiny Library). @@ -123,6 +123,11 @@ in the region between START and END. ;;; )) +(defalias 'character-encode-string 'encode-coding-string) +(defalias 'character-decode-string 'decode-coding-string) +(defalias 'character-encode-region 'encode-coding-region) +(defalias 'character-decode-region 'decode-coding-region) + ;;; @ character and string ;;; diff --git a/emu.el b/emu.el index e4fc7b8..6aa5ff7 100644 --- a/emu.el +++ b/emu.el @@ -7,7 +7,7 @@ ;;; Author: MORIOKA Tomohiko ;;; modified by KOBAYASHI Shuhei ;;; Version: -;;; $Id: emu.el,v 7.13 1996/05/07 17:50:26 morioka Exp $ +;;; $Id: emu.el,v 7.14 1996/05/11 08:36:35 morioka Exp $ ;;; Keywords: emulation, compatibility, NEmacs, Mule, XEmacs ;;; ;;; This file is part of tl (Tiny Library). @@ -82,6 +82,18 @@ ) )) +(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. +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))))) + ) + ;;; @ XEmacs emulation ;;;