It is kind of similar to this question How do I automatically load a mode for a specific set of file extensions?
So I am in a situation where, when I want to write in TeX, I want to use 'whiteboard' theme. Whereas whenever I want to program in C++ or python, I want to use "afternoon" theme.
I kind of expect my init file to look like
(if [file extention is tex] (load-theme 'whiteboard t) (load-theme 'afternoon t))
Is this right?
I am using Emacs 26.3