什么是Emacs抱怨.这个错误每隔一段时间就会发生在我身上,但我是Emacs的新手,而不是C的专家.现在,emacs阻止我在那里,甚至不让我打开括号来保持编码?这个错误是什么意思?

编辑:我的Emacs版本:

我的调试器信息:
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p (1953 . 3706))
c-looking-at-inexpr-block((1953 . 3706) (1953 . 3706))
c-inside-bracelist-p(3742 ((1953 . 3706) (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 9156 (9046 . 9137) 3742 (1953 . 3706) 9156 (9046 . 9137) 3742 (1953 . 3706) 9156 (9046 . 9137) 3742 (1953 . 3706) 9156 (9046 . 9137) 3742 (1953 . 3706) 9156 (9046 . 9137) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) 3742 (1953 . 3706) ...))
c-guess-basic-syntax()
c-indent-line()
indent-according-to-mode()
c-electric-continued-statement()
abbrev-insert(while #("while" 0 5 (fontified t face font-lock-keyword-face)) 9785 9790)
#[0 "\304 \211@A\211@A\211@A\211@A\n\211\205Q\305`\306\"\305\306\"\2042\307\310 !\2042\311 \210\312 $V\203O`U\203Ob\210\266\202\266\204\207" [noninteractive last-abbrev-text last-abbrev last-abbrev-location abbrev--before-point copy-marker t window-minibuffer-p selected-window undo-boundary abbrev-insert] 20 "\n\n(fn)"]()
apply(#[0 "\304 \211@A\211@A\211@A\211@A\n\211\205Q\305`\306\"\305\306\"\2042\307\310 !\2042\311 \210\312 $V\203O`U\203Ob\210\266\202\266\204\207" [noninteractive last-abbrev-text last-abbrev last-abbrev-location abbrev--before-point copy-marker t window-minibuffer-p selected-window undo-boundary abbrev-insert] 20 "\n\n(fn)"] nil)
#[771 ":\2030@\301=\203\300@\302A\"\303#\207\304@\305\306\307\310\311\312\300!\313\"\314\315%A##\207\304\316\"\207" [(#0) t append nil apply apply-partially make-byte-code 642 "\300@#\207" vconcat vector [] 7 "\n\n(fn FUNS GLOBAL &rest ARGS)" #[0 "\304 \211@A\211@A\211@A\211@A\n\211\205Q\305`\306\"\305\306\"\2042\307\310 !\2042\311 \210\312 $V\203O`U\203Ob\210\266\202\266\204\207" [noninteractive last-abbrev-text last-abbrev last-abbrev-location abbrev--before-point copy-marker t window-minibuffer-p selected-window undo-boundary abbrev-insert] 20 "\n\n(fn)"]] 12 "\n\n(fn FUNS GLOBAL ARGS)"](nil nil nil)
expand-abbrev()
self-insert-command(1)
c-electric-paren(nil)
call-interactively(c-electric-paren nil nil)
Run Code Online (Sandbox Code Playgroud)
您可以使用 Lisp 调试器来更准确地了解正在发生的情况。
加载源(非字节编译)文件cc-cmds.el(定义 c-indent-line)和cc-engine.el(定义c-guess-basic-syntax、c-inside-bracelist-p和c-looking-at-inexpr-block)。
(使用M-x load-library cc-cmds.eland M-x load-library cc-engine.el- 并且不要忘记.el。)
在单独的框架 ( C-x 5 f) 中打开这两个源文件,然后导航到您将使用调试器执行的函数。这样您就可以更轻松地查看调试器正在执行的操作的上下文。
然后M-x debug-on-entry c-indent-line。
用于d单步执行调试器。您可以用来c跳过您不想深入了解细节的任何步骤。
您可以从等等开始M-x debug-on-entry c-looking-at-inexpr-block,但这可能无法为您提供足够的上下文来了解正在发生的情况。您还可以从自由地使用c而不是开始d,以快速确定您想要放慢速度并查看细节的地方。IOW,多次运行调试器以引发错误,使用二分搜索来缩小您想要关注细节的范围(使用d)。
| 归档时间: |
|
| 查看次数: |
6690 次 |
| 最近记录: |