-(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."
- (let ((string (buffer-substring beg end)))
- (tl:set-text-properties 0 (length string) nil string)
- string))
- )
-
-(cond ((or (<= emacs-major-version 18)
- (<= emacs-minor-version 28))
- ;; for Emacs 19.28 or earlier
- (defun tl:read-string (prompt &optional initial-input history)
- (read-string prompt initial-input)
- )
+;; for tm-7.106
+(unless (fboundp 'tl:make-overlay)
+ (defalias 'tl:make-overlay 'make-overlay)
+ (make-obsolete 'tl:make-overlay 'make-overlay)
+ )
+(unless (fboundp 'tl:overlay-put)
+ (defalias 'tl:overlay-put 'overlay-put)
+ (make-obsolete 'tl:overlay-put 'overlay-put)
+ )
+(unless (fboundp 'tl:overlay-put)
+ (defalias 'tl:overlay-buffer 'overlay-buffer)
+ (make-obsolete 'tl:overlay-buffer 'overlay-buffer)
+ )
+
+(require 'poem)
+(require 'mcharset)
+(require 'invisible)
+
+(defsubst char-list-to-string (char-list)
+ "Convert list of character CHAR-LIST to string."
+ (apply (function string) char-list))
+
+(cond ((featurep 'mule)
+ (cond ((featurep 'xemacs) ; for XEmacs with MULE
+ ;; old Mule emulating aliases
+
+ ;;(defalias 'char-leading-char 'char-charset)
+
+ (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."
+ (mapconcat (lambda (chr)
+ (char-to-string (int-char chr)))
+ (char-category-list character)
+ ""))
+ )
+ ((>= emacs-major-version 20) ; for Emacs 20
+ (defalias 'insert-binary-file-contents-literally
+ 'insert-file-contents-literally)
+
+ ;; old Mule emulating aliases
+ (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."
+ (category-set-mnemonics (char-category-set character)))
+ )
+ (t ; for MULE 1.* and 2.*
+ (require 'emu-mule)
+ ))
+ )
+ ((boundp 'NEMACS)
+ ;; for NEmacs and NEpoch
+
+ ;; old MULE emulation
+ (defconst *noconv* 0)
+ (defconst *sjis* 1)
+ (defconst *junet* 2)
+ (defconst *ctext* 2)
+ (defconst *internal* 3)
+ (defconst *euc-japan* 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,
+else returns nil."
+ (if (not (eq ic oc))
+ (convert-string-kanji-code str ic oc)
+ str))
+
+ (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."
+ (if (/= ic oc)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region beg end)
+ (convert-region-kanji-code beg end ic oc)))
+ ))