[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 70ab1df 2/2: * pyim-indicator.el (pyim-indicator-s
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 70ab1df 2/2: * pyim-indicator.el (pyim-indicator-start-daemon): Only create one timer. |
Date: |
Mon, 5 Jul 2021 21:57:13 -0400 (EDT) |
branch: externals/pyim
commit 70ab1df61060cf2049aac3375e1e959a6f573b38
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* pyim-indicator.el (pyim-indicator-start-daemon): Only create one timer.
---
pyim-indicator.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/pyim-indicator.el b/pyim-indicator.el
index 1be6f24..07ce03a 100644
--- a/pyim-indicator.el
+++ b/pyim-indicator.el
@@ -68,10 +68,11 @@ Indicator 用于显示输入法当前输入状态(英文还是中文)。"
(unless pyim-indicator-original-cursor-color
(setq pyim-indicator-original-cursor-color
(face-attribute 'cursor :background)))
- (setq pyim-indicator-timer
- (run-with-timer
- nil pyim-indicator-timer-repeat
- #'pyim-indicator-daemon-function func)))
+ (unless (timerp pyim-indicator-timer)
+ (setq pyim-indicator-timer
+ (run-with-timer
+ nil pyim-indicator-timer-repeat
+ #'pyim-indicator-daemon-function func))))
(defun pyim-indicator-stop-daemon ()
"Stop indicator daemon."