0

I have global line numbers set in Emacs 24.5, but I wondered if it was possible to disable line-numbers only in a multi-term shell?

aidylewis
  • 3
  • 1

1 Answers1

0

I don't know anything about multi-term, but if that's using term underneath then the following will do the trick:

(add-hook 'term-mode-hook 'my-inhibit-global-linum-mode)

(defun my-inhibit-global-linum-mode ()
  "Counter-act `global-linum-mode'."
  (add-hook 'after-change-major-mode-hook
            (lambda () (linum-mode 0))
            :append :local))

This simply turns the buffer-local mode off again after it's been turned on. See also automatically disable a global minor mode for a specific major mode for more information and alternative approaches.

Community
  • 1
  • 1
phils
  • 71,335
  • 11
  • 153
  • 198