Variable: lua-block-token-alist

lua-block-token-alist is a variable defined in lua-mode.el.gz.

Value

(("do" "\\_<end\\_>" "\\_<for\\|while\\_>" middle-or-open)
 ("function" "\\_<end\\_>" nil open)
 ("repeat" "\\_<until\\_>" nil open)
 ("then" "\\_<\\(e\\(lse\\(if\\)?\\|nd\\)\\)\\_>"
  "\\_<\\(else\\)?if\\_>" middle)
 ("{" "}" nil open) ("[" "]" nil open) ("(" ")" nil open)
 ("if" "\\_<then\\_>" nil open) ("for" "\\_<do\\_>" nil open)
 ("while" "\\_<do\\_>" nil open)
 ("else" "\\_<end\\_>" "\\_<then\\_>" middle)
 ("elseif" "\\_<then\\_>" "\\_<then\\_>" middle)
 ("end" nil "\\_<\\(do\\|function\\|then\\|else\\)\\_>" close)
 ("until" nil "\\_<repeat\\_>" close) ("}" nil "{" close)
 ("]" nil "\\[" close) (")" nil "(" close))

Documentation

This is a list of block token information blocks.

Each token information entry is of the form:
  KEYWORD FORWARD-MATCH-REGEXP BACKWARDS-MATCH-REGEXP TOKEN-TYPE

KEYWORD is the token.

FORWARD-MATCH-REGEXP is a regexp that matches all possible tokens when going forward.

BACKWARDS-MATCH-REGEXP is a regexp that matches all possible tokens when going backwards.

TOKEN-TYPE determines where the token occurs on a statement. Open indicates that the token appears at start, close indicates that it appears at end, middle indicates that it is a middle type token, and middle-or-open indicates that it can appear both as a middle or an open type.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/lua-mode.el.gz
(defconst lua-block-token-alist
  '(("do" "\\_<end\\_>" "\\_<for\\|while\\_>" middle-or-open)
    ("function" "\\_<end\\_>" nil open)
    ("repeat" "\\_<until\\_>" nil open)
    ("then"
     "\\_<\\(e\\(lse\\(if\\)?\\|nd\\)\\)\\_>" "\\_<\\(else\\)?if\\_>" middle)
    ("{" "}" nil open)
    ("[" "]" nil open)
    ("(" ")" nil open)
    ("if" "\\_<then\\_>" nil open)
    ("for" "\\_<do\\_>" nil open)
    ("while" "\\_<do\\_>" nil open)
    ("else" "\\_<end\\_>" "\\_<then\\_>" middle)
    ("elseif" "\\_<then\\_>" "\\_<then\\_>" middle)
    ("end" nil "\\_<\\(do\\|function\\|then\\|else\\)\\_>" close)
    ("until" nil "\\_<repeat\\_>" close)
    ("}" nil "{" close)
    ("]" nil "\\[" close)
    (")" nil "(" close))
  "This is a list of block token information blocks.

Each token information entry is of the form:
  KEYWORD FORWARD-MATCH-REGEXP BACKWARDS-MATCH-REGEXP TOKEN-TYPE

KEYWORD is the token.

FORWARD-MATCH-REGEXP is a regexp that matches all possible tokens when
going forward.

BACKWARDS-MATCH-REGEXP is a regexp that matches all possible tokens when
going backwards.

TOKEN-TYPE determines where the token occurs on a statement.  Open
indicates that the token appears at start, close indicates that it
appears at end, middle indicates that it is a middle type token, and
middle-or-open indicates that it can appear both as a middle or an open
type.")