annotate lisp/mule/mule-category.el @ 5925:08cfc8f77fb6 cygwin

make space for long ptr, and store as such, for frame in WINDOW data, add a bit more debugging to debug-mswindow, Vin Shelton patch to fix M-x shell
author Henry Thompson <ht@markup.co.uk>
date Fri, 27 Feb 2015 17:41:20 +0000
parents bed39edf91ba
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
502
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 450
diff changeset
1 ;;; mule-category.el --- category functions for XEmacs/Mule. -*- coding: iso-2022-7bit; -*-
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995, 1997, 1999 Electrotechnical Laboratory, JAPAN.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 ;; Licensed to the Free Software Foundation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Copyright (C) 1995 Amdahl Corporation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 ;; Copyright (C) 1995 Sun Microsystems.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
11 ;; XEmacs is free software: you can redistribute it and/or modify it
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
12 ;; under the terms of the GNU General Public License as published by the
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
13 ;; Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
14 ;; option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
17 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
18 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
19 ;; for more details.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4805
diff changeset
22 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ;; Functions for working with category tables, which are a particular
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;; type of char table. Some function names / arguments should be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 ;; parallel with syntax tables.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 ;; Written by Ben Wing <ben@xemacs.org>. The initialization code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ;; at the end of this file comes from Mule.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 ;; Some bugfixes by Jareth Hein <jhod@po.iijnet.or.jp>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
36 (defvar defined-category-hashtable (make-hash-table :size 50))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
3970
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
38 (defun define-category (designator doc-string &optional table)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 "Make a new category whose designator is DESIGNATOR.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 DESIGNATOR should be a visible letter of ' ' thru '~'.
3970
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
41 DOC-STRING is a doc string for the category.
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
42 Letters of 'a' thru 'z' are already used or kept for the system.
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
43 The category should be defined only in category table TABLE, which defaults
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
44 to the current buffer's category table, but this is not implemented. "
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
45 ;; #### Implement the limiting of the definition.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 (check-argument-type 'category-designator-p designator)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 (check-argument-type 'stringp doc-string)
3970
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
48 (setq table (or table (category-table)))
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
49 (check-argument-type 'category-table-p table)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 (puthash designator doc-string defined-category-hashtable))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 (defun undefine-category (designator)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 "Undefine DESIGNATOR as a designator for a category."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 (check-argument-type 'category-designator-p designator)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 (remhash designator defined-category-hashtable))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 (defun defined-category-p (designator)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 "Return non-nil if DESIGNATOR is a designator for a defined category."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 (and (category-designator-p designator)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 (gethash designator defined-category-hashtable)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 (defun defined-category-list ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 "Return a list of the currently defined categories.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 Categories are given by their designators."
5363
311f6817efc2 Remove various redundant wrapper lambdas, core lisp.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4805
diff changeset
65 (hash-table-key-list defined-category-hashtable))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 (defun undefined-category-designator ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 "Return an undefined category designator, or nil if there are none."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 (let ((a 32) found)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 (while (and (< a 127) (not found))
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
71 (unless (gethash a defined-category-hashtable)
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
72 (setq found (make-char 'ascii a)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (setq a (1+ a)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 found))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 (defun category-doc-string (designator)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 "Return the doc-string for the category denoted by DESIGNATOR."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 (check-argument-type 'defined-category-p designator)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 (gethash designator defined-category-hashtable))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
81 (defun modify-category-entry (char-range designator &optional category-table reset)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 "Add a category to the categories associated with CHAR-RANGE.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 CHAR-RANGE is a single character or a range of characters,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 as per `put-char-table'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 The category is given by a designator character.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
86 The changes are made in CATEGORY-TABLE, which defaults to the current
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
87 buffer's category table.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 If optional fourth argument RESET is non-nil, previous categories associated
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 with CHAR-RANGE are removed before adding the specified category."
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
90 (or category-table (setq category-table (category-table)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
91 (check-argument-type 'category-table-p category-table)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 (check-argument-type 'defined-category-p designator)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 (if reset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 ;; clear all existing stuff.
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
95 (put-char-table char-range nil category-table))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 (map-char-table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 #'(lambda (key value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 ;; make sure that this range has a bit-vector assigned to it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 (if (not (bit-vector-p value))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 (setq value (make-bit-vector 95 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 (setq value (copy-sequence value)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 ;; set the appropriate bit in that vector.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 (aset value (- designator 32) 1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 ;; put the vector back, thus assuring we have a unique setting for this range
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
105 (put-char-table key value category-table))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
106 category-table char-range))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
108 (defun char-category-list (character &optional category-table)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
109 "Return a list of the categories that CHARACTER is in.
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
110 CATEGORY-TABLE defaults to the current buffer's category table.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 The categories are given by their designators."
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
112 (or category-table (setq category-table (category-table)))
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
113 (check-argument-type 'category-table-p category-table)
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
114 (let ((vec (get-char-table character category-table)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 (if (null vec) nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 (let ((a 32) list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 (while (< a 127)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (if (= 1 (aref vec (- a 32)))
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
119 (setq list (cons (make-char 'ascii a) list)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 (setq a (1+ a)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 (nreverse list)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122
444
576fb035e263 Import from CVS: tag r21-2-37
cvs
parents: 442
diff changeset
123 ;; implemented in C, file chartab.c (97/3/14 jhod@po.iijnet.or.jp)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 ;(defun char-in-category-p (char category &optional table)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 ; "Return non-nil if CHAR is in CATEGORY.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 ;TABLE defaults to the current buffer's category table.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 ;Categories are specified by their designators."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 ; (or table (setq table (category-table)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 ; (check-argument-type 'category-table-p table)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 ; (check-argument-type 'category-designator-p category)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 ; (let ((vec (get-char-table char table)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 ; (if (null vec) nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 ; (= 1 (aref vec (- category 32))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134
788
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
135 (put 'with-category-table 'lisp-indent-function 1)
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
136
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
137 (defmacro with-category-table (category-table &rest body)
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
138 `(let ((current-category-table (category-table)))
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
139 (set-category-table ,category-table)
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
140 (unwind-protect
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
141 (progn ,@body)
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
142 (set-category-table current-category-table))))
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 502
diff changeset
143
3970
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
144 (defun make-category-table ()
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
145 "Construct a new and empty category table and return it."
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
146 (make-char-table 'category))
949ac151a10d [xemacs-hg @ 2007-05-20 20:09:20 by aidan]
aidan
parents: 952
diff changeset
147
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 (defun describe-category ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 "Describe the category specifications in the category table.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 The descriptions are inserted in a buffer, which is then displayed."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 (interactive)
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
152 (with-displaying-help-buffer
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
153 (lambda ()
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 428
diff changeset
154 (describe-category-table (category-table) standard-output))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 (defun describe-category-table (table stream)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 (let (first-char
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 last-char
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 prev-val
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 (describe-one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 (lambda (first last value stream)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 (if (and (bit-vector-p value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 (> (reduce '+ value) 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 (if (equal first last)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 (cond ((vectorp first)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 (princ (format "%s, row %d"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 (charset-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 (aref first 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 (aref first 1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 stream))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 ((charsetp first)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 (princ (charset-name first) stream))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 (t (princ first stream)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 (cond ((vectorp first)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 (princ (format "%s, rows %d .. %d"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 (charset-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 (aref first 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 (aref first 1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 (aref last 1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 stream))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 (t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 (princ (format "%s .. %s" first last)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 stream))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 (describe-category-code value stream))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 (map-char-table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 (lambda (range value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 (if (and (or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 (and (characterp range)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 (characterp first-char)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 (eq (char-charset range) (char-charset first-char))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 (= (char-to-int last-char) (1- (char-to-int range))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 (and (vectorp range)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 (vectorp first-char)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 (eq (aref range 0) (aref first-char 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 (= (aref last-char 1) (1- (aref range 1))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 (equal value prev-val)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 (setq last-char range)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 (if first-char
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 (funcall describe-one first-char last-char prev-val stream)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 (setq first-char nil)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 (funcall describe-one range range value stream))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 table)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 (if first-char
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 (funcall describe-one first-char last-char prev-val stream))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 (defun describe-category-code (code stream)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 (let ((standard-output (or stream standard-output)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 (princ "\tin categories: ")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 (if (not (bit-vector-p code))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 (princ "(none)")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 (let ((i 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 already-matched)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 (while (< i 95)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 (if (= 1 (aref code i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 (if (not already-matched)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 (setq already-matched t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 (princ " "))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 (princ (int-to-char (+ 32 i)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 (setq i (1+ i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 (if (not already-matched)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 (princ "(none)")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 (let ((i 0))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 (while (< i 95)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 (if (= 1 (aref code i))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 (princ (format "\n\t\tmeaning: %s"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 (category-doc-string (int-to-char (+ 32 i))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 (setq i (1+ i)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 (terpri)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 (defconst predefined-category-list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 '((latin-iso8859-1 ?l "Latin-1 through Latin-5 character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 (latin-iso8859-2 ?l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 (latin-iso8859-3 ?l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 (latin-iso8859-4 ?l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 (latin-iso8859-9 ?l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 (cyrillic-iso8859-5 ?y "Cyrillic character set")
4805
980575c76541 Move the arabic-iso8859-6 character set back to C, otherwise X11 lookup fails.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4491
diff changeset
241 (arabic-iso8859-6 ?b "Arabic character set")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 (greek-iso8859-7 ?g "Greek character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 (hebrew-iso8859-8 ?w "Hebrew character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 (katakana-jisx0201 ?k "Japanese 1-byte Katakana character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 (latin-jisx0201 ?r "Japanese 1-byte Roman character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 (japanese-jisx0208-1978 ?j "Japanese 2-byte character set (old)")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 (japanese-jisx0208 ?j "Japanese 2-byte character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 (japanese-jisx0212 ?j)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 (chinese-gb2312 ?c "Chinese GB (China, PRC) 2-byte character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 (chinese-cns11643-1 ?t "Chinese Taiwan (CNS or Big5) 2-byte character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 (chinese-cns11643-2 ?t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 (chinese-big5-1 ?t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 (chinese-big5-2 ?t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 (korean-ksc5601 ?h "Hangul (Korean) 2-byte character set")
5662
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
255 (jit-ucs-charset-0 ?J "Just-in-time-allocated Unicode character")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 "List of predefined categories.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 Each element is a list of a charset, a designator, and maybe a doc string.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 (let (i l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 (define-category ?a "ASCII character set.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 (define-category ?l "Latin-1 through Latin-5 character set")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 (setq i 32)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 (while (< i 127)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 (modify-category-entry i ?a)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 (modify-category-entry i ?l)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 (setq i (1+ i)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 (setq l predefined-category-list)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 (while l
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 (if (and (nth 2 (car l))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 (not (defined-category-p (nth 2 (car l)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 (define-category (nth 1 (car l)) (nth 2 (car l))))
952
c10d0c3f965f [xemacs-hg @ 2002-08-02 16:54:11 by youngs]
youngs
parents: 788
diff changeset
273 (modify-category-entry (car (car l)) (nth 1 (car l)) nil t)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 (setq l (cdr l))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 ;;; Setting word boundary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 (setq word-combining-categories
5662
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
279 ;; XEmacs; we should change to defining scripts, as does GNU, once
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
280 ;; unicode-internal is the default, and placing word boundaries
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
281 ;; between different scripts, not different charsets, by default.
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
282 ;; Then we can remove the jit-ucs-charset-0 entry above and all the
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
283 ;; entries containing ?J in this list.
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
284 ;;
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
285 ;; These entries are a bit heuristic, working on the assumption that
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
286 ;; characters that will be just-in-time-allocated will not be East
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
287 ;; Asian in XEmacs, and there's also no mechanism to apply the ?J
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
288 ;; category to further newly-created JIT categories.
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
289 '((?l . ?l) (?J . ?l) (?l . ?J) (?J . ?y) (?y . ?J) (?J . ?b) (?b . ?J)
bed39edf91ba Be better about word boundaries with JIT unicode characters, mule-category.el
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
290 (?J . ?g) (?J . ?w) (?w . ?J)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 (setq word-separating-categories ; (2-byte character sets)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 '((?A . ?K) ; Alpha numeric - Katakana
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 (?A . ?C) ; Alpha numeric - Chinese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 (?H . ?A) ; Hiragana - Alpha numeric
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 (?H . ?K) ; Hiragana - Katakana
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 (?H . ?C) ; Hiragana - Chinese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 (?K . ?A) ; Katakana - Alpha numeric
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 (?K . ?C) ; Katakana - Chinese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 (?C . ?A) ; Chinese - Alpha numeric
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 (?C . ?K) ; Chinese - Katakana
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 ;;; At the present, I know Japanese and Chinese text can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 ;;; break line at any point under a restriction of 'kinsoku'.
450
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 444
diff changeset
306 ;;; #### SJT this needs to be set by language environments and probably should
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 444
diff changeset
307 ;;; be buffer-local---strategy for dealing with this: check all $language.el
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 444
diff changeset
308 ;;; files and also mule-base/$language-utils.el files for variables set;
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 444
diff changeset
309 ;;; these should be made buffer local and some kind of a- or p-list of vars
98528da0b7fc Import from CVS: tag r21-2-40
cvs
parents: 444
diff changeset
310 ;;; to be set for a language environment created.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 (defvar word-across-newline "\\(\\cj\\|\\cc\\|\\ct\\)"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 "Regular expression of such characters which can be a word across newline.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 (defvar ascii-char "[\40-\176]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 (defvar ascii-space "[ \t]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 (defvar ascii-symbols "[\40-\57\72-\100\133-\140\173-\176]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 (defvar ascii-numeric "[\60-\71]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 (defvar ascii-English-Upper "[\101-\132]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 (defvar ascii-English-Lower "[\141-\172]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 (defvar ascii-alphanumeric "[\60-\71\101-\132\141-\172]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 (defvar kanji-char "\\cj")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 (defvar kanji-space "$B!!(B")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 (defvar kanji-symbols "\\cS")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 (defvar kanji-numeric "[$B#0(B-$B#9(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 (defvar kanji-English-Upper "[$B#A(B-$B#Z(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 (defvar kanji-English-Lower "[$B#a(B-$B#z(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 (defvar kanji-hiragana "\\cH")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 (defvar kanji-katakana "\\cK")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 (defvar kanji-Greek-Upper "[$B&!(B-$B&8(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 (defvar kanji-Greek-Lower "[$B&A(B-$B&X(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 (defvar kanji-Russian-Upper "[$B'!(B-$B'A(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 (defvar kanji-Russian-Lower "[$B'Q(B-$B'q(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 (defvar kanji-Kanji-1st-Level "[$B0!(B-$BOS(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 (defvar kanji-Kanji-2nd-Level "[$BP!(B-$Bt$(B]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 (defvar kanji-kanji-char "\\(\\cH\\|\\cK\\|\\cC\\)")