comparison lisp/mule/mule-category.el @ 420:41dbb7a9d5f2 r21-2-18

Import from CVS: tag r21-2-18
author cvs
date Mon, 13 Aug 2007 11:24:09 +0200
parents 697ef44129c6
children
comparison
equal deleted inserted replaced
419:66615b78f1a5 420:41dbb7a9d5f2
1 ;;; mule-category.el --- category functions for XEmacs/Mule. 1 ;;; mule-category.el --- category functions for XEmacs/Mule.
2 2
3 ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc. 3 ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995, 1997, 1999 Electrotechnical Laboratory, JAPAN.
5 ;; Licensed to the Free Software Foundation.
4 ;; Copyright (C) 1995 Amdahl Corporation. 6 ;; Copyright (C) 1995 Amdahl Corporation.
5 ;; Copyright (C) 1995 Sun Microsystems. 7 ;; Copyright (C) 1995 Sun Microsystems.
6 8
7 ;; This file is part of XEmacs. 9 ;; This file is part of XEmacs.
8 10
241 "List of predefined categories. 243 "List of predefined categories.
242 Each element is a list of a charset, a designator, and maybe a doc string.") 244 Each element is a list of a charset, a designator, and maybe a doc string.")
243 245
244 (let (i l) 246 (let (i l)
245 (define-category ?a "ASCII character set.") 247 (define-category ?a "ASCII character set.")
248 (define-category ?l "Latin-1 through Latin-5 character set")
246 (setq i 32) 249 (setq i 32)
247 (while (< i 127) 250 (while (< i 127)
248 (modify-category-entry i ?a) 251 (modify-category-entry i ?a)
252 (modify-category-entry i ?l)
249 (setq i (1+ i))) 253 (setq i (1+ i)))
250 (setq l predefined-category-list) 254 (setq l predefined-category-list)
251 (while l 255 (while l
252 (if (and (nth 2 (car l)) 256 (if (and (nth 2 (car l))
253 (not (defined-category-p (nth 2 (car l))))) 257 (not (defined-category-p (nth 2 (car l)))))
254 (define-category (nth 1 (car l)) (nth 2 (car l)))) 258 (define-category (nth 1 (car l)) (nth 2 (car l))))
255 (modify-category-entry (car (car l)) (nth 1 (car l))) 259 (modify-category-entry (car (car l)) (nth 1 (car l)))
256 (setq l (cdr l)))) 260 (setq l (cdr l))))
261
262 ;;; Setting word boundary.
263
264 (setq word-combining-categories
265 '((?l . ?l)))
266
267 (setq word-separating-categories ; (2-byte character sets)
268 '((?A . ?K) ; Alpha numeric - Katakana
269 (?A . ?C) ; Alpha numeric - Chinese
270 (?H . ?A) ; Hiragana - Alpha numeric
271 (?H . ?K) ; Hiragana - Katakana
272 (?H . ?C) ; Hiragana - Chinese
273 (?K . ?A) ; Katakana - Alpha numeric
274 (?K . ?C) ; Katakana - Chinese
275 (?C . ?A) ; Chinese - Alpha numeric
276 (?C . ?K) ; Chinese - Katakana
277 ))
257 278
258 ;;; At the present, I know Japanese and Chinese text can 279 ;;; At the present, I know Japanese and Chinese text can
259 ;;; break line at any point under a restriction of 'kinsoku'. 280 ;;; break line at any point under a restriction of 'kinsoku'.
260 (defvar word-across-newline "\\(\\cj\\|\\cc\\|\\ct\\)" 281 (defvar word-across-newline "\\(\\cj\\|\\cc\\|\\ct\\)"
261 "Regular expression of such characters which can be a word across newline.") 282 "Regular expression of such characters which can be a word across newline.")