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

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

[elpa] externals/pyim 1b767c669e 40/41: * pyim-probe.el (pyim-probe-org-


From: ELPA Syncer
Subject: [elpa] externals/pyim 1b767c669e 40/41: * pyim-probe.el (pyim-probe-org-speed-commands): Updated.
Date: Sat, 4 Jun 2022 09:57:49 -0400 (EDT)

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

    * pyim-probe.el (pyim-probe-org-speed-commands): Updated.
---
 pyim-probe.el       |  3 ++-
 tests/pyim-tests.el | 21 +++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/pyim-probe.el b/pyim-probe.el
index 4d0e87bb77..aba8c32296 100644
--- a/pyim-probe.el
+++ b/pyim-probe.el
@@ -80,7 +80,8 @@
   "激活这个 pyim 探针函数后,可以解决 org-speed-commands 与 pyim 冲突问题。
 
 用于:`pyim-english-input-switch-functions' 。"
-  (and (string= major-mode "org-mode")
+  (and (> emacs-major-version 25)
+       (string= major-mode "org-mode")
        (bolp)
        (looking-at org-heading-regexp)
        org-use-speed-commands))
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 66af353c9c..7c11fca835 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1355,16 +1355,17 @@ Transfer-Encoding: chunked
     (should (pyim-probe-isearch-mode))))
 
 (ert-deftest pyim-tests-pyim-probe-org-speed-commands ()
-  (with-temp-buffer
-    (let ((org-use-speed-commands t))
-      (org-mode)
-      (insert "* heading")
-      (goto-char (line-beginning-position))
-      (should (pyim-probe-org-speed-commands))
-      (forward-char 1)
-      (should-not (pyim-probe-org-speed-commands))
-      (forward-char 1)
-      (should-not (pyim-probe-org-speed-commands)))))
+  (when (> emacs-major-version 25)
+    (with-temp-buffer
+      (let ((org-use-speed-commands t))
+        (org-mode)
+        (insert "* heading")
+        (goto-char (line-beginning-position))
+        (should (pyim-probe-org-speed-commands))
+        (forward-char 1)
+        (should-not (pyim-probe-org-speed-commands))
+        (forward-char 1)
+        (should-not (pyim-probe-org-speed-commands))))))
 
 (ert-deftest pyim-tests-pyim-probe-org-structure-template ()
   (with-temp-buffer



reply via email to

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