tags:

views:

69

answers:

1

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:

(global-hl-line-mode 1)
+2  A: 

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.
phewner