branch: externals/pyim
commit 030cb3acde367779a2adee4b2a3767f06c6132a2
Author: Feng Shu <[email protected]>
Commit: Feng Shu <[email protected]>
* pyim-candidates.el (pyim-candidates-merge): 稍微优化一点性能。
---
pyim-candidates.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyim-candidates.el b/pyim-candidates.el
index a57c1f5..3fc12d8 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -160,10 +160,11 @@ IMOBJS 获得候选词条。"
如果 list1 = (a b), list2 = (c d e),
那么结果为: (a c b d e)."
(let (result)
- (while (or list1 list2)
+ (while (and list1 list2)
(push (pop list1) result)
(push (pop list2) result))
- (remove nil (nreverse result))))
+ (remove nil `(,@(nreverse result)
+ ,@(or list1 list2)))))
(defun pyim-candidates-create:shuangpin (imobjs _scheme-name &optional async)
"`pyim-candidates-create' 处理双拼输入法的函数."