Skip to content

Commit

Permalink
One indent after open paren with no argument
Browse files Browse the repository at this point in the history
  • Loading branch information
MicahChalmer committed Aug 30, 2013
1 parent 20def31 commit 0b9dc80
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/etc/emacs/rust-mode.el
Expand Up @@ -68,7 +68,13 @@
(let ((pt (point)))
(rust-rewind-irrelevant)
(backward-up-list)
(if (looking-at "[[(]")
(if (and
(looking-at "[[(]")
; We don't want to indent out to the open bracket if the
; open bracket ends the line
(save-excursion
(forward-char)
(not (looking-at "[[:space:]]*\\(?://.*\\)?$"))))
(+ 1 (current-column))
(progn
(goto-char pt)
Expand All @@ -80,7 +86,7 @@
(beginning-of-line)
(rust-rewind-irrelevant)
(end-of-line)
(if (looking-back "[,;{}][[:space:]]*\\(?://.*\\)?")
(if (looking-back "[,;{}(][[:space:]]*\\(?://.*\\)?")
(* rust-indent-offset level)
(back-to-indentation)
(if (looking-at "#")
Expand Down

0 comments on commit 0b9dc80

Please sign in to comment.