-
-;;; @ MIME charset
-;;;
-
-(defun charsets-to-mime-charset (charsets)
- "Return MIME charset from list of charset CHARSETS.
-This function refers variable `charsets-mime-charset-alist'
-and `default-mime-charset'. [emu.el]"
- (if charsets
- (or (catch 'tag
- (let ((rest charsets-mime-charset-alist)
- cell csl)
- (while (setq cell (car rest))
- (if (catch 'not-subset
- (let ((set1 charsets)
- (set2 (car cell))
- obj)
- (while set1
- (setq obj (car set1))
- (or (memq obj set2)
- (throw 'not-subset nil)
- )
- (setq set1 (cdr set1))
- )
- t))
- (throw 'tag (cdr cell))
- )
- (setq rest (cdr rest))
- )))
- default-mime-charset)))
-
-
-;;; @ EMACS 19.29 emulation
-;;;
-
-(defvar path-separator ":"
- "Character used to separate concatenated paths.")
-
-(defun-maybe buffer-substring-no-properties (beg end)
- "Return the text from BEG to END, without text properties, as a string.
-\[emu.el; EMACS 19.29 emulating function]"
- (let ((string (buffer-substring beg end)))
- (tl:set-text-properties 0 (length string) nil string)
- string))
-
-(defun-maybe match-string (num &optional string)
- "Return string of text matched by last search.
-NUM specifies which parenthesized expression in the last regexp.
- Value is nil if NUMth pair didn't match, or there were less than NUM pairs.
-Zero means the entire text matched by the whole regexp or whole string.
-STRING should be given if the last search was by `string-match' on STRING.
-\[emu.el; EMACS 19.29 emulating function]"
- (if (match-beginning num)
- (if string
- (substring string (match-beginning num) (match-end num))
- (buffer-substring (match-beginning num) (match-end num)))))
-
-(or running-emacs-19_29-or-later
- running-xemacs
- ;; for Emacs 19.28 or earlier
- (fboundp 'si:read-string)
- (progn
- (fset 'si:read-string (symbol-function 'read-string))
-
- (defun read-string (prompt &optional initial-input history)
- "Read a string from the minibuffer, prompting with string PROMPT.
-If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
-The third arg HISTORY, is dummy for compatibility. [emu.el]
-See `read-from-minibuffer' for details of HISTORY argument."
- (si:read-string prompt initial-input)
- )
- ))
-
-;; This function was imported Emacs 19.30.
-(defun-maybe 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)))
- ))
-
-
-;;; @ EMACS 19.30 emulation
-;;;
-
-(cond ((fboundp 'insert-file-contents-literally)
+;; 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-buffer)
+ (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)
+ (if (integerp chr)
+ (char-to-string (int-char chr))
+ (char-to-string chr)))
+ ;; `char-category-list' returns a list of
+ ;; characters in XEmacs 21.2.25 and later,
+ ;; otherwise integers.
+ (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)
+ ))