emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pyim c6d66eb229 04/22: pyim-process-force-input-chinese


From: ELPA Syncer
Subject: [elpa] externals/pyim c6d66eb229 04/22: pyim-process-force-input-chinese* -> pyim-process--force-input-chinese*
Date: Fri, 24 Jun 2022 16:57:51 -0400 (EDT)

branch: externals/pyim
commit c6d66eb2293bfed6b983a0f77d077d95241dd2bd
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    pyim-process-force-input-chinese* -> pyim-process--force-input-chinese*
---
 pyim-process.el     | 12 ++++++------
 tests/pyim-tests.el | 48 ++++++++++++++++++++++++------------------------
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/pyim-process.el b/pyim-process.el
index 3343728298..586ae22163 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -91,7 +91,7 @@ entered (nihaom) 的第一个候选词。
 (defvar pyim-process--input-ascii nil
   "是否开启 pyim 英文输入模式.")
 
-(defvar pyim-process-force-input-chinese nil
+(defvar pyim-process--force-input-chinese nil
   "是否强制开启中文输入模式.
 
 这个变量只用于 `pyim-convert-string-at-point', 不要
@@ -270,7 +270,7 @@ imobj 组合构成在一起,构成了 imobjs 这个概念。比如:
       end-position)))
 
 (defun pyim-process-force-input-chinese ()
-  (setq pyim-process-force-input-chinese t))
+  (setq pyim-process--force-input-chinese t))
 
 (defun pyim-process-auto-switch-english-input-p ()
   "判断是否 *根据环境自动切换* 为英文输入模式,这个函数处理变量:
@@ -283,11 +283,11 @@ imobj 组合构成在一起,构成了 imobjs 这个概念。比如:
                    ((listp func-or-list) func-or-list)
                    (t nil)))))
 
-(defun pyim-process-force-input-chinese-p ()
+(defun pyim-process--force-input-chinese-p ()
   "判断是否强制输入中文,这个函数主要处理变量:
 `pyim-force-input-chinese-functions'."
   (let ((func-or-list pyim-force-input-chinese-functions))
-    (or pyim-process-force-input-chinese
+    (or pyim-process--force-input-chinese
         (cl-some (lambda (x)
                    (when (functionp x)
                      (funcall x)))
@@ -313,7 +313,7 @@ imobj 组合构成在一起,构成了 imobjs 这个概念。比如:
 
 (defun pyim-process--input-chinese-predicate-1 ()
   "`pyim-process-input-chinese-p' 内部函数,测试环境。"
-  (or (pyim-process-force-input-chinese-p)
+  (or (pyim-process--force-input-chinese-p)
       (and (not pyim-process--input-ascii)
            (not (pyim-process-auto-switch-english-input-p)))))
 
@@ -787,7 +787,7 @@ BUG:拼音无法有效地处理多音字。"
   (setq pyim-process-translating nil)
   (pyim-entered-erase-buffer)
   (setq pyim-process--code-criteria nil)
-  (setq pyim-process-force-input-chinese nil)
+  (setq pyim-process--force-input-chinese nil)
   (setq pyim-process--candidates nil)
   (setq pyim-process--candidates-last nil)
   (pyim-process--run-delay-timer-reset)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index e0f8f01649..2f2f7a85dd 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1891,97 +1891,97 @@ abc 这是")))
   (let ((pyim-english-input-switch-functions "xxx"))
     (should-not (pyim-process-auto-switch-english-input-p))))
 
-(ert-deftest pyim-tests-pyim-process-force-input-chinese-p ()
-  (let ((pyim-process-force-input-chinese nil)
+(ert-deftest pyim-tests-pyim-process--force-input-chinese-p ()
+  (let ((pyim-process--force-input-chinese nil)
         (pyim-force-input-chinese-functions
          (list (lambda () t)
                (lambda () nil)
                (lambda () nil))))
-    (should (pyim-process-force-input-chinese-p)))
+    (should (pyim-process--force-input-chinese-p)))
 
-  (let ((pyim-process-force-input-chinese nil)
+  (let ((pyim-process--force-input-chinese nil)
         (pyim-force-input-chinese-functions
          (list (lambda () t)
                (lambda () t)
                (lambda () nil))))
-    (should (pyim-process-force-input-chinese-p)))
+    (should (pyim-process--force-input-chinese-p)))
 
-  (let ((pyim-process-force-input-chinese nil)
+  (let ((pyim-process--force-input-chinese nil)
         (pyim-force-input-chinese-functions
          (lambda () t)))
-    (should (pyim-process-force-input-chinese-p)))
+    (should (pyim-process--force-input-chinese-p)))
 
-  (let ((pyim-process-force-input-chinese nil)
+  (let ((pyim-process--force-input-chinese nil)
         (pyim-force-input-chinese-functions
          (lambda () nil)))
-    (should-not (pyim-process-force-input-chinese-p)))
+    (should-not (pyim-process--force-input-chinese-p)))
 
-  (let ((pyim-process-force-input-chinese nil)
+  (let ((pyim-process--force-input-chinese nil)
         (pyim-force-input-chinese-functions "xxx"))
-    (should-not (pyim-process-force-input-chinese-p)))
+    (should-not (pyim-process--force-input-chinese-p)))
 
-  (let ((pyim-process-force-input-chinese nil)
+  (let ((pyim-process--force-input-chinese nil)
         (pyim-force-input-chinese-functions
          (list (lambda () nil)
                (lambda () nil)
                (lambda () nil))))
-    (should-not (pyim-process-force-input-chinese-p)))
+    (should-not (pyim-process--force-input-chinese-p)))
 
-  (let ((pyim-process-force-input-chinese t)
+  (let ((pyim-process--force-input-chinese t)
         (pyim-force-input-chinese-functions nil))
-    (should (pyim-process-force-input-chinese-p)))
+    (should (pyim-process--force-input-chinese-p)))
 
-  (let ((pyim-process-force-input-chinese t)
+  (let ((pyim-process--force-input-chinese t)
         (pyim-force-input-chinese-functions
          (list (lambda () nil)
                (lambda () nil)
                (lambda () nil))))
-    (should (pyim-process-force-input-chinese-p))))
+    (should (pyim-process--force-input-chinese-p))))
 
 (ert-deftest pyim-tests-pyim-process--input-chinese-predicate-1 ()
-  (cl-letf (((symbol-function 'pyim-process-force-input-chinese-p)
+  (cl-letf (((symbol-function 'pyim-process--force-input-chinese-p)
              (lambda () t))
             (pyim-process--input-ascii t)
             ((symbol-function 'pyim-process-auto-switch-english-input-p)
              (lambda () t)))
     (should (pyim-process--input-chinese-predicate-1)))
 
-  (cl-letf (((symbol-function 'pyim-process-force-input-chinese-p)
+  (cl-letf (((symbol-function 'pyim-process--force-input-chinese-p)
              (lambda () t))
             (pyim-process--input-ascii nil)
             ((symbol-function 'pyim-process-auto-switch-english-input-p)
              (lambda () t)))
     (should (pyim-process--input-chinese-predicate-1)))
 
-  (cl-letf (((symbol-function 'pyim-process-force-input-chinese-p)
+  (cl-letf (((symbol-function 'pyim-process--force-input-chinese-p)
              (lambda () t))
             (pyim-process--input-ascii nil)
             ((symbol-function 'pyim-process-auto-switch-english-input-p)
              (lambda () t)))
     (should (pyim-process--input-chinese-predicate-1)))
 
-  (cl-letf (((symbol-function 'pyim-process-force-input-chinese-p)
+  (cl-letf (((symbol-function 'pyim-process--force-input-chinese-p)
              (lambda () nil))
             (pyim-process--input-ascii nil)
             ((symbol-function 'pyim-process-auto-switch-english-input-p)
              (lambda () nil)))
     (should (pyim-process--input-chinese-predicate-1)))
 
-  (cl-letf (((symbol-function 'pyim-process-force-input-chinese-p)
+  (cl-letf (((symbol-function 'pyim-process--force-input-chinese-p)
              (lambda () nil))
             (pyim-process--input-ascii t)
             ((symbol-function 'pyim-process-auto-switch-english-input-p)
              (lambda () nil)))
     (should-not (pyim-process--input-chinese-predicate-1)))
 
-  (cl-letf (((symbol-function 'pyim-process-force-input-chinese-p)
+  (cl-letf (((symbol-function 'pyim-process--force-input-chinese-p)
              (lambda () nil))
             (pyim-process--input-ascii nil)
             ((symbol-function 'pyim-process-auto-switch-english-input-p)
              (lambda () t)))
     (should-not (pyim-process--input-chinese-predicate-1)))
 
-  (cl-letf (((symbol-function 'pyim-process-force-input-chinese-p)
+  (cl-letf (((symbol-function 'pyim-process--force-input-chinese-p)
              (lambda () nil))
             (pyim-process--input-ascii nil)
             ((symbol-function 'pyim-process-auto-switch-english-input-p)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]