aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang.el
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-05-18 10:13:44 +0200
committerDan Gudmundsson <[email protected]>2016-05-18 10:13:44 +0200
commita41966287e6d5d973ab15e327c5065ea1692900e (patch)
tree5f69c6af86c555f663ef62a93b99cd142bbca7aa /lib/tools/emacs/erlang.el
parent2772cb600349a4a015a478ba5cdfd6188b54bf8a (diff)
parentc8b3e3a977bd8b4071e190c7c7aaa72f934af60a (diff)
downloadotp-a41966287e6d5d973ab15e327c5065ea1692900e.tar.gz
otp-a41966287e6d5d973ab15e327c5065ea1692900e.tar.bz2
otp-a41966287e6d5d973ab15e327c5065ea1692900e.zip
Merge branch 'dgud/tools/emacs/PR-1054/OTP-13610'
* dgud/tools/emacs/PR-1054/OTP-13610: Fix line-initial commas' indentation in type specs
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)))