summaryrefslogtreecommitdiff
path: root/lisp/language/japan-util.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2009-11-13 06:21:38 +0000
committerKenichi Handa <handa@m17n.org>2009-11-13 06:21:38 +0000
commitbf89fd7bb5bcb3e87e16158eddb85400754948e9 (patch)
tree470d783a732acf56abaf7a449da161b570d6575d /lisp/language/japan-util.el
parentf70b89257e27648f72a025d7a6f41e0f72e8fdaa (diff)
downloademacs-bf89fd7bb5bcb3e87e16158eddb85400754948e9.tar.gz
Make sure that the value of jisx0208 property is jisx0208 character.
Diffstat (limited to 'lisp/language/japan-util.el')
-rw-r--r--lisp/language/japan-util.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index 96fd8957d20..e0e226866bc 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -109,10 +109,10 @@ HANKAKU-KATAKANA belongs to `japanese-jisx0201-kana'.")
(?@ ?@)
;; cp932-2-byte
(#x2015 ?-) (#xFF5E ?~) (#xFF0D ?-))
- "Japanese JISX0208 symbol character table.
+ "Japanese JISX0208 and CP932 symbol character table.
Each element is of the form (SYMBOL ASCII HANKAKU), where SYMBOL
-belongs to `japanese-jisx0208', ASCII belongs to `ascii', and HANKAKU
-belongs to `japanese-jisx0201-kana'.")
+belongs to `japanese-jisx0208' or `cp932', ASCII belongs to `ascii',
+and HANKAKU belongs to `japanese-jisx0201-kana'.")
;; Put properties 'jisx0208, 'jisx0201, and 'ascii to each Japanese
;; symbol and ASCII characters for conversion among them.
@@ -125,11 +125,13 @@ belongs to `japanese-jisx0201-kana'.")
(if ascii
(progn
(put-char-code-property jisx0208 'ascii ascii)
- (put-char-code-property ascii 'jisx0208 jisx0208)))
+ (if (encode-char jisx0208 'japanese-jisx0208)
+ (put-char-code-property ascii 'jisx0208 jisx0208))))
(if jisx0201
(progn
(put-char-code-property jisx0208 'jisx0201 jisx0201)
- (put-char-code-property jisx0201 'jisx0208 jisx0208)))))
+ (if (encode-char jisx0208 'japanese-jisx0208)
+ (put-char-code-property jisx0201 'jisx0208 jisx0208))))))
(defconst japanese-alpha-numeric-table
'((?0 . ?0) (?1 . ?1) (?2 . ?2) (?3 . ?3) (?4 . ?4)