branch: externals/pyim
commit 471f30d6da9fcfeb5fc6efff7163468c5baacca0
Author: Feng Shu <[email protected]>
Commit: Feng Shu <[email protected]>
* pyim-outcome.el (pyim-outcome-trigger-function-default): Improve.
---
pyim-outcome.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/pyim-outcome.el b/pyim-outcome.el
index 4f62fb4..019098e 100644
--- a/pyim-outcome.el
+++ b/pyim-outcome.el
@@ -314,17 +314,17 @@ alist 列表。"
(delete-region begin end)
(with-temp-buffer
(insert string)
- (dotimes (_ 3) ;NOTE: 数字3是一个经验数字。
- (dolist (x `(;; 中文标点与英文之间的空格
- ("\\([,。;?!;、)】]\\) *\\([[:ascii:]]\\)" . "")
- ;; 英文与中文标点之间的空格
- ("\\([[:ascii:]]\\) *\\([(【]\\)" . "")
- ;; 汉字与汉字之间的空格
- ("\\(\\cc\\) *\\(\\cc\\)" . "")
- ;; 英文与汉字之间的空格
- ("\\([[:ascii:]]\\) *\\(\\cc\\)" . ,sep)
- ;; 汉字与英文之间的空格
- ("\\(\\cc\\) *\\([[:ascii:]]\\)" . ,sep)))
+ (dolist (x `(;; 中文标点与英文之间的空格
+ ("\\([,。;?!;、)】]\\) *\\([[:ascii:]]\\)" . "")
+ ;; 英文与中文标点之间的空格
+ ("\\([[:ascii:]]\\) *\\([(【]\\)" . "")
+ ;; 英文与汉字之间的空格
+ ("\\([[:ascii:]]\\) *\\(\\cc\\)" . ,sep)
+ ;; 汉字与英文之间的空格
+ ("\\(\\cc\\) *\\([[:ascii:]]\\)" . ,sep)
+ ;; 汉字与汉字之间的空格
+ ("\\(\\cc\\) +\\(\\cc\\)" . "")))
+ (dotimes (_ 3) ;NOTE. 数字3是一个经验数字。
(goto-char (point-min))
(while (re-search-forward (car x) nil t)
(replace-match