branch: externals/pyim commit 95d6350a2c0c624672c4bf4b1fce14653ec69bde Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
* pyim-refresh.el (pyim-refresh-terminate): Deal with pyim-terminate-translation. --- pyim-refresh.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pyim-refresh.el b/pyim-refresh.el index 6b63b4c..96dd862 100644 --- a/pyim-refresh.el +++ b/pyim-refresh.el @@ -161,9 +161,14 @@ (setq pyim-cstring-to-code-criteria nil) (pyim-refresh-timer-reset) (let* ((class (pyim-scheme-get-option (pyim-scheme-name) :class)) - (func (intern (format "pyim-refresh-terminate:%S" class)))) - (when (and class (functionp func)) - (funcall func)))) + (func (intern (format "pyim-refresh-terminate:%S" class))) + ;; `pyim-refresh-terminate' 以前叫 pyim-terminate-translation, 兼容以前的名称。 + (func-old (intern (format "pyim-terminate-translation:%S" class)))) + (cond ((and class (functionp func)) + (funcall func)) + ((and class (functionp func-old)) + (funcall func)) + (t nil)))) ;; * Footer (provide 'pyim-refresh)