What is Emacs complaining about. This error happens to me every once in a while, but I'm new to the world of Emacs, and not so expert in C. Now, emacs is stopping me there and doesn't even let me open a parenthesis to keep coding? What does this error mean?
EDIT: My Emacs version:
My debugger info:
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)
You can use the Lisp debugger to find out more precisely what is happening.
Load the source (not byte-compiled) files cc-cmds.el
(which defines c-indent-line
) and cc-engine.el
(which defines c-guess-basic-syntax
, c-inside-bracelist-p
, and c-looking-at-inexpr-block
).
(Use M-x load-library cc-cmds.el
and M-x load-library cc-engine.el
- and don't forget the .el
.)
Open those two source files in a separate frame (C-x 5 f
), and navigate to the functions you will follow with the debugger. This is so you can more easily see the context around what the debugger is doing.
Then M-x debug-on-entry c-indent-line
.
Use d
to step through the debugger. You can use c
to skip through any step for which you don't care to dive into the details.
You could start with M-x debug-on-entry c-looking-at-inexpr-block
etc., but that might not provide you with enough context to see what's happening. You can also start by being liberal with c
instead of d
, to quickly determine where you want to slow down and see the details. IOW, run the debugger multiple times to provoke the error, using a binary search to narrow down where you want to focus on the details (using d
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With