Don't setup
authorKenichi Handa <handa@m17n.org>
Wed, 22 Oct 2008 05:29:08 +0000 (05:29 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 22 Oct 2008 05:29:08 +0000 (05:29 +0000)
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.

lisp/ChangeLog
lisp/international/characters.el
src/ChangeLog

index 38110a0..05d153a 100644 (file)
@@ -1,3 +1,11 @@
+2008-10-22  Kenichi Handa  <handa@m17n.org>
+
+       * international/characters.el: 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.
+
 2008-10-21  Alan Mackenzie  <acm@muc.de>
 
        * simple.el (undo-more): Add comment explaining the operations on
index 5543650..159bac0 100644 (file)
@@ -1138,80 +1138,14 @@ Setup char-width-table appropriate for non-CJK language environment."
 \f
 ;;; Setting word boundary.
 
-(defun next-word-boundary-han (pos limit)
-  (if (<= pos limit)
-      (save-excursion
-       (goto-char pos)
-       (looking-at "\\cC+")
-       (goto-char (match-end 0))
-       (if (looking-at "\\cH+")
-           (goto-char (match-end 0)))
-       (point))
-    (while (and (> pos limit)
-               (eq (aref char-script-table (char-after (1- pos))) 'han))
-      (setq pos (1- pos)))
-    pos))
-
-(defun next-word-boundary-kana (pos limit)
-  (if (<= pos limit)
-      (save-excursion
-       (goto-char pos)
-       (if (looking-at "\\cK+")
-           (goto-char (match-end 0)))
-       (if (looking-at "\\cH+")
-           (goto-char (match-end 0)))
-       (if (looking-at "\\ck+")
-           (goto-char (match-end 0)))
-       (point))
-    (let ((category-set (char-category-set (char-after pos)))
-         category)
-      (if (or (aref category-set ?K) (aref category-set ?k))
-         (while (and (> pos limit)
-                     (setq category-set 
-                           (char-category-set (char-after (1- pos))))
-                     (or (aref category-set ?K) (aref category-set ?k)))
-           (setq pos (1- pos)))
-       (while (and (> pos limit)
-                   (aref (setq category-set
-                               (char-category-set (char-after (1- pos)))) ?H))
-         (setq pos (1- pos)))
-       (setq category (cond ((aref category-set ?C) ?C)
-                            ((aref category-set ?K) ?K)
-                            ((aref category-set ?A) ?A)))
-       (when category
-         (setq pos (1- pos))
-         (while (and (> pos limit)
-                     (aref (char-category-set (char-after (1- pos)))
-                           category))
-           (setq pos (1- pos)))))
-      pos)))
-
-(map-char-table
- #'(lambda (char script)
-     (cond ((eq script 'han)
-           (set-char-table-range find-word-boundary-function-table
-                                 char #'next-word-boundary-han))
-          ((eq script 'kana)
-           (set-char-table-range find-word-boundary-function-table
-                                 char #'next-word-boundary-kana))))
- char-script-table)
-
 (setq word-combining-categories
-      '((?l . ?l)
-       (?C . ?C)
+      '((nil . ?^)
+       (?^ . nil)
        (?C . ?H)
        (?C . ?K)))
 
 (setq word-separating-categories       ;  (2-byte character sets)
-      '((?A . ?K)                      ; Alpha numeric - Katakana
-       (?A . ?C)                       ; Alpha numeric - Chinese
-       (?H . ?A)                       ; Hiragana - Alpha numeric
-       (?H . ?K)                       ; Hiragana - Katakana
-       (?H . ?C)                       ; Hiragana - Chinese
-       (?K . ?A)                       ; Katakana - Alpha numeric
-       (?K . ?C)                       ; Katakana - Chinese
-       (?C . ?A)                       ; Chinese - Alpha numeric
-       (?C . ?K)                       ; Chinese - Katakana
+      '((?H . ?K)                      ; Hiragana - Katakana
        ))
 
 ;; Local Variables:
index 0a11f86..2506491 100644 (file)
@@ -1,3 +1,11 @@
+2008-10-22  Kenichi Handa  <handa@m17n.org>
+
+       * category.c (word_boundary_p): Check scripts instead of charset.
+       Handle nil value in word-separating-categories and
+       word-combining-categories.
+       (syms_of_category): Fix docstrings of word-separating-categories
+       and word-combining-categories.
+
 2008-10-21  Eli Zaretskii  <eliz@gnu.org>
 
        * coding.c (Fencode_coding_region, Fdecode_coding_region)