Skip to content

Commit

Permalink
tm 7.89.
Browse files Browse the repository at this point in the history
  • Loading branch information
morioka committed Mar 10, 1998
1 parent 0fbb29b commit c3f9304
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 22 deletions.
42 changes: 42 additions & 0 deletions ChangeLog
@@ -1,3 +1,45 @@
Tue Oct 1 15:03:36 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* tl: Version 7.61.9 was released.

* bitmap.el: modified for mule-19.33-gamma.

Tue Oct 1 13:28:03 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* emu-e19.el, emu-nemacs.el, emu-mule.el
(find-non-ascii-charset-string): New alias.
(find-non-ascii-charset-region): New alias.

Tue Oct 1 13:22:13 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* emu-x20.el (find-charset-string): Changed to alias for
`charsets-in-string'.

(find-charset-region): Changed to alias for `charsets-in-region'.

(find-non-ascii-charset-string): New function.

(find-non-ascii-charset-region): New function.

Tue Oct 1 13:18:34 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* emu-e20.el (fontset-height): New function.

(find-non-ascii-charset-string): New function; renamed from
`find-charset-string'.

(find-non-ascii-charset-region): New function; renamed from
`find-charset-region'.

(detect-mime-charset-region): Use function `find-charset-string'
instead of `find-charset-in-string'.

Wed Sep 25 12:07:40 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* emu-e20.el (truncate-string): check `to' is smaller than length
of string.


Tue Sep 24 22:02:05 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* tl: Version 7.61.8 was released.
Expand Down
4 changes: 4 additions & 0 deletions emu-e19.el
Expand Up @@ -71,6 +71,8 @@
(list lc-ltn1)
))

(defalias 'find-non-ascii-charset-string 'find-charset-string)

(defun find-charset-region (start end)
"Return a list of charsets in the region between START and END.
\[emu-e19.el; Mule emulating function]"
Expand All @@ -83,6 +85,8 @@
(list lc-ltn1)
))

(defalias 'find-non-ascii-charset-region 'find-charset-region)

;;; @@ for old MULE emulation
;;;

Expand Down
56 changes: 36 additions & 20 deletions emu-e20.el
@@ -1,10 +1,10 @@
;;; emu-e20.el --- emu API implementation for mule merged EMACS
;;; emu-e20.el --- emu API implementation for mule merged Emacs

;; Copyright (C) 1996 Free Software Foundation, Inc.

;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;; Version: $Id$
;; Keywords: emulation, compatibility, MULE
;; Keywords: emulation, compatibility, Mule

;; This file is part of tl (Tiny Library).

Expand All @@ -30,23 +30,38 @@

(require 'emu-19)

(defun fontset-height (fontset)
(let* ((info (fontset-info fontset))
(height (aref info 1))
)
(if (> height 0)
height
(let ((str
(car (aref (aref info 2) 0))
))
(if (string-match "--\\([0-9]+\\)-\\*-\\*-\\*-\\*-\\*-ISO8859-1" str)
(string-to-number
(substring str (match-beginning 1)(match-end 1))
)
0)))))


;;; @ character set
;;;

(defalias 'charset-columns 'charset-width)

(defun find-charset-string (string)
(defun find-non-ascii-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))
\[emu-e20.el; Mule emulating function]"
(delq charset-ascii (find-charset-string string))
)

(defun find-charset-region (start end)
(defun find-non-ascii-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)))
\[emu-e20.el; Mule emulating function]"
(delq charset-ascii (find-charset-string (buffer-substring start end)))
)


Expand All @@ -57,7 +72,7 @@ in the region between START and END.

(defmacro as-binary-process (&rest body)
`(let (selective-display ; Disable ^M to nl translation.
;; for mule merged EMACS
;; for mule merged Emacs
(default-process-coding-system 'no-conversion)
)
,@ body))
Expand Down Expand Up @@ -155,7 +170,7 @@ in the region between START and END.
(defun detect-mime-charset-region (start end)
"Return MIME charset for region between START and END. [emu-e20.el]"
(charsets-to-mime-charset
(find-charset-in-string (buffer-substring start end))
(find-charset-string (buffer-substring start end))
))

(defun encode-mime-charset-region (start end charset)
Expand Down Expand Up @@ -205,7 +220,7 @@ in the region between START and END.
"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]"
\[emu-e20.el; Mule emulating function]"
(category-set-mnemonics (char-category-set character))
)

Expand All @@ -219,7 +234,7 @@ TABLE defaults to the current buffer's category table.

(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]"
\[emu-e20.el; Mule 2.3 emulating function]"
(let* ((len (length string))
(i 0)
l chr)
Expand All @@ -234,14 +249,14 @@ TABLE defaults to the current buffer's category table.
(defalias 'string-to-int-list 'string-to-char-list)

(or (fboundp 'truncate-string)
(defun truncate-string (str width &optional start-column)
"Truncate STR to fit in WIDTH columns.
(defun truncate-string (string width &optional start-column)
"Truncate STRING to fit in WIDTH columns.
Optional non-nil arg START-COLUMN specifies the starting column.
\[emu-e20.el; MULE 2.3 emulating function]"
(or start-column
(setq start-column 0))
(let ((max-width (string-width str))
(len (length str))
(let ((max-width (string-width string))
(len (length string))
(from 0)
(column 0)
to-prev to ch b)
Expand All @@ -250,7 +265,7 @@ Optional non-nil arg START-COLUMN specifies the starting column.
(if (>= start-column width)
""
(while (< column start-column)
(setq ch (aref str from)
(setq ch (aref string from)
column (+ column (char-width ch))
from (if (= (setq b (charset-bytes ch)) 0)
(1+ from)
Expand All @@ -260,8 +275,9 @@ Optional non-nil arg START-COLUMN specifies the starting column.
(if (< width max-width)
(progn
(setq to from)
(while (<= column width)
(setq ch (aref str to)
(while (and (<= column width)
(< to len))
(setq ch (aref string to)
column (+ column (char-width ch))
to-prev to
to (if (= (setq b (charset-bytes ch)) 0)
Expand All @@ -270,7 +286,7 @@ Optional non-nil arg START-COLUMN specifies the starting column.
))
)
(setq to to-prev)))
(substring str from to))))
(substring string from to))))
;;;
)

Expand Down
3 changes: 3 additions & 0 deletions emu-mule.el
Expand Up @@ -58,6 +58,9 @@
;;; @ character set
;;;

(defalias 'find-non-ascii-charset-string 'find-charset-string)
(defalias 'find-non-ascii-charset-region 'find-charset-region)

(defalias 'charset-bytes 'char-bytes)
(defalias 'charset-description 'char-description)
(defalias 'charset-registry 'char-registry)
Expand Down
4 changes: 4 additions & 0 deletions emu-nemacs.el
Expand Up @@ -66,6 +66,8 @@
(list lc-jp)
))

(defalias 'find-non-ascii-charset-string 'find-charset-string)

(defun find-charset-region (start end)
"Return a list of charsets in the region between START and END.
\[emu-nemacs.el; Mule emulating function]"
Expand All @@ -78,6 +80,8 @@
(list lc-jp)
))

(defalias 'find-non-ascii-charset-region 'find-charset-region)

(defun check-ASCII-string (str)
(let ((i 0)
len)
Expand Down
7 changes: 5 additions & 2 deletions emu-x20.el
Expand Up @@ -41,13 +41,16 @@

(defalias 'charset-description 'charset-doc-string)

(defun find-charset-string (string)
(defalias 'find-charset-string 'charsets-in-string)
(defalias 'find-charset-region 'charsets-in-region)

(defun find-non-ascii-charset-string (string)
"Return a list of charsets in the STRING except ascii.
\[emu-x20.el; Mule emulating function]"
(delq 'ascii (charsets-in-string string))
)

(defun find-charset-region (start end)
(defun find-non-ascii-charset-region (start end)
"Return a list of charsets except ascii
in the region between START and END.
\[emu-x20.el; Mule emulating function]"
Expand Down

0 comments on commit c3f9304

Please sign in to comment.