Function: tit--ziranma-converter
tit--ziranma-converter is a byte-compiled function defined in
titdic-cnv.el.gz.
Signature
(tit--ziranma-converter DICBUF)
Aliases
ziranma-converter (obsolete since 30.1)
Source Code
;; Defined in /usr/src/emacs/lisp/international/titdic-cnv.el.gz
(defun tit--ziranma-converter (dicbuf)
(let (dic)
(with-current-buffer dicbuf
(goto-char (point-min))
(search-forward "\n%keyname end")
(forward-line 1)
(let ((table (make-hash-table :test 'equal))
pos key trans val)
(while (not (eobp))
(setq pos (point))
(skip-chars-forward "^ \t")
(setq key (buffer-substring-no-properties pos (point)))
(skip-chars-forward " \t")
(setq pos (point))
(skip-chars-forward "^\r\n")
(setq trans (vector (buffer-substring-no-properties pos (point))))
(setq val (gethash key table))
(if val (setq trans (vconcat val trans)))
(puthash key trans table)
(forward-line 1))
(maphash (lambda (key trans)
(let ((len (length trans))
i)
(if (and (= len 1) (= (length (aref trans 0)) 1))
(setq trans (aref trans 0))
(setq i 0)
(while (and (< i len)
(= (length (aref trans i)) 1))
(setq i (1+ i)))
(if (= i len)
(setq trans (mapconcat #'identity trans "")))))
(setq dic (cons (cons key trans) dic)))
table)))
(setq dic (sort dic (lambda (x y) (string< (car x) (car y)))))
(goto-char (point-max))
(insert (format "%S\n" "汉字输入∷【自然】∷
键盘对照表:
┏━━┳━━┳━━┳━━┳━━┳━━┳━━┳━━┳━━┳━━┓
┃Q ┃W ┃E ┃R ┃T ┃Y ┃Ush┃Ich┃O ┃P ┃
┃ iu┃ ua┃ e┃ uan┃ ue┃ uai┃ u┃ i┃ o┃ un┃
┃ ┃ ia┃ ┃ van┃ ve┃ ing┃ ┃ ┃ uo┃ vn┃
┗┳━┻┳━┻┳━┻┳━┻┳━┻┳━┻┳━┻┳━┻┳━┻┳━┛
┃A ┃S ┃D ┃F ┃G ┃H ┃J ┃K ┃L ┃
┃ a┃iong┃uang┃ en┃ eng┃ ang┃ an┃ ao┃ ai┃
┃ ┃ ong┃iang┃ ┃ ng┃ ┃ ┃ ┃ ┃
┗┳━┻┳━┻┳━┻┳━┻┳━┻┳━┻┳━┻┳━┻┳━┻┳━━┓
┃Z ┃X ┃C ┃Vzh┃B ┃N ┃M ┃, ┃. ┃ / ┃
┃ ei┃ ie┃ iao┃ ui┃ ou┃ in┃ ian┃前页┃后页┃符号┃
┃ ┃ ┃ ┃ v┃ ┃ ┃ ┃ ┃ ┃ ┃
┗━━┻━━┻━━┻━━┻━━┻━━┻━━┻━━┻━━┻━━┛
Pinyin base input method for Chinese GB2312 characters (`chinese-gb2312').
Pinyin is the standard roman transliteration method for Chinese.
For the details of Pinyin system, see the documentation of the input
method `chinese-py'.
Unlike the standard spelling of Pinyin, in this input method all
initials and finals are assigned to single keys (see the above table).
For instance, the initial \"ch\" is assigned to the key `i', the final
\"iu\" is assigned to the key `q', and tones 1, 2, 3, 4, and 轻声 are
assigned to the keys `q', `w', `e', `r', `t' respectively.
\\<quail-translation-docstring>
To input one-letter words, you type 4 keys, the first two for the
Pinyin of the letter, next one for tone, and the last one is always a
quote ('). For instance, \"vsq'\" input 中. Exceptions are these
letters. You can input them just by typing a single key.
Character: 按 不 次 的 二 发 个 和 出 及 可 了 没
Key: a b c d e f g h i j k l m
Character: 你 欧 片 七 人 三 他 是 着 我 小 一 在
Key: n o p q r s t u v w x y z
To input two-letter words, you have two ways. One way is to type 4
keys, two for the first Pinyin, two for the second Pinyin. For
instance, \"vsgo\" inputs 中国. Another way is to type 3 keys: 2
initials of two letters, and quote ('). For instance, \"vg'\" also
inputs 中国.
To input three-letter words, you type 4 keys: initials of three
letters, and the last is quote ('). For instance, \"bjy'2\" inputs 北
京鸭 (the last `2' is to select one of the candidates).
To input words of more than three letters, you type 4 keys, initials
of the first three letters and the last letter. For instance,
\"bjdt\" inputs 北京电视台.
To input symbols and punctuation, type `/' followed by one of `a' to
`z', then select one of the candidates."))
(insert " '((\"\C-?\" . quail-delete-last-char)
(\".\" . quail-next-translation)
(\"[\" . quail-next-translation)
(\",\" . quail-prev-translation)
(\"]\" . quail-prev-translation))
nil nil nil nil)\n\n")
(insert "(quail-define-rules\n")
(dolist (elt dic)
(insert (format "(%S %S)\n" (car elt) (cdr elt))))
(insert ")\n")))