我想在术语模式下禁用行突出显示。我试过这个:
(add-hook 'term-mode-hook '(lambda () (global-hl-mode 0)))
但它提示符号无效。 我的 .emacs 中还有这个:
(global-hl-line-mode 1)
最佳答案
我同意 Ashutosh 的观点,这可能是您的符号错误的根源,但我不确定这是否是正确的方法。我很确定当您加载终端窗口时,这将禁用所有位置的突出显示,而不仅仅是在终端窗口中。
我认为正确的做法是:
(add-hook 'term-mode-hook '(lambda() (set (make-local-variable 'global-hl-line-mode) nil)))
...我要离开 hl-line.el,它说的是:
;; You could make variable `global-hl-line-mode' buffer-local and set
;; it to nil to avoid highlighting specific buffers, when the global
;; mode is used.
关于Emacs 禁用模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1983491/