erlang-shell for Emacs gives "Unbalanced parenthesis" error #8569
Labels
bug
Issue is reported as a bug
help wanted
Issue not worked on by OTP; help wanted from the community
team:PS
Assigned to OTP team PS
Describe the bug
Pressing tab in the erlang-shell for Emacs directly after startup produces an "Unbalanced parenthesis" error.
To Reproduce
Start Emacs, run
M-x erlang-shell
, press tab (or runindent-for-tab-command
).Expected behavior
No error should pop up. Nothing in particular should happen, provided
erlang-tab-always-indent
ist
.Affected versions
I tried this with OTP 27 and the accompanying
erlang-mode
, on Emacs 29.1.Additional context
This bug is caused by the code for
erlang-calculate-indent
, which callserlang-beginning-of-clause
to move to the beginning of the previous clause in order to calculate the appropriate indentation. Iferlang-shell
was just started, this causes the point to move before the beginning of the first prompt, to the Eshell version string (Eshell V15.0 (press Ctrl+G to abort, type help(). for help)
). Then,erlang-partial-parse
is invoked, which results in a parse error giving rise to the message.The text was updated successfully, but these errors were encountered: