diff options
| author | Kenichi Handa | 2002-03-05 00:06:48 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-03-05 00:06:48 +0000 |
| commit | e2cc40b79e7a8739742946bba7400b5f37cee1cd (patch) | |
| tree | 79320045846bf843790321980f814fe131d80a6d | |
| parent | 78da4a936ef8e72deef11b661ef4a3667d9322d2 (diff) | |
| download | emacs-e2cc40b79e7a8739742946bba7400b5f37cee1cd.tar.gz emacs-e2cc40b79e7a8739742946bba7400b5f37cee1cd.zip | |
Optimize calls of modify-category-entry.
| -rw-r--r-- | lisp/international/characters.el | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 64b6e6abd34..8e4559c728f 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -101,11 +101,9 @@ | |||
| 101 | 101 | ||
| 102 | ;; ASCII | 102 | ;; ASCII |
| 103 | 103 | ||
| 104 | (let ((ch 32)) | 104 | ;; All ASCII characters have the category `a' (ASCII) and `l' (Latin). |
| 105 | (while (< ch 127) ; All ASCII characters have | 105 | (modify-category-entry '(32 . 127) ?a) |
| 106 | (modify-category-entry ch ?a) ; the category `a' (ASCII) | 106 | (modify-category-entry '(32 . 127) ?l) |
| 107 | (modify-category-entry ch ?l) ; and `l' (Latin). | ||
| 108 | (setq ch (1+ ch)))) | ||
| 109 | 107 | ||
| 110 | ;; Arabic character set | 108 | ;; Arabic character set |
| 111 | 109 | ||
| @@ -116,28 +114,12 @@ | |||
| 116 | (while charsets | 114 | (while charsets |
| 117 | ;; (modify-syntax-entry (make-char (car charsets)) "w") | 115 | ;; (modify-syntax-entry (make-char (car charsets)) "w") |
| 118 | (map-charset-chars | 116 | (map-charset-chars |
| 119 | #'(lambda (char ignore) | 117 | #'(lambda (char ignore) (modify-category-entry char ?b)) |
| 120 | (if (consp char) | ||
| 121 | (let ((from (car char)) | ||
| 122 | (to (cdr char))) | ||
| 123 | (while (<= from to) | ||
| 124 | (modify-category-entry from ?b) | ||
| 125 | (setq from (1+ from)))) | ||
| 126 | (modify-category-entry char ?b))) | ||
| 127 | (car charsets)) | 118 | (car charsets)) |
| 128 | (setq charsets (cdr charsets)))) | 119 | (setq charsets (cdr charsets)))) |
| 129 | (let ((ch #x600)) | 120 | (modify-category-entry '(#x600 . #x6ff) ?b) |
| 130 | (while (<= ch #x6ff) | 121 | (modify-category-entry '(#xfb50 . #xfdff) ?b) |
| 131 | (modify-category-entry (decode-char 'ucs ch) ?b) | 122 | (modify-category-entry '(#xfe70 . #xfefe) ?b) |
| 132 | (setq ch (1+ ch))) | ||
| 133 | (setq ch #xfb50) | ||
| 134 | (while (<= ch #xfdff) | ||
| 135 | (modify-category-entry (decode-char 'ucs ch) ?b) | ||
| 136 | (setq ch (1+ ch))) | ||
| 137 | (setq ch #xfe70) | ||
| 138 | (while (<= ch #xfefe) | ||
| 139 | (modify-category-entry (decode-char 'ucs ch) ?b) | ||
| 140 | (setq ch (1+ ch)))) | ||
| 141 | 123 | ||
| 142 | ;; Chinese character set (GB2312) | 124 | ;; Chinese character set (GB2312) |
| 143 | 125 | ||
| @@ -366,8 +348,7 @@ | |||
| 366 | 348 | ||
| 367 | ;; (modify-category-entry (make-char 'ethiopic) ?e) | 349 | ;; (modify-category-entry (make-char 'ethiopic) ?e) |
| 368 | ;; (modify-syntax-entry (make-char 'ethiopic) "w") | 350 | ;; (modify-syntax-entry (make-char 'ethiopic) "w") |
| 369 | (dotimes (i (1+ (- #x137c #x1200))) | 351 | (modify-category-entry '(#x1200 . #x137b) ?e) |
| 370 | (modify-category-entry (decode-char 'ucs (+ #x1200 i)) ?e)) | ||
| 371 | (let ((chars '(?$(3$h(B ?$(3$i(B ?$(3$j(B ?$(3$k(B ?$(3$l(B ?$(3$m(B ?$(3$n(B ?$(3$o(B ?$(3%i(B ?$(3%t(B ?$(3%u(B ?$(3%v(B ?$(3%w(B ?$(3%x(B | 352 | (let ((chars '(?$(3$h(B ?$(3$i(B ?$(3$j(B ?$(3$k(B ?$(3$l(B ?$(3$m(B ?$(3$n(B ?$(3$o(B ?$(3%i(B ?$(3%t(B ?$(3%u(B ?$(3%v(B ?$(3%w(B ?$(3%x(B |
| 372 | ;; Unicode equivalents of the above: | 353 | ;; Unicode equivalents of the above: |
| 373 | ?$,1Q!(B ?$,1Q"(B ?$,1Q#(B ?$,1Q$(B ?$,1Q%(B ?$,1Q&(B ?$,1Q'(B ?$,1Q((B ?$,3op(B ?$,3o{(B ?$,3o|(B ?$,3o}(B ?$,3o~(B ?$,3o(B))) | 354 | ?$,1Q!(B ?$,1Q"(B ?$,1Q#(B ?$,1Q$(B ?$,1Q%(B ?$,1Q&(B ?$,1Q'(B ?$,1Q((B ?$,3op(B ?$,3o{(B ?$,3o|(B ?$,3o}(B ?$,3o~(B ?$,3o(B))) |