diff options
| author | Kenichi Handa | 2008-10-22 05:29:08 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-10-22 05:29:08 +0000 |
| commit | 4626499f4fd3b6de6c61a3dc240b88e143a70ecb (patch) | |
| tree | b353cbf92fb58ff0871b9f75af1d705bb625e63a | |
| parent | 714b2198bf98f68e3f721675c4df8cefb7d0b268 (diff) | |
| download | emacs-4626499f4fd3b6de6c61a3dc240b88e143a70ecb.tar.gz emacs-4626499f4fd3b6de6c61a3dc240b88e143a70ecb.zip | |
Don't setup
find-word-boundary-function-table.
(next-word-boundary-han, next-word-boundary-kana): Delete them.
(word-combining-categories, word-separating-categories): Adjusted
to the change of the docstrings.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/international/characters.el | 72 | ||||
| -rw-r--r-- | src/ChangeLog | 8 |
3 files changed, 19 insertions, 69 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38110a0b326..05d153a7bbf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2008-10-22 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * international/characters.el: Don't setup | ||
| 4 | find-word-boundary-function-table. | ||
| 5 | (next-word-boundary-han, next-word-boundary-kana): Delete them. | ||
| 6 | (word-combining-categories, word-separating-categories): Adjusted | ||
| 7 | to the change of the docstrings. | ||
| 8 | |||
| 1 | 2008-10-21 Alan Mackenzie <acm@muc.de> | 9 | 2008-10-21 Alan Mackenzie <acm@muc.de> |
| 2 | 10 | ||
| 3 | * simple.el (undo-more): Add comment explaining the operations on | 11 | * simple.el (undo-more): Add comment explaining the operations on |
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 5543650ff7c..159bac02466 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -1138,80 +1138,14 @@ Setup char-width-table appropriate for non-CJK language environment." | |||
| 1138 | 1138 | ||
| 1139 | ;;; Setting word boundary. | 1139 | ;;; Setting word boundary. |
| 1140 | 1140 | ||
| 1141 | (defun next-word-boundary-han (pos limit) | ||
| 1142 | (if (<= pos limit) | ||
| 1143 | (save-excursion | ||
| 1144 | (goto-char pos) | ||
| 1145 | (looking-at "\\cC+") | ||
| 1146 | (goto-char (match-end 0)) | ||
| 1147 | (if (looking-at "\\cH+") | ||
| 1148 | (goto-char (match-end 0))) | ||
| 1149 | (point)) | ||
| 1150 | (while (and (> pos limit) | ||
| 1151 | (eq (aref char-script-table (char-after (1- pos))) 'han)) | ||
| 1152 | (setq pos (1- pos))) | ||
| 1153 | pos)) | ||
| 1154 | |||
| 1155 | (defun next-word-boundary-kana (pos limit) | ||
| 1156 | (if (<= pos limit) | ||
| 1157 | (save-excursion | ||
| 1158 | (goto-char pos) | ||
| 1159 | (if (looking-at "\\cK+") | ||
| 1160 | (goto-char (match-end 0))) | ||
| 1161 | (if (looking-at "\\cH+") | ||
| 1162 | (goto-char (match-end 0))) | ||
| 1163 | (if (looking-at "\\ck+") | ||
| 1164 | (goto-char (match-end 0))) | ||
| 1165 | (point)) | ||
| 1166 | (let ((category-set (char-category-set (char-after pos))) | ||
| 1167 | category) | ||
| 1168 | (if (or (aref category-set ?K) (aref category-set ?k)) | ||
| 1169 | (while (and (> pos limit) | ||
| 1170 | (setq category-set | ||
| 1171 | (char-category-set (char-after (1- pos)))) | ||
| 1172 | (or (aref category-set ?K) (aref category-set ?k))) | ||
| 1173 | (setq pos (1- pos))) | ||
| 1174 | (while (and (> pos limit) | ||
| 1175 | (aref (setq category-set | ||
| 1176 | (char-category-set (char-after (1- pos)))) ?H)) | ||
| 1177 | (setq pos (1- pos))) | ||
| 1178 | (setq category (cond ((aref category-set ?C) ?C) | ||
| 1179 | ((aref category-set ?K) ?K) | ||
| 1180 | ((aref category-set ?A) ?A))) | ||
| 1181 | (when category | ||
| 1182 | (setq pos (1- pos)) | ||
| 1183 | (while (and (> pos limit) | ||
| 1184 | (aref (char-category-set (char-after (1- pos))) | ||
| 1185 | category)) | ||
| 1186 | (setq pos (1- pos))))) | ||
| 1187 | pos))) | ||
| 1188 | |||
| 1189 | (map-char-table | ||
| 1190 | #'(lambda (char script) | ||
| 1191 | (cond ((eq script 'han) | ||
| 1192 | (set-char-table-range find-word-boundary-function-table | ||
| 1193 | char #'next-word-boundary-han)) | ||
| 1194 | ((eq script 'kana) | ||
| 1195 | (set-char-table-range find-word-boundary-function-table | ||
| 1196 | char #'next-word-boundary-kana)))) | ||
| 1197 | char-script-table) | ||
| 1198 | |||
| 1199 | (setq word-combining-categories | 1141 | (setq word-combining-categories |
| 1200 | '((?l . ?l) | 1142 | '((nil . ?^) |
| 1201 | (?C . ?C) | 1143 | (?^ . nil) |
| 1202 | (?C . ?H) | 1144 | (?C . ?H) |
| 1203 | (?C . ?K))) | 1145 | (?C . ?K))) |
| 1204 | 1146 | ||
| 1205 | (setq word-separating-categories ; (2-byte character sets) | 1147 | (setq word-separating-categories ; (2-byte character sets) |
| 1206 | '((?A . ?K) ; Alpha numeric - Katakana | 1148 | '((?H . ?K) ; Hiragana - Katakana |
| 1207 | (?A . ?C) ; Alpha numeric - Chinese | ||
| 1208 | (?H . ?A) ; Hiragana - Alpha numeric | ||
| 1209 | (?H . ?K) ; Hiragana - Katakana | ||
| 1210 | (?H . ?C) ; Hiragana - Chinese | ||
| 1211 | (?K . ?A) ; Katakana - Alpha numeric | ||
| 1212 | (?K . ?C) ; Katakana - Chinese | ||
| 1213 | (?C . ?A) ; Chinese - Alpha numeric | ||
| 1214 | (?C . ?K) ; Chinese - Katakana | ||
| 1215 | )) | 1149 | )) |
| 1216 | 1150 | ||
| 1217 | ;; Local Variables: | 1151 | ;; Local Variables: |
diff --git a/src/ChangeLog b/src/ChangeLog index 0a11f86292c..25064915f1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2008-10-22 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * category.c (word_boundary_p): Check scripts instead of charset. | ||
| 4 | Handle nil value in word-separating-categories and | ||
| 5 | word-combining-categories. | ||
| 6 | (syms_of_category): Fix docstrings of word-separating-categories | ||
| 7 | and word-combining-categories. | ||
| 8 | |||
| 1 | 2008-10-21 Eli Zaretskii <eliz@gnu.org> | 9 | 2008-10-21 Eli Zaretskii <eliz@gnu.org> |
| 2 | 10 | ||
| 3 | * coding.c (Fencode_coding_region, Fdecode_coding_region) | 11 | * coding.c (Fencode_coding_region, Fdecode_coding_region) |