;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" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'pyim-common nil "pyim common." :group 'pyim) (defvar pyim-debug nil) #@34 A list of buffer local variable. (defvar pyim-local-variable-list nil (#$ . 500)) #@65 Recode variables VARS to `pyim-local-variable-list'. (fn VARS) (defalias 'pyim-register-local-variables #[257 "\211\211\203*\211@\211\301\"\203\210\202\211B\210\302!\210\303\304\305#\210A\266\202\202\210\207" [pyim-local-variable-list memql make-variable-buffer-local put permanent-local t] 7 (#$ . 588)]) #@57 Kill all local variables in `pyim-local-variable-list'. (defalias 'pyim-kill-local-variables #[0 "\301\302\"\207" [pyim-local-variable-list mapc kill-local-variable] 3 (#$ . 917)]) #@61 Kill then make all variables in `pyim-local-variable-list'. (defalias 'pyim-recreate-local-variables #[0 "\301\302\"\210\301\303\"\207" [pyim-local-variable-list mapc kill-local-variable make-local-variable] 3 (#$ . 1105)]) #@130 与 `string-match-p' 类似,如果 REGEXP 和 STRING 是非字符串时, 不会报错。 (fn REGEXP STRING &optional START) (defalias 'pyim-string-match-p #[770 ";\205;\205\301\302#)\266\203\207" [inhibit-changing-match-data t string-match] 10 (#$ . 1338)]) #@109 解析词库文件当前行的信息,SEPERATERS 为词库使用的分隔符。 (fn &optional SEPERATERS) (defalias 'pyim-dline-parse #[256 "\300 \301 \302\303\"\"\207" [line-beginning-position line-end-position split-string buffer-substring-no-properties] 7 (#$ . 1621)]) #@173 使用排列组合的方式重新排列 LIST. 这个函数由 ‘二中’ 提供,`pyim-cstring-to-pinyin' 没有使用这个函数 (速度稍微有点慢)。 (fn LIST) (defalias 'pyim-permutate-list #[257 "\211@A\211\204-\300\211:\203&@\262\301\300B\300B!\244\262A\262\202 \211\237\266\203\202_\300C\300:\203[@\240\210\301\302\303\304\305\306\307!\310\"\311\312%\313!\"!\244\262A\262\2021\211\237\266\203\207" [nil reverse mapcar make-byte-code 257 "\300\242B\207" vconcat vector [] 3 "\n\n(fn L)" pyim-permutate-list] 14 (#$ . 1906)]) #@149 使用排列组合的方式重新排列 LIST. 这个函数由 ’翀/ty‘ 提供,`pyim-cstring-to-pinyin' 默认使用这个函数。 (fn LIST) (defalias 'pyim-permutate-list2 #[257 "\211G\300U\203 \301\302@\"\207\303@A\"\207" [1 mapcar list pyim-permutate-list2-internal] 4 (#$ . 2482)]) #@57 `pyim-permutate-list2' 的内部函数。 (fn ONE TWO) (defalias 'pyim-permutate-list2-internal #[514 "\300@\204\n\202E\211\203<\211@@\211\2034\211@<\203&\301C\"\202)DB\262A\266\202\202\210A\266\202\202 \210\211\262\302A\"\207" [nil append pyim-permutate-list2-internal] 10 (#$ . 2785)]) #@62 Join list A and B to a new list, then delete dups. (fn A B) (defalias 'pyim-list-merge #[514 "<\203 \202 C<\203\202C\300\301\"!\207" [delete-dups append] 8 (#$ . 3105)]) #@79 得到光标前第 `num' 个字符,并将其转换为字符串。 (fn NUM) (defalias 'pyim-char-before-to-string #[257 "`\211Z\211\300V\205\211\206`Sf\205\301\206`Sf!\207" [0 char-to-string] 5 (#$ . 3296)]) #@79 得到光标后第 `num' 个字符,并将其转换为字符串。 (fn NUM) (defalias 'pyim-char-after-to-string #[257 "`\211\\\211f\205 \300f!\207" [char-to-string] 5 (#$ . 3522)]) #@188 测试当前是否是 exwm 环境。 FIXME: This seem to be not a good approach, the better way is let exwm provide a test function. for example: https://github.com/ch11ng/exwm/pull/831 (defalias 'pyim-exwm-enable-p #[0 "\301\302 \303\304\305#)\207" [inhibit-changing-match-data " \\*temp\\*" buffer-name nil t string-match] 7 (#$ . 3716)]) (byte-code "\300\301!\203\302\303\301\"\210\202\302\303\304\"\210\300\207" [fboundp string-distance defalias pyim-string-distance #[514 "GG\300\301\302\303\304\300\305!\306\"\307\310%\311\312T\"\"!\313\314H\211\314\211I\266\311\312\"\211\203@\211@\314HI\266A\266\202\202)\210\311\312\"\211\203\260\211@H\211\314I\266\311\312\"\211\203\250\211@H\nS#T   S#T^SHSH\232\203\220\314\202\221\312\n\f\nS S#\\^I\266A\266\202\202Y\210A\266\202\202E\210\211#\207" [vconcat mapcar make-byte-code 257 "\301\300T\302\"\207" vector [make-vector nil] 4 "\n\n(fn _)" number-sequence 1 #[771 "HH\207" [] 5 "\n\n(fn DIST I J)"] 0] 20 "Return the edit (levenshtein) distance between strings S1 S2.\n\n(fn S1 S2)"]] 3) #@777 Add KEY to `unread-command-events', ensuring that it is not recorded. If KEY is a character, it is prepended to `unread-command-events' as a cons cell of the form (no-record . KEY). If KEY is a vector of events, the events in the vector are prepended to `unread-command-events', after converting each event to a cons cell of the form (no-record . EVENT). Pyim puts keys back in `unread-command-events' to be handled again, and when it does this these keys have already been recorded in the recent keys and in the keyboard macro being defined, which means that recording them again creates duplicates. When RESET is non-nil, the events in `unread-command-events' are first discarded. This function is a fork of `quail-add-unread-command-events'. (fn KEY &optional RESET) (defalias 'pyim-add-unread-command-events #[513 "\301\302!\206 \301\303!\203\304\305!\203%\211\203\202 \306BB\202<\307\310\311\312\313\314\315!\316\"\317\320%\307\304\"\"\"\211\207" [unread-command-events getenv "SSH_CLIENT" "SSH_TTY" nil characterp no-record append mapcan make-byte-code 257 "\300\203\211\202 \301BC\207" vconcat vector [no-record] 3 "\n\n(fn E)"] 11 (#$ . 4840)]) (provide 'pyim-common)