我喜欢Emacs的paredit模式,但是在执行eval-expression
(M-:
)时非常想念它。做eval-expression
时如何在迷你缓冲区中进行paredit?谢谢!
最佳答案
向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)))