-1998-04-09 MORIOKA Tomohiko <morioka@mousai.jaist.ac.jp>
+1998-04-09 MORIOKA Tomohiko <morioka@ks-pc0.jaist.ac.jp>
+
+ * emu-e19.el, emu-e20.el: Use 'make-obsolete for 'string-columns.
+
+ * emu-e19.el, emu-nemacs.el, emu-x20.el: Abolish obsolete alias
+ `char-leading-char'.
+
+1998-04-09 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * emu-e20.el, emu-mule.el, emu-nemacs.el, emu-e19.el: Abolish
+ obsolete alias `char-columns'.
+
+ * emu-e19.el: Abolish constant `charset-ascii' and
+ `charset-iso8859-1'.
+ (charset-description): New implementation.
+ (charset-registry): New implementation.
+ (charset-width): Renamed from `charset-columns'; new
+ implementation.
+ (find-charset-string): New implementation.
+ (find-charset-region): New implementation.
+ (charsets-mime-charset-alist): New initial value.
+ (detect-mime-charset-region): New implementation.
+ (char-charset): New implementation.
+
+ * emu-nemacs.el: Rename `charset-columns' -> `charset-width'.
+
+ * emu-nemacs.el: Abolish constant `charset-ascii' and
+ `charset-jisx0208'.
+ Abolish constant `lc-ascii' and `lc-jp'.
+ (charset-description): New implementation.
+ (charset-registry): New implementation.
+ (charset-columns): New implementation.
+ (find-charset-string): New implementation.
+ (find-charset-region): New implementation.
+ (charsets-mime-charset-alist): New initial value.
+ (char-charset): New implementation.
+
+1998-04-09 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* emu-e20.el, emu-x20.el, emu-e19.el, emu-mule.el, emu-nemacs.el
(char-next-index): New macro.
# Makefile for APEL.
#
-VERSION = 7.5
+VERSION = 8.0
TAR = tar
RM = /bin/rm -f
;;; @ character set
;;;
-(defconst charset-ascii 0 "Character set of ASCII")
-(defconst charset-latin-iso8859-1 129 "Character set of ISO-8859-1")
+(put 'ascii 'charset-description "Character set of ASCII")
+(put 'ascii 'charset-registry "ASCII")
+
+(put 'latin-iso8859-1 'charset-description "Character set of ISO-8859-1")
+(put 'latin-iso8859-1 'charset-registry "ISO8859-1")
(defun charset-description (charset)
- "Return description of CHARSET. [emu-e19.el]"
- (if (< charset 128)
- (documentation-property 'charset-ascii 'variable-documentation)
- (documentation-property 'charset-latin-iso8859-1 'variable-documentation)
- ))
+ "Return description of CHARSET."
+ (get charset 'charset-description)
+ )
(defun charset-registry (charset)
- "Return registry name of CHARSET. [emu-e19.el]"
- (if (< charset 128)
- "ASCII"
- "ISO8859-1"))
-
-(defun charset-columns (charset)
- "Return number of columns a CHARSET occupies when displayed.
-\[emu-e19.el]"
+ "Return registry name of CHARSET."
+ (get charset 'charset-registry)
+ )
+
+(defun charset-width (charset)
+ "Return number of columns a CHARSET occupies when displayed."
1)
(defun charset-direction (charset)
"Return the direction of a character of CHARSET by
- 0 (left-to-right) or 1 (right-to-left). [emu-e19.el]"
+ 0 (left-to-right) or 1 (right-to-left)."
0)
(defun find-charset-string (str)
- "Return a list of charsets in the string.
-\[emu-e19.el; Mule emulating function]"
+ "Return a list of charsets in the string."
(if (string-match "[\200-\377]" str)
- (list charset-latin-iso8859-1)
+ '(latin-iso8859-1)
))
(defalias 'find-non-ascii-charset-string 'find-charset-string)
"Return a list of charsets in the region between START and END.
\[emu-e19.el; Mule emulating function]"
(if (save-excursion
- (save-restriction
- (narrow-to-region start end)
- (goto-char start)
- (re-search-forward "[\200-\377]" nil t)
- ))
- (list charset-latin-iso8859-1)
+ (goto-char start)
+ (re-search-forward "[\200-\377]" end t)
+ )
+ '(latin-iso8859-1)
))
(defalias 'find-non-ascii-charset-region 'find-charset-region)
;;;
(defvar charsets-mime-charset-alist
- (list (cons (list charset-ascii) 'us-ascii)))
+ '(((ascii) . us-ascii)))
(defvar default-mime-charset 'iso-8859-1)
)
(defun detect-mime-charset-region (start end)
- "Return MIME charset for region between START and END.
-\[emu-e19.el]"
+ "Return MIME charset for region between START and END."
(if (save-excursion
- (save-restriction
- (narrow-to-region start end)
- (goto-char start)
- (re-search-forward "[\200-\377]" nil t)
- ))
+ (goto-char start)
+ (re-search-forward "[\200-\377]" end t)
+ )
default-mime-charset
'us-ascii))
(defun encode-mime-charset-region (start end charset)
- "Encode the text between START and END as MIME CHARSET.
-\[emu-e19.el]"
+ "Encode the text between START and END as MIME CHARSET."
)
(defun decode-mime-charset-region (start end charset)
- "Decode the text between START and END as MIME CHARSET.
-\[emu-e19.el]"
+ "Decode the text between START and END as MIME CHARSET."
)
(defun encode-mime-charset-string (string charset)
- "Encode the STRING as MIME CHARSET. [emu-e19.el]"
+ "Encode the STRING as MIME CHARSET."
string)
(defun decode-mime-charset-string (string charset)
- "Decode the STRING as MIME CHARSET. [emu-e19.el]"
+ "Decode the STRING as MIME CHARSET."
string)
(defun char-charset (char)
"Return the character set of char CHAR."
(if (< chr 128)
- charset-ascii
- charset-latin-iso8859-1))
+ 'ascii
+ 'latin-iso8859-1))
(defun char-bytes (char)
"Return number of bytes a character in CHAR occupies in a buffer."
"Return number of columns a CHAR occupies when displayed."
1)
+(defalias 'char-length 'char-bytes)
+
(defmacro char-next-index (char index)
"Return index of character succeeding CHAR whose index is INDEX."
(` (1+ index)))
-;;; @@ Mule emulating aliases
-;;;
-;;; You should not use them.
-
-(defalias 'char-leading-char 'char-charset)
-
-;;; @@ obsoleted aliases
-;;;
-;;; You should not use them.
-
-(defalias 'char-length 'char-bytes)
-(defalias 'char-columns 'char-width)
-
;;; @ string
;;;
-(defalias 'string-columns 'length)
+(defalias 'string-width 'length)
(defun string-to-char-list (str)
(mapcar (function identity) str)
(substring str start-column width)
)
-;;; @@ for old MULE emulation
+;;; @@ obsoleted aliases
;;;
+;;; You should not use them.
-(defalias 'string-width 'length)
+(defalias 'string-columns 'length)
+(make-obsolete 'string-columns 'string-width)
;;; @ end
;;; @ character
;;;
+(defalias 'char-length 'char-bytes)
+
(defmacro char-next-index (char index)
"Return index of character succeeding CHAR whose index is INDEX."
`(+ index (char-bytes char)))
(category-set-mnemonics (char-category-set character))
)
-;;; @@ obsoleted aliases
-;;;
-;;; You should not use them.
-
-(defalias 'char-length 'char-bytes)
-(defalias 'char-columns 'char-width)
-
;;; @ string
;;;
-(defalias 'string-columns 'string-width)
-
(defalias 'sset 'store-substring)
(defun string-to-char-list (string)
(defalias 'string-to-int-list 'string-to-char-list)
+;;; @@ obsoleted aliases
+;;;
+;;; You should not use them.
+
+(defalias 'string-columns 'string-width)
+(make-obsolete 'string-columns 'string-width)
+
;;; @ end
;;;
;;; You should not use them.
(defalias 'char-length 'char-bytes)
-(defalias 'char-columns 'char-width)
+;;(defalias 'char-columns 'char-width)
;;; @ string
;;; @ character set
;;;
-(defconst charset-ascii 0 "Character set of ASCII")
-(defconst charset-jisx0208 146 "Character set of JIS X0208-1983")
+(put 'ascii
+ 'charset-description "Character set of ASCII")
+(put 'ascii
+ 'charset-registry "ASCII")
+
+(put 'japanese-jisx0208
+ 'charset-description "Character set of JIS X0208-1983")
+(put 'japanese-jisx0208
+ 'charset-registry "JISX0208.1983")
(defun charset-description (charset)
"Return description of CHARSET. [emu-nemacs.el]"
- (if (< charset 128)
- (documentation-property 'charset-ascii 'variable-documentation)
- (documentation-property 'charset-jisx0208 'variable-documentation)
- ))
+ (get charset 'charset-description)
+ )
(defun charset-registry (charset)
"Return registry name of CHARSET. [emu-nemacs.el]"
- (if (< charset 128)
- "ASCII"
- "JISX0208.1983"))
+ (get charset 'charset-registry)
+ )
-(defun charset-columns (charset)
+(defun charset-width (charset)
"Return number of columns a CHARSET occupies when displayed.
\[emu-nemacs.el]"
- (if (< charset 128)
+ (if (eq charset 'ascii)
1
2))
"Return a list of charsets in the string.
\[emu-nemacs.el; Mule emulating function]"
(if (string-match "[\200-\377]" str)
- (list lc-jp)
+ '(japanese-jisx0208)
))
(defalias 'find-non-ascii-charset-string 'find-charset-string)
(goto-char start)
(re-search-forward "[\200-\377]" nil t)
))
- (list lc-jp)
+ '(japanese-jisx0208)
))
(defalias 'find-non-ascii-charset-region 'find-charset-region)
;;; @@ for old MULE emulation
;;;
-(defconst lc-ascii 0)
-(defconst lc-jp 146)
+;;(defconst lc-ascii 0)
+;;(defconst lc-jp 146)
;;; @ coding system
;;;
(defvar charsets-mime-charset-alist
- (list (cons (list charset-ascii) 'us-ascii)))
+ '(((ascii) . us-ascii)))
(defvar default-mime-charset 'iso-2022-jp)
"Return the character set of char CHR.
\[emu-nemacs.el; MULE emulating function]"
(if (< chr 128)
- charset-ascii
- charset-jisx0208))
+ 'ascii
+ 'japanese-jisx0208))
(defun char-bytes (chr)
"Return number of bytes CHAR will occupy in a buffer.
1
2))
+(defalias 'char-length 'char-bytes)
+
(defmacro char-next-index (char index)
"Return index of character succeeding CHAR whose index is INDEX."
(` (1+ index)))
-;;; @@ Old Mule emulating aliases
-;;;
-;;; You should not use them.
-
-(defalias 'char-leading-char 'char-charset)
-
-;;; @@ obsoleted aliases
-;;;
-;;; You should not use them.
-
-(defalias 'char-length 'char-bytes)
-(defalias 'char-columns 'char-width)
-
;;; @ string
;;;
-(defalias 'string-columns 'length)
+(defalias 'string-width 'length)
(defun sref (str idx)
"Return the character in STR at index IDX.
(setq to to-prev)))
(substring str from to))))
-;;; @@ for Mule emulation
+;;; @@ obsoleted aliases
;;;
+;;; You should not use them.
-(defalias 'string-width 'length)
+(defalias 'string-columns 'length)
;;; @ text property emulation