aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international/characters.el
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2008-10-22 05:29:08 +0000
committerKenichi Handa <[email protected]>2008-10-22 05:29:08 +0000
commit4626499f4fd3b6de6c61a3dc240b88e143a70ecb (patch)
treeb353cbf92fb58ff0871b9f75af1d705bb625e63a /lisp/international/characters.el
parent714b2198bf98f68e3f721675c4df8cefb7d0b268 (diff)
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.
Diffstat (limited to 'lisp/international/characters.el')
-rw-r--r--lisp/international/characters.el72
1 files changed, 3 insertions, 69 deletions
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 5543650ff7..159bac0246 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."
;;; 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: