我喜欢Emacs的paredit-mode,但是在eval-expression
(M-:
)时我非常怀念它。在eval-expression
进行{{1}}时,如何才能在迷你缓冲区中使用paredit?谢谢!
答案 0 :(得分:11)
向minibuffer-setup-hook
添加一个函数,如下所示:
(add-hook 'minibuffer-setup-hook 'conditionally-enable-paredit-mode)
(defun conditionally-enable-paredit-mode ()
"enable paredit-mode during eval-expression"
(if (eq this-command 'eval-expression)
(paredit-mode 1)))
答案 1 :(得分:0)
将函数paredit-mode
添加到eval-expression-minibuffer-setup-hook
,就像这样
(add-hook 'eval-expression-minibuffer-setup-hook #'paredit-mode)