;;;
-;;; $Id: tm-nemacs.el,v 4.4 1994/08/01 05:09:00 morioka Exp $
+;;; $Id: tm-nemacs.el,v 5.1 1994/10/26 15:08:12 morioka Exp $
;;;
(provide 'tm-nemacs)
(require 'tl-18)
-
-;;; @ constants
-;;;
-(defconst *junet* 2)
-(defconst *internal* 3)
-(defconst *euc-japan* 3)
-
-(defconst lc-ascii 0)
-(defconst lc-jp 146)
+(require 'tl-nemacs)
;;; @ variables
(defvar mime/latin-lc-list
(list lc-ascii))
-
-(defun mime/char-leading-char (chr)
- (if (< chr 128)
- lc-ascii
- lc-jp))
-
-;; by mol. 1993/9/26
-(defun string-width (str)
- "Return number of columns STRING will occupy.
- [Mule compatible function in tm-nemacs]"
- (length str))
-
-(defun char-bytes (chr)
- "Return number of bytes CHAR will occupy in a buffer.
- [Mule compatible function in tm-nemacs]"
- (if (< chr 128) 1 2))
-
-(defun char-width (chr)
- "Return number of columns CHAR will occupy when displayed.
- [Mule compatible function in tm-nemacs]"
- (if (< chr 128) 1 2))
-
-(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. [Mule compatible function in tm-nemacs]"
- (if (not (eq ic oc))
- (convert-string-kanji-code str ic oc)
- str))
-
-(defun check-ASCII-string (str)
- (let ((i 0)
- len)
- (setq len (length str))
- (catch 'label
- (while (< i len)
- (if (>= (elt str i) 128)
- (throw 'label nil))
- (setq i (+ i 1))
- )
- str)))
;; by mol. 1993/10/4
(defun mime/convert-string-to-emacs (charset str)
ds
(concat "=?" charset "?" encoding "?" str "?="))
))
+
+(defun mime/code-convert-region-to-emacs (beg end charset)
+ (if (stringp charset)
+ (progn
+ (setq charset (upcase charset))
+ (if (string= charset "ISO-2022-JP")
+ (convert-region-kanji-code beg end 2 3)
+ ))))