changeset 99017:5c7c783168dc

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.
author Kenichi Handa <handa@m17n.org>
date Wed, 22 Oct 2008 05:28:40 +0000
parents 3092df1e1b8a
children 268c24eb89a3
files lisp/international/characters.el
diffstat 1 files changed, 3 insertions(+), 69 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/characters.el	Wed Oct 22 05:23:47 2008 +0000
+++ b/lisp/international/characters.el	Wed Oct 22 05:28:40 2008 +0000
@@ -1138,80 +1138,14 @@
 
 ;;; 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: