2 ;;; $Id: tl-nemacs.el,v 2.0 1994/10/29 18:31:55 morioka Exp $
12 (defconst *internal* 3)
13 (defconst *euc-japan* 3)
19 (defun string-width (str)
20 "Return number of columns STRING will occupy.
21 [Mule compatible function in tm-nemacs]"
24 (defun char-bytes (chr)
25 "Return number of bytes CHAR will occupy in a buffer.
26 [Mule compatible function in tm-nemacs]"
29 (defun char-width (chr)
30 "Return number of columns CHAR will occupy when displayed.
31 [Mule compatible function in tm-nemacs]"
34 (defun code-convert-string (str ic oc)
35 "Convert code in STRING from SOURCE code to TARGET code,
36 On successful converion, returns the result string,
37 else returns nil. [Mule compatible function in tm-nemacs]"
39 (convert-string-kanji-code str ic oc)
42 (defun check-ASCII-string (str)
45 (setq len (length str))
48 (if (>= (elt str i) 128)
55 "Return leading character of CHAR or LEADING-CHARACTER."
61 ;; by YAMATE Keiichirou 1994/10/28
62 (defun attribute-add-narrow-attribute (attr from to)
63 (or (consp (symbol-value attr))
65 (let* ((attr-value (symbol-value attr))
66 (len (car attr-value))
69 (while (and (< posfrom len)
70 (> from (nth posfrom attr-value)))
71 (setq posfrom (1+ posfrom)))
73 (while (and (< posto len)
74 (> to (nth posto attr-value)))
75 (setq posto (1+ posto)))
79 (= to (nth posto attr-value)))
80 (set-marker (nth posto attr-value) from)
81 (setcdr (nthcdr (1- posfrom) attr-value)
82 (cons (set-marker-type (set-marker (make-marker)
85 (cons (set-marker-type (set-marker (make-marker)
88 (nthcdr posto attr-value))))
89 (setcar attr-value (+ len 2))))
90 (if (= (% posfrom 2) 0)
91 (setq posfrom (1- posfrom))
92 (set-marker (nth posfrom attr-value) from))
95 (setq posto (1- posto))
96 (set-marker (nth posto attr-value) to))
97 (setcdr (nthcdr posfrom attr-value)
98 (nthcdr posto attr-value)))))