I have a lot of custom stuff in my .emacs file: fonts, colors, window sizing, key bindings, etc. All of it works.
Then at the end, I just added a: (setq case-fold-search nil)
. It's a variable that when set to nil
is supposed to make search case-sensitive in all emacs modes. It doesn't for me.
Setting case-fold-search
to nil
in an individual buffer works, but when I set it in .emacs
, it doesn't work. Is there a reason why a setq declaration in a .emacs
may not work sometimes? How should I try to debug the issue?
That's normal behavior for buffer-local variables.
setq-default
can be used to establish a default value for them.You can determine that a variable is buffer local by checking out its documentation, using C-h v case-fold-search (or M-x describe-variable), which in this case reports (note 4th line):