File 0718-Fix-tab-erroring-with-Unbalanced-parenthesis-in-erla.patch of Package erlang
From 5d8aaf36a8f73226ca93024076ffe025392cc206 Mon Sep 17 00:00:00 2001
From: Wade Mealing <wmealing@gmail.com>
Date: Wed, 14 Jan 2026 20:25:25 +1000
Subject: [PATCH] Fix tab erroring with "Unbalanced parenthesis" in
erlang-shell .
From the github issue: https://github.com/erlang/otp/issues/8569
This bug is caused by the code for erlang-calculate-indent, which calls
erlang-beginning-of-clause to move to the beginning of the previous clause
in order to calculate the appropriate indentation.
If erlang-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.
---
lib/tools/emacs/erlang.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index ac3c95d736..6837fc94d1 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -5799,6 +5799,7 @@ Also see the description of `ielm-prompt-read-only'."
The following special commands are available:
\\{erlang-shell-mode-map}"
(erlang-mode-variables)
+ (kill-local-variable 'indent-line-function)
;; Needed when compiling directly from the Erlang shell.
(setq next-error-last-buffer (current-buffer))
(setq comint-prompt-regexp "^[^>=]*> *")
--
2.51.0