emacs28.1,終端環境
相關代碼:
(require 'pyim)
(require 'pyim-tsinghua-dict)
(defun pyim-probe-dynamic-english-custom ()
(let ((str-before-1 (pyim-char-before-to-string 0))
(str-before-2 (pyim-char-before-to-string 1)))
(unless (string= (buffer-name) " *temp*")
(if (> (point) (save-excursion (back-to-indentation)
(point)))
(or (if (pyim-string-match-p " " str-before-1)
(pyim-string-match-p "\\cc" str-before-2)
(and (not (pyim-string-match-p "\\cc" str-before-1))
(= (length pyim-entered-code) 0))))))))
(defun eh-ivy-cregexp (str)
(let ((a (ivy--regex-plus str))
(b (let ((case-fold-search nil))
(pyim-cregexp-build str))))
(if (and a (stringp a))
(concat a "\\|" b)
a)))
(setq ivy-re-builders-alist
'((t . eh-ivy-cregexp)))
(pyim-tsinghua-dict-enable)
(setq default-input-method "pyim"
pyim-default-scheme "quanpin"
pyim-enable-shortcode nil
pyim-punctuation-translate-p '(auto yes no)
pyim-page-tooltip 'popup)
(setq pyim-dcache-backend 'pyim-dregcache)
(setq pyim-page-style 'vertical)
(setq pyim-page-length 5)
(setq-default pyim-english-input-switch-functions
'(pyim-probe-dynamic-english-custom
pyim-probe-isearch-mode
pyim-probe-org-structure-template))
(setq-default pyim-punctuation-half-width-functions
'(pyim-probe-punctuation-line-beginning
pyim-probe-punctuation-after-punctuation))
(define-key pyim-mode-map "." 'pyim-page-next-page)
(define-key pyim-mode-map "," 'pyim-page-previous-page)
(define-key pyim-mode-map ";" 'pyim-page-select-word)
(global-set-key (kbd "M-k") 'pyim-convert-code-at-point)
啓動正常,但是切換到pyim進行輸入就報錯,c-x return c-\打開pyim,輸入 sh出現候選框,然後報錯如下:
debugger entered--Lisp error: (wrong-type-argument listp iword2count-recent1)
memq(icode2word iword2count-recent1)
(or (memq 'icode2word from) (memq 'ishortcode2word from))
(if (or (memq 'icode2word from) (memq 'ishortcode2word from)) (pyim-dregcache-get-icode2word-ishortcode2word code) (let ((dict-files (pyim-dregcache-all-dict-files)) result) (if pyim-debug (progn (message "pyim-dregcache-get is called. code=%s" code))) (if dict-files (progn (let ((--dolist-tail-- dict-files)) (while --dolist-tail-- (let (...) (let* ... ...) (setq --dolist-tail-- ...)))))) (nreverse result)))
pyim-dregcache-get("设" iword2count-recent1)
apply(pyim-dregcache-get ("设" iword2count-recent1))
(if (functionp func) (apply func api-args) (if pyim-debug (progn (message "%S 不是一个有效的 dcache api 函数." (symbol-name func)) nil)))
(let ((func (intern (concat (symbol-name pyim-dcache-backend) "-" (symbol-name api-name))))) (if (functionp func) (apply func api-args) (if pyim-debug (progn (message "%S 不是一个有效的 dcache api 函数." (symbol-name func)) nil))))
pyim-dcache-call-api(get "设" iword2count-recent1)
(append (pyim-dcache-call-api 'get code from) (pyim-pymap-py2cchar-get code t t))
pyim-dcache-get("设" iword2count-recent1)
(car (pyim-dcache-get word 'iword2count-recent1))
(or (car (pyim-dcache-get word 'iword2count-recent1)) 0)
(> (or (car (pyim-dcache-get word 'iword2count-recent1)) 0) 1)
(closure ((class . quanpin) (common-words) (personal-words "设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" ...) (scheme-name . quanpin) t) (word) (> (or (car (pyim-dcache-get word 'iword2count-recent1)) 0) 1))("设")
cl--position(nil ("设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" "䤮" ...) 0 nil nil)
cl-position(nil ("设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" "䤮" ...) :if (closure ((class . quanpin) (common-words) (personal-words "设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" ...) (scheme-name . quanpin) t) (word) (> (or (car (pyim-dcache-get word 'iword2count-recent1)) 0) 1)))
apply(cl-position nil ("设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" "䤮" ...) (:if (closure ((class . quanpin) (common-words) (personal-words "设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" ...) (scheme-name . quanpin) t) (word) (> (or (car (pyim-dcache-get word 'iword2count-recent1)) 0) 1))))
cl-find(nil ("设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" "䤮" ...) :if (closure ((class . quanpin) (common-words) (personal-words "设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" ...) (scheme-name . quanpin) t) (word) (> (or (car (pyim-dcache-get word 'iword2count-recent1)) 0) 1)))
apply(cl-find nil ("设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" "䤮" ...) :if (closure ((class . quanpin) (common-words) (personal-words "设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" ...) (scheme-name . quanpin) t) (word) (> (or (car (pyim-dcache-get word 'iword2count-recent1)) 0) 1)) nil)
cl-find-if((closure ((class . quanpin) (common-words) (personal-words "设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" ...) (scheme-name . quanpin) t) (word) (> (or (car (pyim-dcache-get word 'iword2count-recent1)) 0) 1)) ("设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" "䤮" ...))
(or (cl-find-if #'(lambda (word) (> (or (car (pyim-dcache-get word ...)) 0) 1)) personal-words) (cl-find-if #'(lambda (word) (> (or (car (pyim-dcache-get word ...)) 0) 3)) personal-words) (car personal-words))
(cond ((equal class 'xingma) (or (if (= (length (car common-words)) 1) (progn (car common-words))) (cl-find-if #'(lambda (word) (= (length word) 1)) personal-words))) (t (or (cl-find-if #'(lambda (word) (> (or ... 0) 1)) personal-words) (cl-find-if #'(lambda (word) (> (or ... 0) 3)) personal-words) (car personal-words))))
(let ((class (pyim-scheme-get-option scheme-name :class))) (cond ((equal class 'xingma) (or (if (= (length (car common-words)) 1) (progn (car common-words))) (cl-find-if #'(lambda (word) (= ... 1)) personal-words))) (t (or (cl-find-if #'(lambda (word) (> ... 1)) personal-words) (cl-find-if #'(lambda (word) (> ... 3)) personal-words) (car personal-words)))))
pyim-candidates-get-chief(quanpin ("设" "社" "摄" "涉" "射" "折" "舍" "蛇" "舌" "奢" "慑" "辙" "赦" "赊" "佘" "麝" "歙" "畲" "厍" "猞" "铊" "揲" "滠" "阇" "奓" "畬" "䤁" "㵃" "䬦" "挕" "䠟" "䕣" "㓭" "䰥" "涻" "䀹" "輋" "䜆" "䜓" "摵" "䏴" "䀅" "㴇" "欇" "騇" "㰒" "䄕" "攝" "設" "䤮" ...))
(setq chief-word (pyim-candidates-get-chief scheme-name personal-words))
(let (jianpin-words znabc-words personal-words common-words pinyin-chars-1 pinyin-chars-2 chief-word) (let ((codes (mapcar #'(lambda (x) (pyim-subconcat x "-")) (mapcar #'(lambda ... ...) imobjs)))) (setq znabc-words (pyim-zip (mapcar #'pyim-dcache-get (pyim-zip codes)) fast-search))) (if (and pyim-enable-shortcode (> (length (car imobjs)) 1)) (progn (let ((--dolist-tail-- imobjs)) (while --dolist-tail-- (let ((imobj ...)) (let* (... ... ... ... ...) (setq jianpin-words ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))))) (let ((--dolist-tail-- imobjs)) (while --dolist-tail-- (let ((imobj (car --dolist-tail--))) (let* ((w1 (pyim-dcache-get ... ...)) (w2 (pyim-dcache-get ... ...)) (w3 (pyim-dcache-get ...)) (w4 (if w3 nil ...))) (setq personal-words (cons w1 personal-words)) (setq common-words (cons w2 common-words)) (setq pinyin-chars-1 (cons w3 pinyin-chars-1)) (setq pinyin-chars-2 (cons w4 pinyin-chars-2))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq jianpin-words (pyim-zip (nreverse jianpin-words) fast-search)) (setq personal-words (pyim-zip (nreverse personal-words) fast-search)) (setq common-words (pyim-zip (nreverse common-words) fast-search)) (setq pinyin-chars-1 (pyim-zip (nreverse pinyin-chars-1) fast-search)) (setq pinyin-chars-2 (pyim-zip (nreverse pinyin-chars-2) fast-search)) (setq personal-words (pyim-candidates-sort personal-words)) (setq chief-word (pyim-candidates-get-chief scheme-name personal-words)) (if pyim-debug (progn (print (list :imobjs imobjs :chief-word chief-word :personal-words personal-words :common-words common-words :jianpin-words jianpin-words :znabc-words znabc-words :pinyin-chars-1 (cl-subseq pinyin-chars-1 0 (min (length pinyin-chars-1) 5)) :pinyin-chars-2 (cl-subseq pinyin-chars-2 0 (min (length pinyin-chars-2) 5)))))) (delete-dups (delq nil (cons chief-word (append personal-words jianpin-words common-words znabc-words pinyin-chars-1 pinyin-chars-2)))))
pyim-candidates-create-quanpin(((("sh" "e" "sh" "e"))) quanpin)
(let* ((candidates (pyim-candidates-create-quanpin imobjs scheme-name)) (n (length (car candidates))) output) (setq output (cons (car candidates) output)) (while (and (> n 0) (car (setq imobjs (mapcar #'(lambda ... ...) imobjs)))) (let ((candidates (pyim-candidates-create-quanpin imobjs scheme-name))) (setq output (cons (car (pyim-candidates-create-quanpin imobjs scheme-name t)) output)) (setq n (length (car candidates))))) (append (pyim-subconcat (nreverse output) "") candidates))
(if async (let ((str (string-join (pyim-codes-create (car imobjs) scheme-name)))) (if (< (length str) 1) pyim-candidates (cons (car pyim-candidates) (append (pyim-candidates-search-buffer (pyim-cregexp-build str 3 t)) (cdr pyim-candidates))))) (let* ((candidates (pyim-candidates-create-quanpin imobjs scheme-name)) (n (length (car candidates))) output) (setq output (cons (car candidates) output)) (while (and (> n 0) (car (setq imobjs (mapcar #'... imobjs)))) (let ((candidates (pyim-candidates-create-quanpin imobjs scheme-name))) (setq output (cons (car (pyim-candidates-create-quanpin imobjs scheme-name t)) output)) (setq n (length (car candidates))))) (append (pyim-subconcat (nreverse output) "") candidates)))
pyim-candidates-create:quanpin(((("sh" "e" "sh" "e"))) quanpin nil)
funcall(pyim-candidates-create:quanpin ((("sh" "e" "sh" "e"))) quanpin nil)
(progn (funcall (intern (format "pyim-candidates-create:%S" class)) imobjs scheme-name async))
(if class (progn (funcall (intern (format "pyim-candidates-create:%S" class)) imobjs scheme-name async)))
(let ((class (pyim-scheme-get-option scheme-name :class))) (if class (progn (funcall (intern (format "pyim-candidates-create:%S" class)) imobjs scheme-name async))))
(progn (let ((class (pyim-scheme-get-option scheme-name :class))) (if class (progn (funcall (intern (format "pyim-candidates-create:%S" class)) imobjs scheme-name async)))))
(if imobjs (progn (let ((class (pyim-scheme-get-option scheme-name :class))) (if class (progn (funcall (intern (format "pyim-candidates-create:%S" class)) imobjs scheme-name async))))))
pyim-candidates-create(((("sh" "e" "sh" "e"))) quanpin)
(delete-dups (pyim-candidates-create pyim-imobjs scheme-name))
(or (delete-dups (pyim-candidates-create pyim-imobjs scheme-name)) (list entered-to-translate))
(setq pyim-candidates (or (delete-dups (pyim-candidates-create pyim-imobjs scheme-name)) (list entered-to-translate)))
(let* ((scheme-name (pyim-scheme-name)) entered-to-translate) (setq entered-to-translate (pyim-entered-get 'point-before)) (setq pyim-imobjs (pyim-imobjs-create entered-to-translate scheme-name)) (setq pyim-candidates (or (delete-dups (pyim-candidates-create pyim-imobjs scheme-name)) (list entered-to-translate))) (pyim-process-run-async-timer-reset) (setq pyim-process-run-async-timer (run-with-timer pyim-process-async-delay nil #'pyim-process-run-async)) (let ((autoselector-results (mapcar #'(lambda (x) (if ... ...)) (cl-remove-duplicates pyim-autoselector :from-end t))) result) (cond ((and (pyim-process-self-insert-command-p this-command) (cl-find-if #'(lambda ... ... ...) autoselector-results)) (let* ((str (plist-get result :replace-with)) (pyim-candidates (if ... ... pyim-candidates-last))) (pyim-process-outcome-handle 'candidate) (pyim-process-create-word (pyim-process-get-outcome) t)) (pyim-add-unread-command-events (pyim-entered-get 'point-after)) (pyim-add-unread-command-events last-command-event) (pyim-process-terminate)) ((and (pyim-process-self-insert-command-p this-command) (cl-find-if #'(lambda ... ... ...) autoselector-results)) (let* ((str (plist-get result :replace-with)) (pyim-candidates (if ... ... pyim-candidates))) (pyim-process-outcome-handle 'candidate) (pyim-process-create-word (pyim-process-get-outcome) t)) (pyim-add-unread-command-events (pyim-entered-get 'point-after)) (pyim-process-terminate)) (t (setq pyim-candidate-position 1) (pyim-process-preview-refresh) (pyim-process-page-refresh)))))
pyim-process-run-1()
(cond ((or no-delay (not pyim-exhibit-delay-ms) (eq pyim-exhibit-delay-ms 0)) (pyim-process-run-1)) (t (setq pyim-process-run-exhibit-timer (run-with-timer (/ pyim-exhibit-delay-ms 1000.0) nil #'pyim-process-run-1))))
(if (= (length (pyim-entered-get 'point-before)) 0) (pyim-process-terminate) (if pyim-process-run-exhibit-timer (progn (cancel-timer pyim-process-run-exhibit-timer))) (cond ((or no-delay (not pyim-exhibit-delay-ms) (eq pyim-exhibit-delay-ms 0)) (pyim-process-run-1)) (t (setq pyim-process-run-exhibit-timer (run-with-timer (/ pyim-exhibit-delay-ms 1000.0) nil #'pyim-process-run-1)))))
pyim-process-run()
(cond ((pyim-process-input-chinese-p) (save-current-buffer (set-buffer (get-buffer-create pyim-entered-buffer)) (insert (char-to-string last-command-event))) (pyim-process-run)) ((pyim-process-get-candidates) (pyim-process-outcome-handle 'candidate-and-last-char) (pyim-process-terminate)) (t (pyim-process-outcome-handle 'last-char) (pyim-process-terminate)))
pyim-self-insert-command()
funcall-interactively(pyim-self-insert-command)
call-interactively(pyim-self-insert-command)
(condition-case err (call-interactively cmd) ((debug error) (message "pyim 出现错误: %S , 开启 debug-on-error 后可以了解详细情况。" err) (beep)))
(progn (setq last-command-event (aref keyseq (1- (length keyseq))) last-command this-command this-command cmd) (setq key t) (condition-case err (call-interactively cmd) ((debug error) (message "pyim 出现错误: %S , 开启 debug-on-error 后可以了解详细情况。" err) (beep))))
(if (if key (commandp cmd) (pyim-process-self-insert-command-p cmd)) (progn (setq last-command-event (aref keyseq (1- (length keyseq))) last-command this-command this-command cmd) (setq key t) (condition-case err (call-interactively cmd) ((debug error) (message "pyim 出现错误: %S , 开启 debug-on-error 后可以了解详细情况。" err) (beep)))) (pyim-add-unread-command-events (this-single-command-raw-keys) t) (pyim-process-terminate))
(let* ((keyseq (read-key-sequence nil nil nil t)) (cmd (lookup-key pyim-mode-map keyseq))) (if (if key (commandp cmd) (pyim-process-self-insert-command-p cmd)) (progn (setq last-command-event (aref keyseq (1- (length keyseq))) last-command this-command this-command cmd) (setq key t) (condition-case err (call-interactively cmd) ((debug error) (message "pyim 出现错误: %S , 开启 debug-on-error 后可以了解详细情况。" err) (beep)))) (pyim-add-unread-command-events (this-single-command-raw-keys) t) (pyim-process-terminate)))
(while pyim-process-translating (set-buffer-modified-p modified-p) (let* ((keyseq (read-key-sequence nil nil nil t)) (cmd (lookup-key pyim-mode-map keyseq))) (if (if key (commandp cmd) (pyim-process-self-insert-command-p cmd)) (progn (setq last-command-event (aref keyseq (1- (length keyseq))) last-command this-command this-command cmd) (setq key t) (condition-case err (call-interactively cmd) ((debug error) (message "pyim 出现错误: %S , 开启 debug-on-error 后可以了解详细情况。" err) (beep)))) (pyim-add-unread-command-events (this-single-command-raw-keys) t) (pyim-process-terminate))))
(let* ((echo-keystrokes 0) (help-char nil) (overriding-terminal-local-map pyim-mode-map) (input-method-function nil) (input-method-use-echo-area nil) (modified-p (buffer-modified-p)) last-command-event last-command this-command) (setq pyim-process-translating t) (pyim-process-cleanup-input-output) (if key (progn (pyim-add-unread-command-events key))) (while pyim-process-translating (set-buffer-modified-p modified-p) (let* ((keyseq (read-key-sequence nil nil nil t)) (cmd (lookup-key pyim-mode-map keyseq))) (if (if key (commandp cmd) (pyim-process-self-insert-command-p cmd)) (progn (setq last-command-event (aref keyseq (1- ...)) last-command this-command this-command cmd) (setq key t) (condition-case err (call-interactively cmd) ((debug error) (message "pyim 出现错误: %S , 开启 debug-on-error 后可以了解详细情况。" err) (beep)))) (pyim-add-unread-command-events (this-single-command-raw-keys) t) (pyim-process-terminate)))) (pyim-process-get-outcome nil t t))
(if (or (integerp key) (null key)) (let* ((echo-keystrokes 0) (help-char nil) (overriding-terminal-local-map pyim-mode-map) (input-method-function nil) (input-method-use-echo-area nil) (modified-p (buffer-modified-p)) last-command-event last-command this-command) (setq pyim-process-translating t) (pyim-process-cleanup-input-output) (if key (progn (pyim-add-unread-command-events key))) (while pyim-process-translating (set-buffer-modified-p modified-p) (let* ((keyseq (read-key-sequence nil nil nil t)) (cmd (lookup-key pyim-mode-map keyseq))) (if (if key (commandp cmd) (pyim-process-self-insert-command-p cmd)) (progn (setq last-command-event (aref keyseq ...) last-command this-command this-command cmd) (setq key t) (condition-case err (call-interactively cmd) (... ... ...))) (pyim-add-unread-command-events (this-single-command-raw-keys) t) (pyim-process-terminate)))) (pyim-process-get-outcome nil t t)) (char-to-string key))
pyim-input-method-1(115)
(let ((input-string (pyim-input-method-1 key))) (if (and (stringp input-string) (> (length input-string) 0)) (progn (if input-method-exit-on-first-char (list (aref input-string 0)) (mapcar #'identity input-string)))))
(unwind-protect (let ((input-string (pyim-input-method-1 key))) (if (and (stringp input-string) (> (length input-string) 0)) (progn (if input-method-exit-on-first-char (list (aref input-string 0)) (mapcar #'identity input-string))))) (pyim-process-terminate))
(progn (unwind-protect (let ((input-string (pyim-input-method-1 key))) (if (and (stringp input-string) (> (length input-string) 0)) (progn (if input-method-exit-on-first-char (list (aref input-string 0)) (mapcar #'identity input-string))))) (pyim-process-terminate)))
(unwind-protect (progn (unwind-protect (let ((input-string (pyim-input-method-1 key))) (if (and (stringp input-string) (> (length input-string) 0)) (progn (if input-method-exit-on-first-char (list ...) (mapcar ... input-string))))) (pyim-process-terminate))) (if modified nil (restore-buffer-modified-p nil)))
(let* ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t)) (unwind-protect (progn (unwind-protect (let ((input-string (pyim-input-method-1 key))) (if (and (stringp input-string) (> ... 0)) (progn (if input-method-exit-on-first-char ... ...)))) (pyim-process-terminate))) (if modified nil (restore-buffer-modified-p nil))))
(if (or buffer-read-only overriding-terminal-local-map overriding-local-map) (list key) (pyim-process-init-ui) (let* ((modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t)) (unwind-protect (progn (unwind-protect (let ((input-string ...)) (if (and ... ...) (progn ...))) (pyim-process-terminate))) (if modified nil (restore-buffer-modified-p nil)))))
pyim-input-method(115)