aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/emacs/erlang.el
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-05-26 10:24:39 +0000
committerErlang/OTP <[email protected]>2010-05-26 10:24:39 +0000
commitb942d8304be96255a66d73bf031ddc90e7ad3d16 (patch)
tree53e880487133a15ea64b368a3bb976f9c16f9bfe /lib/tools/emacs/erlang.el
parent3e628f610908672e15c1e9b2ba210cee63a9f46f (diff)
parent1f32cb47e3d6f8f93228f6d42a91fc483e03b57f (diff)
downloadotp-b942d8304be96255a66d73bf031ddc90e7ad3d16.tar.gz
otp-b942d8304be96255a66d73bf031ddc90e7ad3d16.tar.bz2
otp-b942d8304be96255a66d73bf031ddc90e7ad3d16.zip
Merge branch 'mh/fix-record-indentation' into dev
* mh/fix-record-indentation: Fix indentation of records with line breaks inside lists
Diffstat (limited to 'lib/tools/emacs/erlang.el')
-rw-r--r--lib/tools/emacs/erlang.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index b6ab0e1a5b..c31f76025e 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -2925,10 +2925,16 @@ This assumes that the preceding expression is either simple
(skip-chars-backward " \t")
;; Needed to match the colon in "'foo':'bar'".
(if (not (memq (preceding-char) '(?# ?:)))
- col
- (backward-char 1)
- (forward-sexp -1)
- (current-column)))))
+ col
+ ;; Special hack to handle: (note line break)
+ ;; [#myrecord{
+ ;; foo = foo}]
+ (or
+ (ignore-errors
+ (backward-char 1)
+ (forward-sexp -1)
+ (current-column))
+ col)))))
(defun erlang-indent-parenthesis (stack-position)
(let ((previous (erlang-indent-find-preceding-expr)))