Emacs disables modes

I want to turn off line highlighting in term-mode. I tried this:

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

but he complains that the symbol is invalid. I have this in my .emacs:

(global-hl-line-mode 1)
+3
source share
1 answer

I agree with Ashutosh that this may be the cause of your character error, but I'm not sure if this is the right approach. I am sure I will disable the selection everywhere, not just in terminal windows when you load a terminal window.

I think this is correct:

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

... I am leaving hl-line.el, where he 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.
+4
source

Source: https://habr.com/ru/post/1726947/


All Articles