aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang.el
diff options
context:
space:
mode:
authorMagnus Henoch <[email protected]>2013-06-18 12:38:41 +0100
committerMagnus Henoch <[email protected]>2013-06-18 12:38:41 +0100
commit104c60227d3efea4c858a32c486ee15127d6edbc (patch)
treec9faafb4155124435a0ea8fbd26dbf093167f378 /lib/tools/emacs/erlang.el
parent5dd13b1efead2a8101ff1fb46937fbfa00db5269 (diff)
downloadotp-104c60227d3efea4c858a32c486ee15127d6edbc.tar.gz
otp-104c60227d3efea4c858a32c486ee15127d6edbc.tar.bz2
otp-104c60227d3efea4c858a32c486ee15127d6edbc.zip
Inside parentheses, line-initial commas align with the open parenthesis
For example: [ one , two , three ] This does not affect coding styles that don't put commas at the beginning of lines.
Diffstat (limited to 'lib/tools/emacs/erlang.el')
-rw-r--r--lib/tools/emacs/erlang.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index f3bc95e3e5..3ecda1d285 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -2813,6 +2813,9 @@ Return nil if inside string, t if in a comment."
(- (+ previous erlang-argument-indent) 1))))
(t
(nth 2 stack-top))))
+ ((= (following-char) ?,)
+ ;; a comma at the start of the line: line up with opening parenthesis.
+ (nth 2 stack-top))
(t
(goto-char (nth 1 stack-top))
(let ((base (cond ((looking-at "[({]\\s *\\($\\|%\\)")