summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-02-04 11:25:47 +0000
committerKenichi Handa <handa@m17n.org>1998-02-04 11:25:47 +0000
commit1ea47f275ac1196248a495fdde3f3ff78777c53b (patch)
treef12afd4e929be0731a81f0f058427807415cbd90
parenta1800e41c4d92eb81e678a00700fee16079b0198 (diff)
downloademacs-1ea47f275ac1196248a495fdde3f3ff78777c53b.tar.gz
Use aref instead of sref.
-rw-r--r--lisp/international/characters.el55
-rw-r--r--lisp/international/kinsoku.el8
2 files changed, 47 insertions, 16 deletions
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 5f30a79c87e..4eec1209a8a 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -256,14 +256,14 @@
(while (< i len)
(if (= (aref chars i) ?-)
(setq i (1+ i)
- to (sref chars i))
- (setq ch (sref chars i)
+ to (aref chars i))
+ (setq ch (aref chars i)
to ch))
(while (<= ch to)
(modify-syntax-entry ch syntax)
(modify-category-entry ch category)
(setq ch (1+ ch)))
- (setq i (+ i (char-bytes to))))
+ (setq i (1+ i)))
(setq deflist (cdr deflist))))
;; Ethiopic character set
@@ -318,6 +318,37 @@
(modify-category-entry (make-char 'indian-2-column) ?I)
(modify-category-entry (make-char 'indian-1-column) ?I)
+(let ((deflist
+ '(;; chars syntax category
+ ("(5!"#(B" "w" ?7) ; vowel-modifying diacritical mark
+ ; chandrabindu, anuswar, visarga
+ ("(5$(B-(52(B" "w" ?1) ; base (independent) vowel
+ ("(53(B-(5X(B" "w" ?0) ; consonant
+ ("(5Z(B-(5g(B" "w" ?8) ; matra
+ ("(5q(B-(5z(B" "w" ?6) ; digit
+ ))
+ elm chars len syntax category to ch i)
+ (while deflist
+ (setq elm (car deflist))
+ (setq chars (car elm)
+ len (length chars)
+ syntax (nth 1 elm)
+ category (nth 2 elm)
+ i 0)
+ (while (< i len)
+ (if (= (aref chars i) ?-)
+ (setq i (1+ i)
+ to (aref chars i))
+ (setq ch (aref chars i)
+ to ch))
+ (while (<= ch to)
+ (modify-syntax-entry ch syntax)
+ (modify-category-entry ch category)
+ (setq ch (1+ ch)))
+ (setq i (1+ i)))
+ (setq deflist (cdr deflist))))
+
+
;; Japanese character set (JISX0201-kana, JISX0201-roman, JISX0208, JISX0212)
(modify-category-entry (make-char 'katakana-jisx0201) ?k)
@@ -425,14 +456,14 @@
(while (< i len)
(if (= (aref chars i) ?-)
(setq i (1+ i)
- to (sref chars i))
- (setq ch (sref chars i)
+ to (aref chars i))
+ (setq ch (aref chars i)
to ch))
(while (<= ch to)
(modify-syntax-entry ch syntax)
(modify-category-entry ch category)
(setq ch (1+ ch)))
- (setq i (+ i (char-bytes to))))
+ (setq i (1+ i)))
(setq deflist (cdr deflist))))
;; Thai character set (TIS620)
@@ -459,14 +490,14 @@
(while (< i len)
(if (= (aref chars i) ?-)
(setq i (1+ i)
- to (sref chars i))
- (setq ch (sref chars i)
+ to (aref chars i))
+ (setq ch (aref chars i)
to ch))
(while (<= ch to)
(modify-syntax-entry ch syntax)
(modify-category-entry ch category)
(setq ch (1+ ch)))
- (setq i (+ i (char-bytes to))))
+ (setq i (1+ i)))
(setq deflist (cdr deflist))))
;; Tibetan character set
@@ -505,14 +536,14 @@
(while (< i len)
(if (= (aref chars i) ?-)
(setq i (1+ i)
- to (sref chars i))
- (setq ch (sref chars i)
+ to (aref chars i))
+ (setq ch (aref chars i)
to ch))
(while (<= ch to)
(modify-syntax-entry ch syntax)
(modify-category-entry ch category)
(setq ch (1+ ch)))
- (setq i (+ i (char-bytes to))))
+ (setq i (1+ i)))
(setq deflist (cdr deflist))))
;; Vietnamese character set
diff --git a/lisp/international/kinsoku.el b/lisp/international/kinsoku.el
index 764d181c5b3..53c26f7d593 100644
--- a/lisp/international/kinsoku.el
+++ b/lisp/international/kinsoku.el
@@ -78,8 +78,8 @@ The value 0 means there's no limitation.")
(idx 0)
ch)
(while (< idx len)
- (setq ch (sref kinsoku-bol idx)
- idx (+ idx (char-bytes ch)))
+ (setq ch (aref kinsoku-bol idx)
+ idx (1+ idx))
(modify-category-entry ch ?>)))
;; Setting character category `<' for characters which should not be
@@ -115,8 +115,8 @@ The value 0 means there's no limitation.")
(idx 0)
ch)
(while (< idx len)
- (setq ch (sref kinsoku-eol idx)
- idx (+ idx (char-bytes ch)))
+ (setq ch (aref kinsoku-eol idx)
+ idx (1+ idx))
(modify-category-entry ch ?<)))
;; Try to resolve `kinsoku' restriction by making the current line longer.