summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-04-05 10:09:36 +0000
committerGerd Moellmann <gerd@gnu.org>2001-04-05 10:09:36 +0000
commit5853ec9c7c69d28d7b97e9620070c32e056520ab (patch)
treebc3d99d4d4940eccb8b0a90cbe8397c06766b28b
parentdc2f8de4415c08a542f3f84fadffe8b2e0c0550f (diff)
downloademacs-5853ec9c7c69d28d7b97e9620070c32e056520ab.tar.gz
("japanese-hankaku-kana"): Don't use
the same translations as for `japanese'.
-rw-r--r--leim/quail/japanese.el31
1 files changed, 23 insertions, 8 deletions
diff --git a/leim/quail/japanese.el b/leim/quail/japanese.el
index 69239d5b9f6..f9f2837c6cc 100644
--- a/leim/quail/japanese.el
+++ b/leim/quail/japanese.el
@@ -485,9 +485,24 @@ qq: toggle between this input method and the input method `japanese-ascii'.
nil t t nil nil nil nil nil
'quail-japanese-hankaku-update-translation)
-;; Use the same map as that of `japanese'.
-(setcar (cdr (cdr quail-current-package))
- (nth 2 (assoc "japanese" quail-package-alist)))
+(dolist (elt quail-japanese-transliteration-rules)
+ (quail-defrule (car elt)
+ (let ((trans (nth 1 elt)))
+ (when (or (stringp trans) (vectorp trans))
+ (let ((s (japanese-hankaku (if (stringp trans)
+ trans
+ (aref trans 0)))))
+ ;; If the result of the conversion is a string
+ ;; containing more than one character, make the
+ ;; result a vector, so that quail-defrule
+ ;; recognizes the whole string is the
+ ;; translation, instead of interpreting
+ ;; individual characters as alternative
+ ;; translations.
+ (if (and (stringp s) (> (length s) 1))
+ (setq trans (vector s))
+ (setq trans s))))
+ trans)))
(quail-define-package
"japanese-hiragana" "Japanese" "あ"
@@ -520,9 +535,9 @@ qq: toggle between this input method and the input method `japanese-ascii'.
(dolist (elt quail-japanese-transliteration-rules)
(quail-defrule (car elt)
(let ((trans (nth 1 elt)))
- (cond((stringp trans)
- (japanese-katakana trans))
- ((vectorp trans)
- (vector (japanese-katakana (aref trans 0))))
- (t trans)))))
+ (cond ((stringp trans)
+ (japanese-katakana trans))
+ ((vectorp trans)
+ (vector (japanese-katakana (aref trans 0))))
+ (t trans)))))