我有glob-cursor-mode激活全局,像这样:
(require 'centered-cursor-mode)
(global-centered-cursor-mode 1)
Run Code Online (Sandbox Code Playgroud)
它工作正常,但有一些主要模式,我想自动禁用它.例如slime-repl和shell.
还有另一个问题涉及同一问题,但另一个小模式.不幸的是,答案只提供了这种特定次要模式(global-smart-tab-mode)的解决方法,这种方式不适用于centered-cursor-mode.
我试过这个钩子,但它没有效果.变量不会改变.
(eval-after-load "slime"
(progn
(add-hook 'slime-repl-mode-hook (lambda ()
(set (make-local-variable 'centered-cursor-mode) nil)))
(slime-setup '(slime-repl slime-autodoc))))
Run Code Online (Sandbox Code Playgroud)