Emacs 禁用模式

标签 emacs

我想在术语模式下禁用行突出显示。我试过这个:

(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/

相关文章:

emacs gud 窗口使用

emacs - 使用 ssh 配置的 emacs 中的 TRAMP 模式

emacs - 我如何计算 Emacs 中打开的缓冲区/文件的数量?

emacs - 如何减小模式栏/线条的字体大小?

windows - Windows 上 Emacs 的背景/前景色问题

emacs - 使用 Coq Proof General,Emacs 在每个周期执行。我该如何阻止它?

emacs - 有人知道 Emacs(基础)有什么好的视频教程吗?

emacs - 在缓冲区中添加时间

emacs - 如何用Emacs Calendar在Lisp中实现二十四节气

emacs/elisp : What is the hash (pound, 数字符号,octothorp) 符号用于什么?