如何禁用 Flyspell?
这听起来很简单,但我无法修复它:我想永久禁用 emacs 中的自动拼写检查。我的 init.el 必须有一个简单的行。有人可以帮助我吗?
It sounds easy but I can't fix it: I want to permanently disable automatic spell-checking in emacs. There must be a simple line for my init.el. Can somebody help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
首先找出它打开的原因(默认情况下不启用),然后修复它。要么是你的初始化文件正在打开它,要么是某个系统范围的初始化文件正在打开它。了解这些文件:http://www.gnu。 org/software/emacs/manual/html_node/emacs/Init-File.html
Figure out why it's on in the first place (it isn't enabled by default), then fix that. Either your init file is turning it on, or else some system-wide init file is. Read about those files: http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
从简要的看,我能看到的最简单的方法是重新定义函数:
或者您可以使用建议强制参数始终为-1(请参阅
Ch fturn-off-flyspell
),但是这会毫无理由地稍微复杂一些并且效率较低。如果您想首先知道是什么在运行它,您可以使用 Mx debug-on-entry Flyspell-mode,它将在调用函数时显示堆栈跟踪 (q 退出调试器;Ch m 列出其他命令;
M-: (info "(elisp)debugger")
获取帮助)。使用 Mx cancel-debug-on-entry 删除该断点。From a brief look, the simplest way I can see is to redefine the function:
or you could use advice to force the argument to always be -1 (see
C-h f turn-off-flyspell
), but that would be slightly more complex and less efficient for no good reason.If you want to know what is running it in the first place, you could use
M-x debug-on-entry flyspell-mode
, which will show a stack trace when the function is called (q to exit the debugger; C-h m to list other commands;M-: (info "(elisp)debugger")
for help). UseM-x cancel-debug-on-entry
to remove that breakpoint.我在 ~/.emacs.d/usk/text.el 中找到了我的,
我删除了与 FlySpell 相关的代码块并关闭了 emacs。
重新打开emacs后,我仍然看到拼写错误(红色下划线)。然而,我只是删除并重新输入了“拼写错误”的单词,然后,emacs 就没有下划线了。问题解决了。
我正在运行 Debian。
I found mine in ~/.emacs.d/usk/text.el
I deleted the block of code having to do with FlySpell and closed emacs.
After reopening emacs, I still saw the spelling error (red underline). However, I simply deleted and retyped the "misspelled" words and then, emacs didn't underline. Problem solved.
I'm running Debian.
就我而言,
flyspell-mode
已在 .emacs.desktop 文件中占据一席之地。这并不是
桌面模式
第一次给恢复过时的东西带来痛苦。在这种情况下,它恢复了每个文件的所有模式,尽管在 .emacs.el 中我已经禁用了flyspell-mode
和flyspell-prog-mode到处都是。
解决方案:编辑 .emacs.desktop 文件或将其删除。
In my case
flyspell-mode
has been gaining ground in the .emacs.desktop file.This was not the first time that
desktop-mode
causes pain in restoring obsolete things. In this case it restored all modes on a per-file basis, although in .emacs.el I had already disabledflyspell-mode
andflyspell-prog-mode
everywhere.Solution: either edit the .emacs.desktop file or delete it.
使用 Emacs 图形模式,您只需右键单击下面的“Fly”次要模式上方,然后选择“关闭次要模式”,如下所示:
Using Emacs graphical mode you can just right click above "Fly" minor mode bellow and select "Turn Off minor mode" like this: