我的 .emacs 文件中有很多自定义内容:字体、颜色、窗口大小、键绑定(bind)等。所有这些都有效。
最后,我刚刚添加了一个:(setq case-fold-search nil)
。这是一个变量,当设置为 nil 时,应该使搜索在所有 emacs 模式下区分大小写。这不适合我。
在单个缓冲区中将 case-fold-search
设置为 nil
有效,但是当我在 .emacs
中设置它时,它不起作用不工作。 .emacs
中的 setq 声明有时可能不起作用,是否有原因?我应该如何尝试调试该问题?
最佳答案
这是缓冲区局部变量的正常行为。 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.
关于variables - .emacs 中区分大小写的 setq 没有效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5345051/