immerrr/lua-mode — pull request #66 by rolpereira (2014-05-14 22:28:11+00:00)
Title: Highlight "goto" keyword and Lua labels

Hello,

This pull request add syntax highlight to the `goto` keyword introduced with Lua 5.2

One issue that I haven't been able to solve is that `lua-mode` indents the `::label::` too much, i.e. running `ìndent-region` on the following buffer:

```lua
-- 5.2.0-beta-rc2
for z=1,10 do
for y=1,10 do
for x=1,10 do
if x^2 + y^2 == z^2 then
print('found a Pythagorean triple:', x, y, z)
goto done
end
end
end
end
::done::
```

results in the following indentention:

```lua
-- 5.2.0-beta-rc2
for z=1,10 do
for y=1,10 do
for x=1,10 do
if x^2 + y^2 == z^2 then
print('found a Pythagorean triple:', x, y, z)
goto done
end
end
end
end
::done:: -- this is indented more than it should
```

I would have expected `::done::` to be aligned with the `end` like so:

```lua
end
end
::done::
```

Do you know why this happens?