I have the package color-theme-buffer-local, which allows you to change the default color theme on a per-buffer basis.

I added this to my config:

(add-hook 'term-mode 
          (lambda nil (color-theme-buffer-local 'color-theme-black-on-gray (current-buffer))))

And it doesn't have the intended effect of forcing all ansi-term buffers to have the color-theme-black-on-gray value. How do I get ansi-term to respect the colors I am trying to set?


1 Answer 1


The hook you want is term-mode-hook, not term-mode. Rewrite it as:

(add-hook 'term-mode-hook #'my-awesome-hook)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.