Emacs 确定为什么自插入命令使用错误模式的命令
我的emacs不知怎的被错误配置了,所以非C模式下的SPC试图做C模式的事情。如果我将Emacs 确定为什么自插入命令使用错误模式的命令,emacs,Emacs,我的emacs不知怎的被错误配置了,所以非C模式下的SPC试图做C模式的事情。如果我将debug on error设置为true,并在shell缓冲区中按空格键,则会得到此回溯 Debugger entered--Lisp error: (wrong-type-argument stringp nil) looking-at(nil) c-state-semi-safe-place(465791) c-literal-limits(nil nil) c-mask-paragrap
debug on error
设置为true,并在shell缓冲区中按空格键,则会得到此回溯
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
looking-at(nil)
c-state-semi-safe-place(465791)
c-literal-limits(nil nil)
c-mask-paragraph(nil t do-auto-fill)
c-do-auto-fill()
self-insert-command(1)
call-interactively(self-insert-command nil nil)
command-execute(self-insert-command)
我没有一个很好的方法来复制它,但是当我加载我的(大的,复杂的).emacs并工作几个小时时,它会一直发生
完全可能是我在.emacs中设置了错误,也可能是我最近添加的包之一。如果我知道该去哪里找的话,我也许能找出问题所在。但是,在更改space命令的行为时进行调试
似乎不是内置选项
找出是什么改变了自插入命令的行为的好方法是什么
我正在使用:
GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21)
of 2015-04-10 on builder10-9.porkrind.org
检查
post self insert hook
中的c-do-auto-fill
。如果它存在,那么快速修复方法就是从钩子中删除该功能。更好的解决办法是跟踪它是如何添加的。将init.el一分为二是一个很好的总体策略。顺便说一句,这在self-insert command
(C-h f self-insert command
)的文档中。仔细查看文档,auto-fill功能可能更为可能。检查post-self-insert hook
了解C-do-auto-fill
。如果它存在,那么快速修复方法就是从钩子中删除该功能。更好的解决办法是跟踪它是如何添加的。将init.el一分为二是一个很好的总体策略。顺便说一句,self insert command
(C-h f self insert command
)的文档中有这一点。更仔细地看文档,自动填充功能
可能更有可能。