开发者

Emacs disable modes

I'd like to disable line highlighting in term-mode. I tried this:

(add-hook 'term-mode-hook '(lambda () (global-hl-mode 0)))

but it complains about the symbol being void. I have this further in my .emacs:

(gl开发者_Python百科obal-hl-line-mode 1)


I agree with Ashutosh that that may be the source of your symbol error, but I'm not sure that that's the right approach anyways. I'm pretty sure that will disable highlighting everywhere, not just in terminal windows, when you load a terminal window.

I think the right thing is this:

(add-hook 'term-mode-hook '(lambda() (set (make-local-variable 'global-hl-line-mode) nil)))

...I'm going off hl-line.el where it says this:

;; 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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜