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

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

[elpa] externals/pyim 778a1ea: * README.org (让 avy 支持拼音搜索): New heading


From: ELPA Syncer
Subject: [elpa] externals/pyim 778a1ea: * README.org (让 avy 支持拼音搜索): New heading, Fix #413
Date: Sat, 30 Oct 2021 20:57:24 -0400 (EDT)

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

    * README.org (让 avy 支持拼音搜索): New heading, Fix #413
---
 README.org | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/README.org b/README.org
index 2e9efc8..33b5239 100644
--- a/README.org
+++ b/README.org
@@ -552,6 +552,14 @@ pyim 安装后,可以通过下面的设置开启拼音搜索功能:
       '((t . pyim-cregexp-ivy)))
 #+end_example
 
+** 让 avy 支持拼音搜索
+#+begin_src emacs-lisp
+(with-eval-after-load 'avy
+  (defun my-avy--regex-candidates (fun regex &optional beg end pred group)
+    (let ((regex (pyim-cregexp-build regex)))
+      (funcall fun regex beg end pred group)))
+  (advice-add 'avy--regex-candidates :around #'my-avy--regex-candidates))
+#+end_src
 ** 让 vertico, selectrum 等补全框架,通过 orderless 支持拼音搜索候选项功能。
 
 #+begin_example



reply via email to

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