;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!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\311\312\313\314\315\316%\210\317\320\321\313#\210\322\211\203P\211@\320N\203I\321N\204I\323\321\320N#\210A\266\202\202/\210\324\320\321\325#\210\326\321\327\330\331DD\332\333\334%\210\326\335\327\330\336DD\337\333\334%\210\317\340\341\313#\210\322\211\203\227\211@\340N\203\220\341N\204\220\323\341\340N#\210A\266\202\202v\210\324\340\341\325#\210\326\341\327\330\342DD\343\333\344%\207" [require subr-x cl-lib help-mode pyim-common pyim-scheme pyim-page pyim-process pyim-cstring custom-declare-group pyim nil "Pyim is a Chinese input method support quanpin, shuangpin, wubi and cangjie." :group leim defvaralias pyim-page-select-finish-hook pyim-select-finish-hook (saved-value saved-variable-comment) put make-obsolete-variable "4.0" custom-declare-variable funcall function #[0 "\300\207" [nil] 1] "Pyim 选词完成时运行的 hook." :type hook pyim-convert-string-at-point-hook #[0 "\300\207" [nil] 1] "Hook of `pyim-convert-string-at-point'.\n\n这个 hook 运行时机:\n1. 获取并删除光标处 code 字符串之后。\n2. code 转换得到的中文字符串插入之前。\n\nTip: 用户也可以利用 `pyim-outcome-trigger-function-default' 函数\n来构建适合自己的 hook 函数。" pyim-page-select-word-by-number pyim-select-word-by-number #[0 "\300\207" [t] 1] "使用数字键来选择词条.\n\n如果设置为 nil, 将直接输入数字,适用于使用数字做为\n编码的输入法。" boolean] 7) (defvar pyim-title "PYIM ") (defvar pyim-load-hook nil) (defvar pyim-active-hook nil) (defvar pyim-inactive-hook nil) #@18 Pyim 的 Keymap. (defvar pyim-mode-map (byte-code "\300 \301\211\302W\203\303\304!\305#\210\211T\262\202\306\262\211\307W\2030\303\310!\305#\210\211T\262\202\311\312\313\"\211\203I\211@\303\304!\314#\210A\266\202\2024\210\303\315\316#\210\303\317\320#\210\303\321\322#\210\303\323\324#\210\303\325\324#\210\303\326\327#\210\303\330\331#\210\303\332\327#\210\303\333\331#\210\303\334\335#\210\303\336\335#\210\303\337\322#\210\303\340\341#\210\303\342\343#\210\303\344\345#\210\303\346\347#\210\303\350\351#\210\303\352\353#\210\303\354\355#\210\303\356\357#\210\303\360\361#\210\303\362\363#\210\303\364\355#\210\303\365\357#\210\303\366\367#\210\303\370\367#\210\303\371\372#\210\303\373\372#\210\207" [make-sparse-keymap 32 127 define-key char-to-string pyim-self-insert-command 128 256 vector number-sequence 48 57 pyim-select-word-by-number " " pyim-select-word [67108896] pyim-select-word-simple [backspace] pyim-delete-backward-char [delete] pyim-delete-forward-char "" [M-backspace] pyim-delete-backward-imelem [M-delete] pyim-delete-forward-imelem [C-backspace] [C-delete] [9] pyim-toggle-assistant-scheme " " "" "" pyim-forward-point "" pyim-backward-point "\346" pyim-forward-imelem "\342" pyim-backward-imelem "" pyim-end-of-line "" pyim-beginning-of-line "=" pyim-page-next-page "-" pyim-page-previous-page "" pyim-page-next-word "" pyim-page-previous-word "\356" "\360" " " pyim-quit-no-clear [return] "" pyim-quit-clear ""] 8) (#$ . 2095)) (pyim-register-local-variables '(input-method-function inactivate-current-input-method-function describe-current-input-method-function)) #@321 得到需要插入到 buffer 的字符串, 并将其插入到待输入 buffer. 这个函数会处理用户输入的字符,并最终的得到需要插入 buffer 的字符 串。这个字符串会被分解为 event list, 通过 emacs 低层函数 `read-event' 来将这些 list 插入到 *待输入buffer*。 (fn KEY) (defalias 'pyim-input-method #[257 "\204\f \204\f\n\203\211C\207\306 \210\307 \310\211\310\311\312\313\314\315!\316\"\317$\216\320\216\321!\211;\205G\211G\312V\205G\203C\211\312HC\202G\322\323\"\262-\207" [buffer-read-only overriding-terminal-local-map overriding-local-map buffer-undo-list inhibit-read-only inhibit-modification-hooks pyim-process-init-ui buffer-modified-p t make-byte-code 0 "\300?\205\301\302!\207" vconcat vector [restore-buffer-modified-p nil] 2 #[0 "\300 \207" [pyim-process-terminate] 1] pyim-input-method-1 mapcar identity input-method-exit-on-first-char] 9 (#$ . 3751)]) #@790 `pyim-input-method-1' 是 `pyim-input-method' 内部使用的函数。 这个函数比较复杂,作许多低层工作,但它的一个重要流程是: 1. 使用函数 `read-key-sequence' 得到 key-sequence 2. 使用函数 `lookup-key' 查询 `pyim-mode-map' 中,与上述 key-sequence 对应 的命令。 3. 如果查询得到的命令是 self-insert-command 时,调用这个函数。 4. 这个函数最终会返回需要插入到 buffer 的字符串。 这个部份的代码涉及许多 emacs 低层函数,相对复杂,不容易理解,有兴 趣的朋友可以参考: 1. `quail-input-method' 相关函数。 2. elisp 手册相关章节: 1. Invoking the Input Method 2. Input Methods 3. Miscellaneous Event Input Features 4. Reading One Event (fn KEY) (defalias 'pyim-input-method-1 #[257 "\211\250\204 \211\204\215\306\307\n\307\211\310 \307\211\307\311\312 \210\203,\313!\210\203\206\314!\210\315\307\211\211\311$\316\n\"\203I\317!\202L\320!\203x\211GSH\211\311\262\3211k\322!0\202t\323\324\"\210\325 \262\210\202\201\313\326 \311\"\210\327 \210\266\202,\330\307\311\".\207\331!\207" [echo-keystrokes help-char pyim-mode-map overriding-terminal-local-map input-method-function input-method-use-echo-area 0 nil buffer-modified-p t pyim-process-cleanup-input-output pyim-add-unread-command-events set-buffer-modified-p read-key-sequence lookup-key commandp pyim-process-self-insert-command-p (debug error) call-interactively message "pyim 出现错误: %S , 开启 debug-on-error 后可以了解详细情况。" beep this-single-command-raw-keys pyim-process-terminate pyim-process-get-outcome char-to-string last-command-event last-command this-command pyim-process-translating] 9 (#$ . 4695)]) (register-input-method "pyim" "euc-cn" 'pyim-active pyim-title) #@920 pyim 启动函数. pyim 是使用 `pyim-active' 来启动输入法,这个命令主要做如下工作: 1. 重置所有的 local 变量。 2. 创建汉字到拼音和拼音到汉字的 hash table。 3. 创建词库缓存 dcache. 4. 运行 hook: `pyim-load-hook'。 5. 将 `pyim-dcache-save-caches' 命令添加到 `kill-emacs-hook' , emacs 关闭 之前将用户选择过的词生成的缓存和词频缓存保存到文件,供以后使用。 6. 设定变量: 1. `input-method-function' 2. `deactivate-current-input-method-function' 7. 运行 `pyim-active-hook' pyim 使用函数 `pyim-active' 启动输入法的时候,会将变量 `input-method-function' 设置为 `pyim-input-method' ,这个变量会影 响 `read-event' 的行为。 当输入字符时,`read-event' 会被调用,`read-event' 调用的过程中, 会执行 `pyim-input-method' 这个函数。 (fn NAME &optional ACTIVE-FUNC) (defalias 'pyim-active #[513 "\303 \210\304 \210\305\306\307!\210\310\311\312\"\210\313\314\315 \316 =\203\"\310\317\320\"\210\306\321!\210\305\207" [pyim-assistant-scheme-enable input-method-function deactivate-current-input-method-function pyim-process-start-daemon pyim-process-init-dcaches nil run-hooks pyim-load-hook add-hook kill-emacs-hook #[0 "\300\301!\207" [pyim-process-save-dcaches t] 2] pyim-input-method pyim-inactivate selected-window minibuffer-window minibuffer-exit-hook pyim-exit-from-minibuffer pyim-active-hook] 5 (#$ . 6548) nil]) #@29 Pyim 从 minibuffer 退出. (defalias 'pyim-exit-from-minibuffer #[0 "\300 \210\301 \302X\205\303\304\305\"\207" [quail-exit-from-minibuffer minibuffer-depth 1 remove-hook minibuffer-exit-hook pyim-exit-from-minibuffer] 3 (#$ . 8031)]) #@196 重启 pyim,不建议用于编程环境. 这个函数用于重启 pyim,其过程和 `pyim-active' 类似,只是在输入法重 启之前,询问用户,是否保存个人词频信息。 (defalias 'pyim-restart #[0 "\300\301!\302!\207" [yes-or-no-p "重启 pyim 前,需要保存个人词频信息吗? " pyim-restart-1] 3 (#$ . 8276) nil]) #@226 重启 pyim,用于编程环境. 当 SAVE-PERSONAL-DCACHE 是 non-nil 时,保存个人词库文件。 REFRESH-COMMON-DCACHE 已经废弃,不要再使用了。 (fn &optional SAVE-PERSONAL-DCACHE REFRESH-COMMON-DCACHE) (defalias 'pyim-restart-1 #[512 "\300!\210\301\302!\207" [pyim-process-save-dcaches pyim-process-init-dcaches :force] 4 (#$ . 8635)]) #@37 Pyim 默认的 self-insert-command. (defalias 'pyim-self-insert-command #[0 "\304 \203r\305\n!q\210\306 !c\210)\307 \207\310 \203\"\311\312!\210\313 \207\311\314!\210\313 \207" [pyim-candidates pyim-candidates-last pyim-entered-buffer last-command-event pyim-process-input-chinese-p get-buffer-create char-to-string pyim-process-run pyim-process-get-candidates pyim-process-outcome-handle candidate-and-last-char pyim-process-terminate last-char] 2 (#$ . 9001) "*"]) (byte-code "\301\302\"\203\f\210\202\302B\301\207" [pyim-process-self-insert-commands memql pyim-self-insert-command] 3) #@162 将光标前字符数为 NUMBER 的中文字符串添加到个人词库中,当 SILENT 设置为 t 是,不显示提醒信息。 (fn &optional NUMBER SILENT) (defalias 'pyim-create-word-at-point #[512 "\300\206\301!\302\205\303!\262?\205\304\305\"\207" [pyim-cstring-at-point 2 nil pyim-process-create-word message "将词条: %S 加入 personal 缓冲。"] 7 (#$ . 9608)]) #@69 将光标前2个中文字符组成的字符串加入个人词库。 (defalias 'pyim-create-2cchar-word-at-point #[0 "\300\301!\207" [pyim-create-word-at-point 2] 2 (#$ . 10003) nil]) #@69 将光标前3个中文字符组成的字符串加入个人词库。 (defalias 'pyim-create-3cchar-word-at-point #[0 "\300\301!\207" [pyim-create-word-at-point 3] 2 (#$ . 10192) nil]) #@69 将光标前4个中文字符组成的字符串加入个人词库。 (defalias 'pyim-create-4cchar-word-at-point #[0 "\300\301!\207" [pyim-create-word-at-point 4] 2 (#$ . 10381) nil]) #@71 Add the selected text as a Chinese word into the personal dictionary. (defalias 'pyim-create-word-from-selection #[0 "\301 \205:\302\303 \304 \"\305G\306V\203\307\310!\2028\311\305\312\313#)\266\203\204/\307\314!\2028\315!\262\316\317\"\266\202\207" [inhibit-changing-match-data region-active-p buffer-substring-no-properties region-beginning region-end nil 6 error "词条太长" "^\\cc+\\'" t string-match "不是纯中文字符串" pyim-process-create-word message "将词条: %S 插入 personal file。"] 9 (#$ . 10570) nil]) #@338 从 FILE 中导入词条以及词条对应的词频信息。 MERGE-METHOD 是一个函数,这个函数需要两个数字参数,代表 词条在词频缓存中的词频和待导入文件中的词频,函数返回值做为合并后的词频使用, 默认方式是:取两个词频的最大值。 (fn FILE &optional MERGE-METHOD) (defalias 'pyim-import #[513 "\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312\313!\210)eb\210\314y\210m\204L\315 \211@\316A@\2060\317!\320\321\303\322\323\306\307\f \"\324\"\325\326%#\266\314y\210\202 *\210\327\330!\210\331 \210\332\333!\207" [coding-system-for-read generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 utf-8-unix insert-file-contents 1 pyim-dline-parse string-to-number "0" pyim-process-create-word nil 257 "\300\206\302\206\n\303\301\"\207" [max 0] 4 "\n\n(fn X)" pyim-process-save-dcaches t pyim-process-update-personal-words message "pyim: 词条相关信息导入完成!"] 16 (#$ . 11122) "F导入词条相关信息文件: "]) #@272 从个人词库缓存中批量删除 FILE 文件中列出的词条. FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同, 另外这个命令也可以识别没有词频的行,比如: ;;; -*- coding: utf-8-unix -*- 词条1 词条2 (fn FILE) (defalias 'pyim-delete-words-in-file #[257 "\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312\313!\210)eb\210\314y\210m\204=\315 @\211\2036\316\317\"\2046\320!\210\210\314y\210\202 *\210\321\322!\207" [coding-system-for-read generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 utf-8-unix insert-file-contents 1 pyim-dline-parse pyim-string-match-p "\\CC" pyim-process-delete-word message "pyim: 批量删词完成!"] 8 (#$ . 12212) "F记录待删词条的文件: "]) #@50 从个人词库中删除最新创建的词条。 (defalias 'pyim-delete-last-word #[0 "\205\f\301!\210\302\303\"\207" [pyim-process-last-created-word pyim-process-delete-word message "pyim: 从个人词库中删除词条 “%s” !"] 3 (#$ . 13046) nil]) #@160 将光标前字符数为 NUMBER 的中文字符串从个人词库中删除 当 SILENT 设置为 t 是,不显示提醒信息。 (fn &optional NUMBER SILENT) (defalias 'pyim-delete-word-at-point #[512 "\300\206\301!\211\205\302!\210?\205\303\304\"\207" [pyim-cstring-at-point 2 pyim-process-delete-word message "词条: \"%s\" 已经从个人词库缓冲中删除。"] 6 (#$ . 13312)]) #@53 将高亮选择的词条从个人词库中删除。 (defalias 'pyim-delete-word #[0 "\203!\301\302 \303 \"\211G\304W\205 \211G\305V\205 \306!\210\307\310\"\207\307\311!\207" [mark-active buffer-substring-no-properties region-beginning region-end 6 0 pyim-process-delete-word message "将词条: %S 从 personal 缓冲中删除。" "请首先高亮选择需要删除的词条。"] 4 (#$ . 13715) nil]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias pyim-page-select-word-simple pyim-select-word-simple nil make-obsolete "4.0"] 4) #@364 从选词框中选择当前词条. 这个函数与 `pyim-select-word' 的区别是: 这个函数不会将选择的词条加入个人词库,主要的使用场景是: 当用户需要输入一个生僻字时,输入包含该字的一个词条, 然后再删除不需要的字,由于这个词条不是常用词条,所以 不需要保存到个人词库。 (defalias 'pyim-select-word-simple #[0 "\300 \204\f\301\302!\210\202\301\303!\210\304 \207" [pyim-process-get-candidates pyim-process-outcome-handle last-char candidate pyim-process-terminate] 2 (#$ . 14276) nil]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias pyim-page-select-word pyim-select-word nil make-obsolete "4.0"] 4) #@74 从选词框中选择当前词条,然后删除该词条对应拼音。 (defalias 'pyim-select-word #[0 "\300 \210\301 \204\302\303!\210\304 \207\305\306 \307\"\310\311\312\"!\203)\313!\203)\211 \202,\314\315!\207" [pyim-process-create-code-criteria pyim-process-get-candidates pyim-process-outcome-handle last-char pyim-process-terminate pyim-scheme-get-option pyim-scheme-name :class intern format "pyim-select-word:%S" functionp call-interactively pyim-select-word:pinyin] 5 (#$ . 14995) nil]) #@74 从选词框中选择当前词条,然后删除该词条对应拼音。 (defalias 'pyim-select-word:pinyin #[0 "\301\302!\210\303 @\304 G\304\305!GZ\306\307\310\311\233\"\312#GW\204*\313\314!G\315V\203Dr\316!q\210e`|\210\211c\210\317\320\321\305#b\210)\322 \202`\304 \323 \235\203U\324\304 \321\"\210\202Z\324\304 !\210\325 \210\326\327!\207" [pyim-entered-buffer pyim-process-outcome-handle candidate pyim-process-get-imobjs pyim-process-get-outcome 1 mapconcat identity mapcar #[257 "\3008\3018P\207" [2 3] 4 "\n\n(fn W)"] "" pyim-process-get-entered point-after 0 get-buffer-create pyim-process-next-imelem-position 20 t pyim-process-run pyim-process-get-candidates pyim-process-create-word pyim-process-terminate run-hooks pyim-select-finish-hook] 8 (#$ . 15507) nil]) #@74 从选词框中选择当前词条,然后删除该词条对应编码。 (defalias 'pyim-select-word:xingma #[0 "\301\302!\210r\303!q\210`\304V\205`dW)\203%r\303!q\210e`|\210)\305 \207\306 G\304V\203C\306 \307 \235\203>\310\306 \311\"\210\202C\310\306 !\210\312 \210\313\314!\207" [pyim-entered-buffer pyim-process-outcome-handle candidate get-buffer-create 1 pyim-process-run pyim-process-get-outcome pyim-process-get-candidates pyim-process-create-word t pyim-process-terminate run-hooks pyim-select-finish-hook] 3 (#$ . 16300) nil]) (byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias pyim-page-select-word-by-number pyim-select-word-by-number nil make-obsolete "4.0"] 4) #@65 使用数字编号来选择对应的词条。 (fn &optional N) (defalias 'pyim-select-word-by-number #[256 "\204\211\203D\302 \204\303\304!\210\305 \207\211\247\203\211S\202! \306Z\307 \310U\203,\311\262\312 \\V\203:\313 \202C\314\312 \\!\210\315 \207\316\317!\207" [pyim-select-word-by-number last-command-event pyim-process-get-candidates pyim-process-outcome-handle last-char pyim-process-terminate 49 pyim-page-end -1 9 pyim-page-start pyim-page-refresh pyim-process-set-candidate-position pyim-select-word call-interactively pyim-self-insert-command] 6 (#$ . 17003) nil]) #@30 取消当前输入的命令. (defalias 'pyim-quit-clear #[0 "\300\301!\210\302 \207" [pyim-process-outcome-handle "" pyim-process-terminate] 2 (#$ . 17604) nil]) #@21 字母上屏命令. (defalias 'pyim-quit-no-clear #[0 "\300\301!\210\302 \207" [pyim-process-outcome-handle pyim-entered pyim-process-terminate] 2 (#$ . 17772) nil]) #@30 取消 pyim 的激活状态. (defalias 'pyim-inactivate #[0 "\300 \210\301 \210\302\303!\207" [pyim-kill-local-variables pyim-process-stop-daemon run-hooks pyim-inactive-hook] 2 (#$ . 17944) nil]) #@70 pyim 切换中英文输入模式。同时调整标点符号样式。 (defalias 'pyim-toggle-input-ascii #[0 "?\211\207" [pyim-process-input-ascii] 2 (#$ . 18147) nil]) #@141 临时切换到辅助输入法. 这个功能一般用于五笔等形码输入法,在忘记编码的时候临时用拼音输入 中文。 (defalias 'pyim-toggle-assistant-scheme #[0 "\301\302!G\303U\203\304\305!\210\306 \207?\307 \207" [pyim-assistant-scheme-enable pyim-process-get-entered point-before 0 pyim-process-outcome-handle last-char pyim-process-terminate pyim-process-run] 2 (#$ . 18324) nil]) (byte-code "\300\301\302\303#\210\304\301\302\305#\210\300\306\307\303#\210\304\306\307\305#\210\300\306\307\303#\210\304\306\307\305#\210\300\310\311\303#\210\304\310\311\305#\210\300\312\313\303#\210\304\312\313\305#\210\300\310\311\303#\210\304\310\311\305#\210\300\301\302\303#\210\304\301\302\305#\210\300\314\315\303#\210\304\314\315\305#\210\300\316\317\303#\210\304\316\317\305#\210\300\320\321\303#\210\304\320\321\305#\210\300\322\323\303#\210\304\322\323\305#\210\300\324\325\303#\210\304\324\325\305#\207" [defalias pyim-entered-delete-backward-char pyim-delete-backward-char nil make-obsolete "4.0" pyim-entered-delete-forward-char pyim-delete-forward-char pyim-entered-delete-backward-imelem pyim-delete-backward-imelem pyim-entered-delete-forward-imelem pyim-delete-forward-imelem pyim-entered-forward-point pyim-forward-point pyim-entered-backward-point pyim-backward-point pyim-entered-forward-imelem pyim-forward-imelem pyim-entered-backward-imelem pyim-backward-imelem pyim-entered-end-of-line pyim-end-of-line] 4) #@14 光标前移 (defalias 'pyim-forward-point #[0 "r\301!q\210\3021\303u0\202\210\202\210)\304\305!\207" [pyim-entered-buffer get-buffer-create (error) nil pyim-process-run t] 2 (#$ . 19776) nil]) #@14 光标后移 (defalias 'pyim-backward-point #[0 "r\301!q\210\3021\303u0\202\210\202\210)\304\305!\207" [pyim-entered-buffer get-buffer-create (error) -1 pyim-process-run t] 2 (#$ . 19983) nil]) #@139 光标向后移动一个 imelem 对应的字符串 在全拼输入法中,就是向前移动一个拼音 (fn &optional SEARCH-FORWARD) (defalias 'pyim-backward-imelem #[256 "\301\302\"r\303!q\210\211b\210)\304\305!\207" [pyim-entered-buffer pyim-process-next-imelem-position 1 get-buffer-create pyim-process-run t] 4 (#$ . 20191) nil]) #@52 光标向前移动一个 imelem 对应的字符串 (defalias 'pyim-forward-imelem #[0 "\300\301!\207" [pyim-backward-imelem t] 2 (#$ . 20538) nil]) #@20 光标移至行尾 (defalias 'pyim-end-of-line #[0 "r\301!q\210\302\210)\303\304!\207" [pyim-entered-buffer get-buffer-create nil pyim-process-run t] 2 (#$ . 20692) nil]) #@20 光标移至行首 (defalias 'pyim-beginning-of-line #[0 "r\301!q\210\302 \210)\303\304!\207" [pyim-entered-buffer get-buffer-create beginning-of-line pyim-process-run t] 2 (#$ . 20871) nil]) #@42 向后删除1个字符 (fn &optional N) (defalias 'pyim-delete-backward-char #[256 "r\301!q\210\3021\303\206\304[!0\202\210\202\210)\305\306!G\307V\203)\310\311!\207\312\313!\210\314 \207" [pyim-entered-buffer get-buffer-create (error) delete-char 1 pyim-process-get-entered point-before 0 pyim-process-run t pyim-process-outcome-handle "" pyim-process-terminate] 3 (#$ . 21070) nil]) #@24 向前删除1个字符 (defalias 'pyim-delete-forward-char #[0 "\300\301!\207" [pyim-delete-backward-char -1] 2 (#$ . 21473) nil]) #@77 向后删除一个 imelem 对应的字符串 (fn &optional SEARCH-FORWARD) (defalias 'pyim-delete-backward-imelem #[256 "\301\302\"r\303!q\210`|\210)\304\305!\207" [pyim-entered-buffer pyim-process-next-imelem-position 1 get-buffer-create pyim-process-run t] 4 (#$ . 21610) nil]) #@46 向前删除一个 imelem 对应的字符串 (defalias 'pyim-delete-forward-imelem #[0 "\300\301!\207" [pyim-delete-backward-imelem t] 2 (#$ . 21900) nil]) #@272 将光标前的用户输入的字符串转换为中文. 如果 RETURN-CREGEXP 为真, pyim 会把用户输入的字符串当作 拼音,依照这个拼音来构建一个 regexp, 用户可以用这个 regexp 搜索拼音对应的汉字。 (fn &optional RETURN-CREGEXP) (defalias 'pyim-convert-string-at-point #[256 "\304\232\204\n\305\306!\210\211\203\307\310!\207\311\312 \313\314\"\313\315\"\n\203+\316\317 \320 \"\202/`\321 {\322\323!\322\324!\322\325!\311\211\326 \203G\327 \210\330 \202`Sf\331=\203i\332\333\"\203i\332\334\"\203i\335\336!\210\337\340!!\202`Sf\331=\203\201\332\334\"\203\201\335\341!\210\342 \202`Sf\343\344\345\"\235\203\240\332\334\"\203\240\335\341!\210\346\340!!\202\347\350\351\352  \353Q!\"\"\203\365\354\355\356\357\323\n\"#\262G\262\354\360\356#\262\n\203\322\317 \320 |\210\n\204\341\211\323V\203\341\335[!\210\361\362!\210\211\323V\205\363!\210\310\211\202\332\364\322\323!\"\203\365\366!\202\367\370!)\207" [input-method-function case-fold-search mark-active pyim-process-force-input-chinese pyim-input-method activate-input-method pyim pyim-cregexp-convert-at-point t nil pyim-scheme-name pyim-scheme-get-option :first-chars :rest-chars buffer-substring-no-properties region-beginning region-end line-beginning-position pyim-char-before-to-string 0 1 2 region-active-p pyim-create-word-from-selection deactivate-mark 45 pyim-string-match-p "[0-9]" "\\cc" delete-char -2 pyim-delete-word-at-point string-to-number -1 pyim-delete-last-word number-sequence 50 57 pyim-create-word-at-point string-match format "[%s]+ *$" cl-delete-duplicates "'-" replace-regexp-in-string "^[-']" "" match-string " +" run-hooks pyim-convert-string-at-point-hook pyim-add-unread-command-events "[[:punct:]:-]" call-interactively pyim-punctuation-translate-at-point message "Pyim: pyim-convert-string-at-point do noting."] 17 (#$ . 22063) "P"]) #@43 选择词条,然后反查它的 code。 (defalias 'pyim-search-word-code #[0 "\302 \205@\303\304 \305 \"\306\307\306\310\311#)\266\203\204#\312\313!\210\202<\314 \"\262\211\2037\315\316 $\210\202<\315\317\"\210\320 \266\202\207" [inhibit-changing-match-data pyim-default-scheme region-active-p buffer-substring-no-properties region-beginning region-end nil "^\\cc+\\'" t string-match error "PYIM: 不是纯中文字符串。" pyim-cstring-to-codes message "PYIM (%S): %S -> %S" "PYIM: 没有找到 %S 对应的编码。" deactivate-mark] 9 (#$ . 23987) nil]) (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require pyim-cstring pyim-cregexp pyim-probe] 2) #@18 (fn ORIG_FUNC) (defalias 'pyim-hack-deactivate-input-method #[257 "\206\301\211 )\207" [deactivate-current-input-method-function ignore] 2 (#$ . 24672)]) (byte-code "\300\301\302\303\304#\305\"\210\306\307!\207" [eval-after-load advice-add deactivate-input-method :around pyim-hack-deactivate-input-method #[0 "\300\207" [nil] 1] provide pyim] 5)