.emacs中区分大小写的setq无效

Ala*_*ing 5 variables emacs case-sensitive dot-emacs case-insensitive

我的.emacs文件中有很多自定义内容:字体,颜色,窗口大小,键绑定等等.所有这些都有效.

然后在最后,我刚刚添加了:(setq case-fold-search nil).这是一个变量,当设置nil为应该在所有emacs模式下使搜索区分大小写时.它不适合我.

在单个缓冲区中设置case-fold-searchnil有效,但是当我将其设置为时.emacs,它不起作用.是否有理由为什么a中的setq声明.emacs有时可能不起作用?我该如何尝试调试此问题?

gee*_*aur 3

这是缓冲区局部变量的正常行为。 setq-default可用于为它们建立默认值。

C-h v case-fold-search您可以通过使用(或)检查其文档来确定变量是否为本地缓冲区M-x describe-variable,在本例中报告(请注意第 4 行)

case-fold-search is a variable defined in `buffer.c'.
Its value is t

  Automatically becomes buffer-local when set in any fashion.

Documentation:
*Non-nil if searches and matches should ignore case.

You can customize this variable.
Run Code Online (Sandbox Code Playgroud)