希望将:
(defun blink-search-select-start-buffer (buffer)
(unless blink-search-enable-posframe
(blink-search-select-input-window
(switch-to-buffer buffer)
)))
变成如下:
(defun blink-search-select-start-buffer (buffer)
(unless blink-search-enable-posframe
(blink-search-select-input-window
(let ((dotspacemacs-switch-to-buffer-prefers-purpose t))
(print dotspacemacs-switch-to-buffer-prefers-purpose)
(switch-to-buffer buffer))
)))
尝试 1
使用 psearch: 基于 pcase 的 elisp 代码搜索工具 提供的包 psearch。
(require 'psearch)
(with-eval-after-load 'psearch
(psearch-patch blink-search-select-start-buffer
(psearch-replace '`(unless nil ,body)
'`(unless (let ((dotspacemacs-switch-to-buffer-prefers-purpose t))
(print dotspacemacs-switch-to-buffer-prefers-purpose)
,body)))
))
没有效果。
尝试 2
直接在定义 blink-search-select-start-buffer 的 el 文件上修改成我希望的,重启 emacs,发现虽然源代码修改了,效果却是和原来一样。