[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/international/characters.el,v
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/international/characters.el,v |
Date: |
Wed, 22 Oct 2008 05:28:40 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 08/10/22 05:28:40
Index: characters.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/characters.el,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- characters.el 29 Aug 2008 08:01:43 -0000 1.76
+++ characters.el 22 Oct 2008 05:28:40 -0000 1.77
@@ -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:
- [Emacs-diffs] Changes to emacs/lisp/international/characters.el,v,
Kenichi Handa <=