diff options
| author | Kenichi Handa | 1998-02-04 11:25:47 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-02-04 11:25:47 +0000 |
| commit | 4a027a0dfb5721eb98b298f6330fe00511ca428c (patch) | |
| tree | 55519e97fcd72d6ff1bc28e7d4b8ae4f26103d28 | |
| parent | d5266ddfc2dd72dc2878305f12a4720e18fe8e26 (diff) | |
| download | emacs-4a027a0dfb5721eb98b298f6330fe00511ca428c.tar.gz emacs-4a027a0dfb5721eb98b298f6330fe00511ca428c.zip | |
Use aref instead of sref.
| -rw-r--r-- | lisp/international/characters.el | 55 | ||||
| -rw-r--r-- | lisp/international/kinsoku.el | 8 |
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 @@ | |||
| 256 | (while (< i len) | 256 | (while (< i len) |
| 257 | (if (= (aref chars i) ?-) | 257 | (if (= (aref chars i) ?-) |
| 258 | (setq i (1+ i) | 258 | (setq i (1+ i) |
| 259 | to (sref chars i)) | 259 | to (aref chars i)) |
| 260 | (setq ch (sref chars i) | 260 | (setq ch (aref chars i) |
| 261 | to ch)) | 261 | to ch)) |
| 262 | (while (<= ch to) | 262 | (while (<= ch to) |
| 263 | (modify-syntax-entry ch syntax) | 263 | (modify-syntax-entry ch syntax) |
| 264 | (modify-category-entry ch category) | 264 | (modify-category-entry ch category) |
| 265 | (setq ch (1+ ch))) | 265 | (setq ch (1+ ch))) |
| 266 | (setq i (+ i (char-bytes to)))) | 266 | (setq i (1+ i))) |
| 267 | (setq deflist (cdr deflist)))) | 267 | (setq deflist (cdr deflist)))) |
| 268 | 268 | ||
| 269 | ;; Ethiopic character set | 269 | ;; Ethiopic character set |
| @@ -318,6 +318,37 @@ | |||
| 318 | (modify-category-entry (make-char 'indian-2-column) ?I) | 318 | (modify-category-entry (make-char 'indian-2-column) ?I) |
| 319 | (modify-category-entry (make-char 'indian-1-column) ?I) | 319 | (modify-category-entry (make-char 'indian-1-column) ?I) |
| 320 | 320 | ||
| 321 | (let ((deflist | ||
| 322 | '(;; chars syntax category | ||
| 323 | ("(5!"#(B" "w" ?7) ; vowel-modifying diacritical mark | ||
| 324 | ; chandrabindu, anuswar, visarga | ||
| 325 | ("(5$(B-(52(B" "w" ?1) ; base (independent) vowel | ||
| 326 | ("(53(B-(5X(B" "w" ?0) ; consonant | ||
| 327 | ("(5Z(B-(5g(B" "w" ?8) ; matra | ||
| 328 | ("(5q(B-(5z(B" "w" ?6) ; digit | ||
| 329 | )) | ||
| 330 | elm chars len syntax category to ch i) | ||
| 331 | (while deflist | ||
| 332 | (setq elm (car deflist)) | ||
| 333 | (setq chars (car elm) | ||
| 334 | len (length chars) | ||
| 335 | syntax (nth 1 elm) | ||
| 336 | category (nth 2 elm) | ||
| 337 | i 0) | ||
| 338 | (while (< i len) | ||
| 339 | (if (= (aref chars i) ?-) | ||
| 340 | (setq i (1+ i) | ||
| 341 | to (aref chars i)) | ||
| 342 | (setq ch (aref chars i) | ||
| 343 | to ch)) | ||
| 344 | (while (<= ch to) | ||
| 345 | (modify-syntax-entry ch syntax) | ||
| 346 | (modify-category-entry ch category) | ||
| 347 | (setq ch (1+ ch))) | ||
| 348 | (setq i (1+ i))) | ||
| 349 | (setq deflist (cdr deflist)))) | ||
| 350 | |||
| 351 | |||
| 321 | ;; Japanese character set (JISX0201-kana, JISX0201-roman, JISX0208, JISX0212) | 352 | ;; Japanese character set (JISX0201-kana, JISX0201-roman, JISX0208, JISX0212) |
| 322 | 353 | ||
| 323 | (modify-category-entry (make-char 'katakana-jisx0201) ?k) | 354 | (modify-category-entry (make-char 'katakana-jisx0201) ?k) |
| @@ -425,14 +456,14 @@ | |||
| 425 | (while (< i len) | 456 | (while (< i len) |
| 426 | (if (= (aref chars i) ?-) | 457 | (if (= (aref chars i) ?-) |
| 427 | (setq i (1+ i) | 458 | (setq i (1+ i) |
| 428 | to (sref chars i)) | 459 | to (aref chars i)) |
| 429 | (setq ch (sref chars i) | 460 | (setq ch (aref chars i) |
| 430 | to ch)) | 461 | to ch)) |
| 431 | (while (<= ch to) | 462 | (while (<= ch to) |
| 432 | (modify-syntax-entry ch syntax) | 463 | (modify-syntax-entry ch syntax) |
| 433 | (modify-category-entry ch category) | 464 | (modify-category-entry ch category) |
| 434 | (setq ch (1+ ch))) | 465 | (setq ch (1+ ch))) |
| 435 | (setq i (+ i (char-bytes to)))) | 466 | (setq i (1+ i))) |
| 436 | (setq deflist (cdr deflist)))) | 467 | (setq deflist (cdr deflist)))) |
| 437 | 468 | ||
| 438 | ;; Thai character set (TIS620) | 469 | ;; Thai character set (TIS620) |
| @@ -459,14 +490,14 @@ | |||
| 459 | (while (< i len) | 490 | (while (< i len) |
| 460 | (if (= (aref chars i) ?-) | 491 | (if (= (aref chars i) ?-) |
| 461 | (setq i (1+ i) | 492 | (setq i (1+ i) |
| 462 | to (sref chars i)) | 493 | to (aref chars i)) |
| 463 | (setq ch (sref chars i) | 494 | (setq ch (aref chars i) |
| 464 | to ch)) | 495 | to ch)) |
| 465 | (while (<= ch to) | 496 | (while (<= ch to) |
| 466 | (modify-syntax-entry ch syntax) | 497 | (modify-syntax-entry ch syntax) |
| 467 | (modify-category-entry ch category) | 498 | (modify-category-entry ch category) |
| 468 | (setq ch (1+ ch))) | 499 | (setq ch (1+ ch))) |
| 469 | (setq i (+ i (char-bytes to)))) | 500 | (setq i (1+ i))) |
| 470 | (setq deflist (cdr deflist)))) | 501 | (setq deflist (cdr deflist)))) |
| 471 | 502 | ||
| 472 | ;; Tibetan character set | 503 | ;; Tibetan character set |
| @@ -505,14 +536,14 @@ | |||
| 505 | (while (< i len) | 536 | (while (< i len) |
| 506 | (if (= (aref chars i) ?-) | 537 | (if (= (aref chars i) ?-) |
| 507 | (setq i (1+ i) | 538 | (setq i (1+ i) |
| 508 | to (sref chars i)) | 539 | to (aref chars i)) |
| 509 | (setq ch (sref chars i) | 540 | (setq ch (aref chars i) |
| 510 | to ch)) | 541 | to ch)) |
| 511 | (while (<= ch to) | 542 | (while (<= ch to) |
| 512 | (modify-syntax-entry ch syntax) | 543 | (modify-syntax-entry ch syntax) |
| 513 | (modify-category-entry ch category) | 544 | (modify-category-entry ch category) |
| 514 | (setq ch (1+ ch))) | 545 | (setq ch (1+ ch))) |
| 515 | (setq i (+ i (char-bytes to)))) | 546 | (setq i (1+ i))) |
| 516 | (setq deflist (cdr deflist)))) | 547 | (setq deflist (cdr deflist)))) |
| 517 | 548 | ||
| 518 | ;; Vietnamese character set | 549 | ;; 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.") | |||
| 78 | (idx 0) | 78 | (idx 0) |
| 79 | ch) | 79 | ch) |
| 80 | (while (< idx len) | 80 | (while (< idx len) |
| 81 | (setq ch (sref kinsoku-bol idx) | 81 | (setq ch (aref kinsoku-bol idx) |
| 82 | idx (+ idx (char-bytes ch))) | 82 | idx (1+ idx)) |
| 83 | (modify-category-entry ch ?>))) | 83 | (modify-category-entry ch ?>))) |
| 84 | 84 | ||
| 85 | ;; Setting character category `<' for characters which should not be | 85 | ;; Setting character category `<' for characters which should not be |
| @@ -115,8 +115,8 @@ The value 0 means there's no limitation.") | |||
| 115 | (idx 0) | 115 | (idx 0) |
| 116 | ch) | 116 | ch) |
| 117 | (while (< idx len) | 117 | (while (< idx len) |
| 118 | (setq ch (sref kinsoku-eol idx) | 118 | (setq ch (aref kinsoku-eol idx) |
| 119 | idx (+ idx (char-bytes ch))) | 119 | idx (1+ idx)) |
| 120 | (modify-category-entry ch ?<))) | 120 | (modify-category-entry ch ?<))) |
| 121 | 121 | ||
| 122 | ;; Try to resolve `kinsoku' restriction by making the current line longer. | 122 | ;; Try to resolve `kinsoku' restriction by making the current line longer. |