From 9f00cefb3075718b84b9415817ab1394fc9da371 Mon Sep 17 00:00:00 2001 From: morioka Date: Thu, 9 Apr 1998 07:37:56 +0000 Subject: [PATCH] Sync up with apel-7_6-char-next-index. --- ChangeLog | 5 +++++ emu-e19.el | 31 ++++++++++++++++++------------- emu-e20.el | 14 ++++++++++---- emu-mule.el | 9 ++++++++- emu-nemacs.el | 24 ++++++++++++++++-------- emu-x20.el | 4 ++++ 6 files changed, 61 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 947af4b..d479213 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1998-04-09 MORIOKA Tomohiko + + * emu-e20.el, emu-x20.el, emu-e19.el, emu-mule.el, emu-nemacs.el + (char-next-index): New macro. + 1998-03-26 MORIOKA Tomohiko * std11.el: Require 'std11-parse when compile. diff --git a/emu-e19.el b/emu-e19.el index af1a841..f4f22ab 100644 --- a/emu-e19.el +++ b/emu-e19.el @@ -243,32 +243,37 @@ find-file-hooks, etc. ;;; @ 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 ;;; diff --git a/emu-e20.el b/emu-e20.el index 5eaafcf..6f51347 100644 --- a/emu-e20.el +++ b/emu-e20.el @@ -174,10 +174,9 @@ code conversion will not take place." ;;; @ 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 ;;; @@ -190,6 +189,13 @@ TABLE defaults to the current buffer's category table." (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 ;;; diff --git a/emu-mule.el b/emu-mule.el index c726ab9..eed2bd7 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -317,8 +317,15 @@ It must be symbol.") (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) diff --git a/emu-nemacs.el b/emu-nemacs.el index 0ded890..62826c8 100644 --- a/emu-nemacs.el +++ b/emu-nemacs.el @@ -314,7 +314,7 @@ find-file-hooks, etc. (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)) @@ -324,21 +324,29 @@ find-file-hooks, etc. \[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 diff --git a/emu-x20.el b/emu-x20.el index 38d51b5..fc8774c 100644 --- a/emu-x20.el +++ b/emu-x20.el @@ -204,6 +204,10 @@ find-file-hooks, etc. ;;; @ 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. -- 1.7.10.4