aboutsummaryrefslogtreecommitdiffstats
path: root/leim
diff options
context:
space:
mode:
authorGerd Moellmann2001-04-05 10:09:36 +0000
committerGerd Moellmann2001-04-05 10:09:36 +0000
commit5853ec9c7c69d28d7b97e9620070c32e056520ab (patch)
treebc3d99d4d4940eccb8b0a90cbe8397c06766b28b /leim
parentdc2f8de4415c08a542f3f84fadffe8b2e0c0550f (diff)
downloademacs-5853ec9c7c69d28d7b97e9620070c32e056520ab.tar.gz
emacs-5853ec9c7c69d28d7b97e9620070c32e056520ab.zip
("japanese-hankaku-kana"): Don't use
the same translations as for `japanese'.
Diffstat (limited to 'leim')
-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'.
485 nil t t nil nil nil nil nil 485 nil t t nil nil nil nil nil
486 'quail-japanese-hankaku-update-translation) 486 'quail-japanese-hankaku-update-translation)
487 487
488;; Use the same map as that of `japanese'. 488(dolist (elt quail-japanese-transliteration-rules)
489(setcar (cdr (cdr quail-current-package)) 489 (quail-defrule (car elt)
490 (nth 2 (assoc "japanese" quail-package-alist))) 490 (let ((trans (nth 1 elt)))
491 (when (or (stringp trans) (vectorp trans))
492 (let ((s (japanese-hankaku (if (stringp trans)
493 trans
494 (aref trans 0)))))
495 ;; If the result of the conversion is a string
496 ;; containing more than one character, make the
497 ;; result a vector, so that quail-defrule
498 ;; recognizes the whole string is the
499 ;; translation, instead of interpreting
500 ;; individual characters as alternative
501 ;; translations.
502 (if (and (stringp s) (> (length s) 1))
503 (setq trans (vector s))
504 (setq trans s))))
505 trans)))
491 506
492(quail-define-package 507(quail-define-package
493 "japanese-hiragana" "Japanese" "あ" 508 "japanese-hiragana" "Japanese" "あ"
@@ -520,9 +535,9 @@ qq: toggle between this input method and the input method `japanese-ascii'.
520(dolist (elt quail-japanese-transliteration-rules) 535(dolist (elt quail-japanese-transliteration-rules)
521 (quail-defrule (car elt) 536 (quail-defrule (car elt)
522 (let ((trans (nth 1 elt))) 537 (let ((trans (nth 1 elt)))
523 (cond((stringp trans) 538 (cond ((stringp trans)
524 (japanese-katakana trans)) 539 (japanese-katakana trans))
525 ((vectorp trans) 540 ((vectorp trans)
526 (vector (japanese-katakana (aref trans 0)))) 541 (vector (japanese-katakana (aref trans 0))))
527 (t trans))))) 542 (t trans)))))
528 543