;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302\303\304#\210\305\306!\210\305\307!\210\305\310!\207" [require pyim liberime nil t pyim-scheme-add (rime :document "rime 输入法。\n\n这个 scheme 适用于 librime 支持的所有输入法,通用性较好,但无法支\n持 trigger, 所以类似 pyim 全拼支持的v快捷键将无法使用。" :class rime :code-prefix "rime/" :code-prefix-history ("&") :first-chars "abcdefghijklmnopqrstuvwxyz" :rest-chars "abcdefghijklmnopqrstuvwxyz'-a" :prefer-triggers nil) (rime-quanpin :document "rime 全拼输入法。\n\n这个 scheme 专门用于 librime 全拼输入法,同时支持 trigger,\n也就是 v 快捷键,使用 rime 全拼的朋友建议使用这个 scheme。" :class rime :code-prefix "rime/" :code-prefix-history ("&") :first-chars "abcdefghjklmnopqrstwxyz" :rest-chars "vmpfwckzyjqdltxuognbhsrei'-a" :prefer-triggers ("v")) (rime-microsoft-shuangpin :document "rime 微软双拼输入法。" :class rime :code-prefix "rime/" :code-prefix-history ("&") :first-chars "abcdefghijklmnopqrstuvwxyz" :rest-chars "abcdefghijklmnopqrstuvwxyz;" :prefer-triggers nil)] 4) #@74 Advice function of `pyim-scheme-name'. (fn ORIG_FUNC &optional DEFAULT) (defalias 'pyim-liberime-scheme-name #[513 "!\300\301\"\211\302=\203\303\304!\203\202\305\202\207" [pyim-scheme-get-option :class rime featurep liberime-core quanpin] 6 (#$ . 1526)]) (advice-add 'pyim-scheme-name :around 'pyim-liberime-scheme-name) #@28 (fn ENTERED &optional _) (defalias 'pyim-imobjs-create:rime #[513 "CC\207" [] 3 (#$ . 1867)]) #@44 (fn IMOBJ SCHEME-NAME &optional FIRST-N) (defalias 'pyim-codes-create:rime #[770 "\300#\207" [pyim-codes-create:xingma] 7 (#$ . 1970)]) #@99 `pyim-candidates-create' 处理 rime 输入法的函数. (fn IMOBJS SCHEME-NAME &optional ASYNC) (defalias 'pyim-candidates-create:rime #[770 "\301@\"@\302\303\"\304\305\306#\203+\307\"\203&\211G\310O\266\202\202,\262\202,\211\311?\2057\312_\"\207" [pyim-page-length pyim-codes-create pyim-scheme-get-option :code-prefix replace-regexp-in-string "-" "" string-prefix-p nil liberime-search 2] 11 (#$ . 2117)]) #@28 (fn &optional SEPARATOR) (defalias 'pyim-page-preview-create:rime #[256 "\301 \206\302\303!r\304!q\210`\305\232\203\306P\202'\307\310P\310#\311\312`d\"Q)\207" [pyim-entered-buffer liberime-get-preedit pyim-entered-get point-before get-buffer-create 1 "|" replace-regexp-in-string "'" " |" buffer-substring-no-properties] 7 (#$ . 2553)]) (defvar pyim-liberime-code-log nil) (defvar pyim-liberime-word-log nil) #@74 从选词框中选择当前词条,然后删除该词条对应拼音。 (defalias 'pyim-select-word:rime #[0 "\305\306!\210\307\310!\311\312!\206\313\311 \314\"\203!\211G\315O\266\202\202#\262\316\"\211\314\"\203:\211G\315O\266\202\202<\262B B\211G\317V\204T\307\320!G\317V\203jr\321\n!q\210e`|\210\211c\210db\210)\322 \202\225\323\324!\324 !\"\210\325\311 \f\235\203\205\326\311 \327\"\210\202\212\326\311 !\210)\315\211\330 \210\331\332!\207" [pyim-liberime-code-log pyim-liberime-word-log pyim-entered-buffer pyim-default-scheme pyim-candidates pyim-process-outcome-handle candidate pyim-entered-get point-before pyim-outcome-get 1 "" string-prefix-p nil pyim-liberime-get-code 0 point-after get-buffer-create pyim-process-run pyim-liberime-create-word reverse quanpin pyim-process-create-word t pyim-process-terminate run-hooks pyim-select-finish-hook] 9 (#$ . 2979) nil]) #@51 适用于RIME的自动上屏器. (fn &rest ARGS) (defalias 'pyim-autoselector-rime #[128 "\300 \301\302\"\211\303=\205;\304 \305 \306\307\"\306\310\"\203+\211\311=\203+\312\313\314F\2029\2038\312\315\314F\2029\316\266\204\207" [pyim-scheme-name pyim-scheme-get-option :class rime liberime-get-commit liberime-get-context alist-get composition length 1 :select last :replace-with current nil] 11 (#$ . 3894)]) (add-to-list 'pyim-autoselector 'pyim-autoselector-rime) #@225 通过 CODES 和 WORDS 的信息,在 rime 后端重新造词和调整词频。 比如: 1. CODES -> ("nihao" "ma") 2. WORDS -> ("你好" "吗") 在 rime 后端将生成 “你好吗” 这个词条。 (fn CODES WORDS) (defalias 'pyim-liberime-create-word #[514 "<\205\217\211<\205\217\300\301\"?\205\217\300\301\"?\205\217\302 \210\303\304\305#\306\307\"\262\211\2039\211@\310!\210A\266\202\202(\210\307\211A\262\242\211\262\205\215\311\211\203\211\312 \313\314\"\313\315\"\313\316\"\317\320\321$\211\203o\322!\210\307\262\202\204\204w\204\200\307\262\307\262\202\204\310\323!\210\266\202H\210\202;\262\207" [cl-find-if-not stringp liberime-clear-composition mapconcat identity "" append nil liberime-process-key t liberime-get-context alist-get menu last-page-p candidates cl-position :test equal liberime-select-candidate 65366] 13 (#$ . 4383)]) #@110 Create WORD at current rime backend. ONlY works with quanpin. (fn WORD &optional PREPEND WORDCOUNT-HANDLER) (defalias 'pyim-liberime-process-create-word #[769 "\3001>\301\302\"\303\304\305\306\"\235\205:\211\211\2058\211@\307\310\"\2041\311\312\313\"\314\315\312\n\315\"\"\"\210\316 \210A\266\202\202\262\2620\207\210\317\207" [(error) pyim-cstring-to-codes quanpin "你好" liberime-search "nihao" 10 pyim-string-match-p "[^ a-z-]" pyim-liberime-create-word split-string "-" remove "" pyim-process-terminate:rime nil] 13 (#$ . 5284)]) (advice-add 'pyim-process-create-word :after 'pyim-liberime-process-create-word) #@275 Get the code of WORD from the beginning of INPUT. `liberime-search' with LIMIT argument is used internal. NOTE: This is a hacky approach, the better way is let librime provide an API. Please see: https://github.com/rime/librime/issues/349 (fn WORD INPUT &optional LIMIT) (defalias 'pyim-liberime-get-code #[770 "\301\302\303\304#\305\306\307 \"\310\311\312#)\266\203\203b\313 \204\"\314\315\"\210G\316\313 \317\"\320\321G^#G\322_^\310\321V\203a\321O\262\314\315\"\210\316\313 \317\"\232\203Z\321\262\2028S\262\2028\207\301\302\323\304#\305\306\307 \"\310\311\312#)\266\203\203\247\316\313 \317\"\324\310\203\241\211A\262\242P\262\314\325\"\262\235\203\201\310\262\202\201\206\246\207\207" [inhibit-changing-match-data mapconcat identity ("pinyin" "luna" "terra" "bopomofo" "stenotype" "jyut6ping3" "wugniu" "soutzoe" "zyenpheng" "sampheng" "clover") "\\|" alist-get schema_id liberime-get-status nil t string-match liberime-get-preedit liberime-search 1 split-string "[ ']+" cl-subseq 0 5 ("wubi86" "wubi98") "" 20] 12 (#$ . 5922)]) (defalias 'pyim-process-terminate:rime #[0 "\300 \210\301 \207" [liberime-clear-commit liberime-clear-composition] 1]) (provide 'pyim-liberime)