;;; @ character
;;;
-(defun char-charset (chr)
- "Return the character set of char CHR.
-\[emu-e19.el; XEmacs 20 emulating function]"
+(defun char-charset (char)
+ "Return the character set of char CHAR."
(if (< chr 128)
charset-ascii
charset-latin-iso8859-1))
(defun char-bytes (char)
- "Return number of bytes a character in CHAR occupies in a buffer.
-\[emu-e19.el; MULE emulating function]"
+ "Return number of bytes a character in CHAR occupies in a buffer."
1)
-(defalias 'char-length 'char-bytes)
-
-(defun char-columns (character)
- "Return number of columns a CHARACTER occupies when displayed.
-\[emu-e19.el]"
+(defun char-width (char)
+ "Return number of columns a CHAR occupies when displayed."
1)
-;;; @@ for old MULE emulation
-;;;
+(defmacro char-next-index (char index)
+ "Return index of character succeeding CHAR whose index is INDEX."
+ (` (1+ index)))
-(defalias 'char-width 'char-columns)
+;;; @@ 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
;;;
;;; @ character
;;;
-(defalias 'char-length 'char-bytes)
-
-(defalias 'char-columns 'char-width)
-
+(defmacro char-next-index (char index)
+ "Return index of character succeeding CHAR whose index is INDEX."
+ `(+ index (char-bytes char)))
;;; @@ Mule emulating aliases
;;;
(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 'char-charset 'char-leading-char)
-(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))))
+
+;;; @@ obsoleted aliases
+;;;
+;;; You should not use them.
+(defalias 'char-length 'char-bytes)
(defalias 'char-columns 'char-width)
(defun char-charset (chr)
"Return the character set of char CHR.
-\[emu-nemacs.el; XEmacs 20 emulating function]"
+\[emu-nemacs.el; MULE emulating function]"
(if (< chr 128)
charset-ascii
charset-jisx0208))
\[emu-nemacs.el; Mule emulating function]"
(if (< chr 128) 1 2))
-(defalias 'char-length 'char-bytes)
-
-(defun char-columns (character)
- "Return number of columns a CHARACTER occupies when displayed.
+(defun char-width (char)
+ "Return number of columns a CHAR occupies when displayed.
\[emu-nemacs.el]"
- (if (< character 128)
+ (if (< char 128)
1
2))
-;;; @@ for Mule emulation
+(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)
-(defalias 'char-width 'char-columns)
+;;; @@ obsoleted aliases
+;;;
+;;; You should not use them.
+
+(defalias 'char-length 'char-bytes)
+(defalias 'char-columns 'char-width)
;;; @ string
;;; @ character
;;;
+(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.