Skip to content

Commit

Permalink
[Fix emacs-ess#265] Indentation of else following curly
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Nov 3, 2015
1 parent e1a49f7 commit a2c55c7
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lisp/ess-r-syntax.el
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ expression."
(cond
;; Climb braced body
((ess-save-excursion-when-nil
(and (when (progn (ess-skip-blanks-backward)
(and (when (progn (ess-skip-blanks-backward t)
(eq (char-before) ?\}))
(prog1 t (forward-char -1)))
(ess-up-list -1))))
Expand Down
11 changes: 11 additions & 0 deletions test/styles/C++.R
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,17 @@ if (condition) {
(stuff)
}

## 26
{
if (condition1)
stuff1
else if (condition2) {
stuff2
}
else if (condition3)
stuff3
}


### Continuation lines

Expand Down
11 changes: 11 additions & 0 deletions test/styles/RRR+.R
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,17 @@ if (condition) {
(stuff)
}

## 26
{
if (condition1)
stuff1
else if (condition2) {
stuff2
}
else if (condition3)
stuff3
}


### Continuation lines

Expand Down
11 changes: 11 additions & 0 deletions test/styles/RRR.R
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,17 @@ if (condition) {
(stuff)
}

## 26
{
if (condition1)
stuff1
else if (condition2) {
stuff2
}
else if (condition3)
stuff3
}


### Continuation lines

Expand Down
11 changes: 11 additions & 0 deletions test/styles/RStudio-.R
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,17 @@ if (condition) {
(stuff)
}

## 26
{
if (condition1)
stuff1
else if (condition2) {
stuff2
}
else if (condition3)
stuff3
}


### Continuation lines

Expand Down
11 changes: 11 additions & 0 deletions test/styles/misc1.R
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,17 @@ if (condition) {
(stuff)
}

## 26
{
if (condition1)
stuff1
else if (condition2) {
stuff2
}
else if (condition3)
stuff3
}


### Continuation lines

Expand Down

0 comments on commit a2c55c7

Please sign in to comment.