yekemezek · 2022-04-25 08:51
I want to have column-number-mode turned on only for c-mode and no other major mode. How would I do this? When I add a hook to c-mode it changes mode line for every mode
7890yuiop · 2022-04-25 09:27
Yes.
a-c-d-w · 2022-04-25 12:09
for some reason unknown to me, column-number-mode is a global minor mode. however, you can set the *variable* of the same name to nil locally in your c-mode buffers and it'll work.
(add-hook 'c-mode-hook (lambda () (setq-local column-number-mode nil)))
7890yuiop · 2022-04-25 20:38
For the record, that did seem to have the desired effect of encouraging the author to actually write a question (as opposed to the exceptionally vague "subject line and nothing else" that I'd been replying to).