branch: elpa/lua-mode
commit 57c696c9db515172d3ceec962a537b76a0f62e4e
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>

    Add var name highlighting in "for x,y in ..." construct
---
 lua-mode.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lua-mode.el b/lua-mode.el
index a5fe56f..e250ae1 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -537,6 +537,13 @@ Groups 6-9 can be used in any of argument regexps."
             symbol-end)
          . font-lock-constant-face)
 
+     `("^[ \t]*\\_<for\\_>"
+       (,(lua-make-delimited-matcher "\\_<[[:alpha:]_][[:alnum:]_]*\\_>" "," 
"\\_<in\\_>")
+        nil nil
+        (1 font-lock-variable-name-face nil noerror)
+        (2 font-lock-warning-face t noerror)
+        (3 font-lock-warning-face t noerror)))
+
      ;; Handle local variable/function names
      ;;  local blalba, xyzzy =
      ;;        ^^^^^^  ^^^^^

Reply via email to