aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tools/emacs/erlang.el')
-rw-r--r--lib/tools/emacs/erlang.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index 0a3fc0ddff..4f656e3ae4 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -2970,8 +2970,9 @@ Return nil if inside string, t if in a comment."
(current-column)))
;; Type and Spec indentation
((eq (car stack-top) '::)
- (if (looking-at "}")
- ;; Closing record definition with types
+ (if (looking-at "[},)]")
+ ;; Closing function spec, record definition with types,
+ ;; or a comma at the start of the line
;; pop stack and recurse
(erlang-calculate-stack-indent indent-point
(cons (erlang-pop stack) (cdr state)))