Skip to content

Commit

Permalink
tm 7.91.
Browse files Browse the repository at this point in the history
  • Loading branch information
morioka committed Mar 10, 1998
1 parent 65103bf commit 24f37dd
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 78 deletions.
34 changes: 34 additions & 0 deletions ChangeLog
@@ -1,3 +1,37 @@
Thu Oct 24 04:08:58 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* tl: Version 7.61.11 was released.

Wed Oct 23 06:37:13 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* emu-e20.el (charsets-mime-charset-alist): modified for
mule-19.33-delta.

* char-table.el (char-table-1): fixed typo.

Tue Oct 22 22:18:27 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* emu-e20.el (mime-charset-to-coding-system): New optional
argument for line-break-type.

Mon Oct 21 02:02:16 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* sinfo.el: for sinfo 6.1.

Sun Oct 20 00:13:58 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* emu-mule.el (mime-charset-to-coding-system):
New optional argument `lbt'.

Sat Oct 19 15:11:49 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* sinfo.el (sinfo-to-texi): fixed.

* sinfo.el: for sinfo 6.0.

* emu-x20.el: Header was modified.


Wed Oct 16 00:12:13 1996 MORIOKA Tomohiko <morioka@jaist.ac.jp>

* tl: Version 7.61.10 was released.
Expand Down
110 changes: 38 additions & 72 deletions emu-e20.el
@@ -1,4 +1,4 @@
;;; emu-e20.el --- emu API implementation for mule merged Emacs
;;; emu-e20.el --- emu API implementation for Emacs/mule (delta)

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

Expand Down Expand Up @@ -78,7 +78,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 Emacs/mule
(default-process-coding-system 'no-conversion)
)
,@ body))
Expand All @@ -96,47 +96,50 @@ in the region between START and END.
(defvar charsets-mime-charset-alist
(list
(cons (list charset-ascii) 'us-ascii)
(cons (list charset-ascii charset-latin-1) 'iso-8859-1)
(cons (list charset-ascii charset-latin-2) 'iso-8859-2)
(cons (list charset-ascii charset-latin-3) 'iso-8859-3)
(cons (list charset-ascii charset-latin-4) 'iso-8859-4)
;;;(cons (list charset-ascii charset-cyrillic) 'iso-8859-5)
(cons (list charset-ascii charset-cyrillic) 'koi8-r)
(cons (list charset-ascii charset-arabic) 'iso-8859-6)
(cons (list charset-ascii charset-greek) 'iso-8859-7)
(cons (list charset-ascii charset-hebrew) 'iso-8859-8)
(cons (list charset-ascii charset-latin-5) 'iso-8859-9)
(cons (list charset-ascii charset-latin-iso8859-1) 'iso-8859-1)
(cons (list charset-ascii charset-latin-iso8859-2) 'iso-8859-2)
(cons (list charset-ascii charset-latin-iso8859-3) 'iso-8859-3)
(cons (list charset-ascii charset-latin-iso8859-4) 'iso-8859-4)
;;;(cons (list charset-ascii
;;; charset-cyrillic-iso8859-5) 'iso-8859-5)
(cons (list charset-ascii
charset-japanese-jisx0201-roman
charset-cyrillic-iso8859-5) 'koi8-r)
(cons (list charset-ascii charset-arabic-iso8859-6) 'iso-8859-6)
(cons (list charset-ascii charset-greek-iso8859-7) 'iso-8859-7)
(cons (list charset-ascii charset-hebrew-iso8859-8) 'iso-8859-8)
(cons (list charset-ascii charset-latin-iso8859-9) 'iso-8859-9)
(cons (list charset-ascii
charset-latin-jisx0201
charset-japanese-jisx0208-1978
charset-japanese-jisx0208) 'iso-2022-jp)
(cons (list charset-ascii charset-korean-ksc5601) 'euc-kr)
(cons (list charset-ascii charset-chinese-gb2312) 'gb2312)
(cons (list charset-ascii charset-chinese-gb2312) 'cn-gb-2312)
(cons (list charset-ascii
charset-chinese-big5-1
charset-chinese-big5-2) 'big5)
(cons (list charset-ascii
charset-latin-1 charset-greek
charset-japanese-jisx0201-roman
charset-chinese-big5-2) 'cn-big5)
(cons (list charset-ascii charset-latin-iso8859-1
charset-greek-iso8859-7
charset-latin-jisx0201
charset-japanese-jisx0208-1978
charset-chinese-gb2312
charset-japanese-jisx0208
charset-korean-ksc5601
charset-japanese-jisx0212) 'iso-2022-jp-2)
(cons (list charset-ascii
charset-latin-1 charset-greek
charset-japanese-jisx0201-roman
(cons (list charset-ascii charset-latin-iso8859-1
charset-greek-iso8859-7
charset-latin-jisx0201
charset-japanese-jisx0208-1978
charset-chinese-gb2312
charset-japanese-jisx0208
charset-korean-ksc5601
charset-japanese-jisx0212
charset-chinese-cns11643-1
charset-chinese-cns11643-2) 'iso-2022-int-1)
(cons (list charset-ascii
charset-latin-1 charset-latin-2
charset-cyrillic charset-greek
charset-japanese-jisx0201-roman
(cons (list charset-ascii charset-latin-iso8859-1
charset-latin-iso8859-2
charset-cyrillic-iso8859-5
charset-greek-iso8859-7
charset-latin-jisx0201
charset-japanese-jisx0208-1978
charset-chinese-gb2312
charset-japanese-jisx0208
Expand Down Expand Up @@ -164,14 +167,19 @@ in the region between START and END.
(shift_jis . coding-system-sjis)
))

(defun mime-charset-to-coding-system (charset)
(defun mime-charset-to-coding-system (charset &optional lbt)
(if (stringp charset)
(setq charset (intern (downcase charset)))
)
(or (cdr (assq charset mime-charset-coding-system-alist))
(let ((cs (intern (concat "coding-system-" (symbol-name charset)))))
(and (coding-system-p cs) cs)
)))
(let ((cs
(or (cdr (assq charset mime-charset-coding-system-alist))
(let ((cs (intern (concat "coding-system-"
(symbol-name charset)))))
(and (coding-system-p cs) cs)
))))
(if lbt
(intern (concat (symbol-name cs) "-" (symbol-name lbt)))
cs)))

(defun detect-mime-charset-region (start end)
"Return MIME charset for region between START and END. [emu-e20.el]"
Expand Down Expand Up @@ -254,48 +262,6 @@ 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 (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 string))
(len (length string))
(from 0)
(column 0)
to-prev to ch b)
(if (>= width max-width)
(setq width max-width))
(if (>= start-column width)
""
(while (< column start-column)
(setq ch (aref string from)
column (+ column (char-width ch))
from (if (= (setq b (charset-bytes ch)) 0)
(1+ from)
(+ from b)
))
)
(if (< width max-width)
(progn
(setq to from)
(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)
(1+ to)
(+ to b)
))
)
(setq to to-prev)))
(substring string from to))))
;;;
)


;;; @ regulation
;;;
Expand Down
16 changes: 11 additions & 5 deletions emu-mule.el
Expand Up @@ -162,14 +162,20 @@
(x-shiftjis . *sjis*)
))

(defun mime-charset-to-coding-system (charset)
(defun mime-charset-to-coding-system (charset &optional lbt)
(if (stringp charset)
(setq charset (intern (downcase charset)))
)
(or (cdr (assq charset mime-charset-coding-system-alist))
(let ((cs (intern (concat "*" (symbol-name charset) "*"))))
(and (coding-system-p cs) cs)
)))
(let ((cs
(or (cdr (assq charset mime-charset-coding-system-alist))
(let ((cs (intern (concat "*" (symbol-name charset) "*"))))
(and (coding-system-p cs) cs)
))))
(if (or (null lbt)
(null cs))
cs
(intern (concat (symbol-name cs) (symbol-name lbt)))
)))

(defun detect-mime-charset-region (start end)
"Return MIME charset for region between START and END.
Expand Down
2 changes: 1 addition & 1 deletion emu-x20.el
Expand Up @@ -20,7 +20,7 @@
;; General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; along with GNU XEmacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.

Expand Down

0 comments on commit 24f37dd

Please sign in to comment.