aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lua')
-rw-r--r--modules/lua/api350
-rw-r--r--modules/lua/init.lua34
-rw-r--r--modules/lua/lua.luadoc2166
-rw-r--r--modules/lua/ta_api896
-rw-r--r--modules/lua/ta_tags10
-rw-r--r--modules/lua/tadoc.lua90
6 files changed, 1669 insertions, 1877 deletions
diff --git a/modules/lua/api b/modules/lua/api
index 7972af7c..de8fb106 100644
--- a/modules/lua/api
+++ b/modules/lua/api
@@ -1,223 +1,223 @@
-B lpeg.B(patt)\nReturns a pattern that matches only if the input string at the current\nposition is preceded by `patt`. Pattern `patt` must match only strings with\nsome fixed length, and it cannot contain captures.\n\nLike the and predicate, this pattern never consumes any input, independently\nof success or failure.
-C lpeg.C(patt)\nCreates a simple capture, which captures the substring of the subject that\nmatches `patt`. The captured value is a string. If `patt` has other captures,\ntheir values are returned after this one.
-Carg lpeg.Carg(n)\nCreates an argument capture. This pattern matches the empty string and\nproduces the value given as the nth extra argument given in the call to\n`lpeg.match`.
-Cb lpeg.Cb(name)\nCreates a back capture. This pattern matches the empty string and produces\nthe values produced by the most recent group capture named `name`.\n\nMost recent means the last complete outermost group capture with the given\nname. A Complete capture means that the entire pattern corresponding to the\ncapture has matched. An Outermost capture means that the capture is not\ninside another complete capture.\n\nIn the same way that LPeg does not specify when it evaluates captures, it\ndoes not specify whether it reuses values previously produced by the group or\nre-evaluates them.
-Cc lpeg.Cc([value, ...])\nCreates a constant capture. This pattern matches the empty string and\nproduces all given values as its captured values.
-Cf lpeg.Cf(patt, func)\nCreates a fold capture. If patt produces a list of captures C1 C2 ... Cn,\nthis capture will produce the value func(...func(func(C1, C2), C3)..., Cn),\nthat is, it will fold (or accumulate, or reduce) the captures from `patt`\nusing function `func`.\n\nThis capture assumes that `patt` should produce at least one capture with at\nleast one value (of any type), which becomes the initial value of an\naccumulator. (If you need a specific initial value, you may prefix a constant\ncapture to `patt`.) For each subsequent capture, LPeg calls `func` with this\naccumulator as the first argument and all values produced by the capture as\nextra arguments; the first result from this call becomes the new value for\nthe accumulator. The final value of the accumulator becomes the captured\nvalue.\n\nAs an example, the following pattern matches a list of numbers separated by\ncommas and returns their addition:\n\n -- matches a numeral and captures its numerical value\n number = lpeg.R"09"^1 / tonumber\n -- matches a list of numbers, capturing their values\n list = number * ("," * number)^0\n -- auxiliary function to add two numbers\n function add (acc, newvalue) return acc + newvalue end\n -- folds the list of numbers adding them\n sum = lpeg.Cf(list, add)\n -- example of use\n print(sum:match("10,30,43")) --> 83
-Cg lpeg.Cg(patt [, name])\nCreates a group capture. It groups all values returned by `patt` into a\nsingle capture. The group may be anonymous (if no name is given) or named\nwith the given name.\n\nAn anonymous group serves to join values from several captures into a single\ncapture. A named group has a different behavior. In most situations, a named\ngroup returns no values at all. Its values are only relevant for a following\nback capture or when used inside a table capture.
-Cmt lpeg.Cmt(patt, function)\nCreates a match-time capture. Unlike all other captures, this one is\nevaluated immediately when a match occurs (even if it is part of a larger\npattern that fails later). It forces the immediate evaluation of all its\nnested captures and then calls `function`.\n\nThe given function gets as arguments the entire subject, the current position\n(after the match of `patt`), plus any capture values produced by `patt`.\n\nThe first value returned by `function` defines how the match happens. If the\ncall returns a number, the match succeeds and the returned number becomes the\nnew current position. (Assuming a subject s and current position i, the\nreturned number must be in the range [i, len(s) + 1].) If the call returns\ntrue, the match succeeds without consuming any input. (So, to return true is\nequivalent to return i.) If the call returns false, nil, or no value, the\nmatch fails.\n\nAny extra values returned by the function become the values produced by the\ncapture.
-Cp lpeg.Cp()\nCreates a position capture. It matches the empty string and captures the\nposition in the subject where the match occurs. The captured value is a\nnumber.
-Cs lpeg.Cs(patt)\nCreates a substitution capture, which captures the substring of the subject\nthat matches `patt`, with substitutions. For any capture inside `patt` with a\nvalue, the substring that matched the capture is replaced by the capture\nvalue (which should be a string). The final captured value is the string\nresulting from all replacements.
-Ct lpeg.Ct(patt)\nCreates a table capture. This capture returns a table with all values from\nall anonymous captures made by `patt` inside this table in successive integer\nkeys, starting at 1. Moreover, for each named capture group created by\n`patt`, the first value of the group is put into the table with the group\nname as its key. The captured value is only the table.
-P lpeg.P(value)\nConverts the given value into a proper pattern, according to the following\nrules:\n * If the argument is a pattern, it is returned unmodified.\n * If the argument is a string, it is translated to a pattern that matches\n the string literally.\n * If the argument is a non-negative number n, the result is a pattern that\n matches exactly n characters.\n * If the argument is a negative number -n, the result is a pattern that\n succeeds only if the input string has less than n characters left:\n `lpeg.P(-n)` is equivalent to `-lpeg.P(n)` (see the unary minus\n operation).\n * If the argument is a boolean, the result is a pattern that always\n succeeds or always fails (according to the boolean value), without\n consuming any input.\n * If the argument is a table, it is interpreted as a grammar (see\n Grammars).\n * If the argument is a function, returns a pattern equivalent to a\n match-time capture over the empty string.
-R lpeg.R({range})\nReturns a pattern that matches any single character belonging to one of the\ngiven ranges. Each `range` is a string xy of length 2, representing all\ncharacters with code between the codes of x and y (both inclusive).\n\nAs an example, the pattern `lpeg.R("09")` matches any digit, and\n`lpeg.R("az", "AZ")` matches any ASCII letter.
-S lpeg.S(string)\nReturns a pattern that matches any single character that appears in the given\nstring. (The S stands for Set.)\n\nAs an example, the pattern `lpeg.S("+-*/")` matches any arithmetic operator.\n\nNote that, if `s` is a character (that is, a string of length 1), then\n`lpeg.P(s)` is equivalent to `lpeg.S(s)` which is equivalent to\n`lpeg.R(s..s)`. Note also that both `lpeg.S("")` and `lpeg.R()` are patterns\nthat always fail.
-V lpeg.V(v)\nThis operation creates a non-terminal (a variable) for a grammar. The created\nnon-terminal refers to the rule indexed by `v` in the enclosing grammar. (See\nGrammars for details.)
+B lpeg.B(patt)\nReturns a pattern that matches only if the input string at the current position is preceded\nby `patt`. Pattern `patt` must match only strings with some fixed length, and it cannot\ncontain captures.\n\nLike the and predicate, this pattern never consumes any input, independently of success\nor failure.
+C lpeg.C(patt)\nCreates a simple capture, which captures the substring of the subject that matches `patt`. The\ncaptured value is a string. If `patt` has other captures, their values are returned after\nthis one.
+Carg lpeg.Carg(n)\nCreates an argument capture. This pattern matches the empty string and produces the value\ngiven as the nth extra argument given in the call to `lpeg.match`.
+Cb lpeg.Cb(name)\nCreates a back capture. This pattern matches the empty string and produces the values produced\nby the most recent group capture named `name`.\n\nMost recent means the last complete outermost group capture with the given name. A Complete\ncapture means that the entire pattern corresponding to the capture has matched. An Outermost\ncapture means that the capture is not inside another complete capture.\n\nIn the same way that LPeg does not specify when it evaluates captures, it does not specify\nwhether it reuses values previously produced by the group or re-evaluates them.
+Cc lpeg.Cc([value, ...])\nCreates a constant capture. This pattern matches the empty string and produces all given\nvalues as its captured values.
+Cf lpeg.Cf(patt, func)\nCreates a fold capture. If patt produces a list of captures C1 C2 ... Cn, this capture will\nproduce the value func(...func(func(C1, C2), C3)..., Cn), that is, it will fold (or accumulate,\nor reduce) the captures from `patt` using function `func`.\n\nThis capture assumes that `patt` should produce at least one capture with at least one value\n(of any type), which becomes the initial value of an accumulator. (If you need a specific\ninitial value, you may prefix a constant capture to `patt`.) For each subsequent capture,\nLPeg calls `func` with this accumulator as the first argument and all values produced by\nthe capture as extra arguments; the first result from this call becomes the new value for\nthe accumulator. The final value of the accumulator becomes the captured value.\n\nAs an example, the following pattern matches a list of numbers separated by commas and\nreturns their addition:\n\n -- matches a numeral and captures its numerical value\n number = lpeg.R"09"^1 / tonumber\n -- matches a list of numbers, capturing their values\n list = number * ("," * number)^0\n -- auxiliary function to add two numbers\n function add (acc, newvalue) return acc + newvalue end\n -- folds the list of numbers adding them\n sum = lpeg.Cf(list, add)\n -- example of use\n print(sum:match("10,30,43")) --> 83
+Cg lpeg.Cg(patt [, name])\nCreates a group capture. It groups all values returned by `patt` into a single capture. The\ngroup may be anonymous (if no name is given) or named with the given name.\n\nAn anonymous group serves to join values from several captures into a single capture. A named\ngroup has a different behavior. In most situations, a named group returns no values at all. Its\nvalues are only relevant for a following back capture or when used inside a table capture.
+Cmt lpeg.Cmt(patt, function)\nCreates a match-time capture. Unlike all other captures, this one is evaluated immediately\nwhen a match occurs (even if it is part of a larger pattern that fails later). It forces\nthe immediate evaluation of all its nested captures and then calls `function`.\n\nThe given function gets as arguments the entire subject, the current position (after the\nmatch of `patt`), plus any capture values produced by `patt`.\n\nThe first value returned by `function` defines how the match happens. If the call returns a\nnumber, the match succeeds and the returned number becomes the new current position. (Assuming\na subject s and current position i, the returned number must be in the range [i, len(s) +\n1].) If the call returns true, the match succeeds without consuming any input. (So, to return\ntrue is equivalent to return i.) If the call returns false, nil, or no value, the match fails.\n\nAny extra values returned by the function become the values produced by the capture.
+Cp lpeg.Cp()\nCreates a position capture. It matches the empty string and captures the position in the\nsubject where the match occurs. The captured value is a number.
+Cs lpeg.Cs(patt)\nCreates a substitution capture, which captures the substring of the subject that matches\n`patt`, with substitutions. For any capture inside `patt` with a value, the substring that\nmatched the capture is replaced by the capture value (which should be a string). The final\ncaptured value is the string resulting from all replacements.
+Ct lpeg.Ct(patt)\nCreates a table capture. This capture returns a table with all values from all anonymous\ncaptures made by `patt` inside this table in successive integer keys, starting at 1. Moreover,\nfor each named capture group created by `patt`, the first value of the group is put into\nthe table with the group name as its key. The captured value is only the table.
+P lpeg.P(value)\nConverts the given value into a proper pattern, according to the following rules:\n\n * If the argument is a pattern, it is returned unmodified.\n * If the argument is a string, it is translated to a pattern that matches the string\n literally.\n * If the argument is a non-negative number n, the result is a pattern that matches exactly\n n characters.\n * If the argument is a negative number -n, the result is a pattern that succeeds only if the\n input string has less than n characters left: `lpeg.P(-n)` is equivalent to `-lpeg.P(n)`\n (see the unary minus operation).\n * If the argument is a boolean, the result is a pattern that always succeeds or always fails\n (according to the boolean value), without consuming any input.\n * If the argument is a table, it is interpreted as a grammar (see Grammars).\n * If the argument is a function, returns a pattern equivalent to a match-time capture over\n the empty string.
+R lpeg.R({range})\nReturns a pattern that matches any single character belonging to one of the given ranges. Each\n`range` is a string xy of length 2, representing all characters with code between the codes\nof x and y (both inclusive).\n\nAs an example, the pattern `lpeg.R("09")` matches any digit, and `lpeg.R("az", "AZ")`\nmatches any ASCII letter.
+S lpeg.S(string)\nReturns a pattern that matches any single character that appears in the given string. (The\nS stands for Set.)\n\nAs an example, the pattern `lpeg.S("+-*/")` matches any arithmetic operator.\n\nNote that, if `s` is a character (that is, a string of length 1), then `lpeg.P(s)` is equivalent\nto `lpeg.S(s)` which is equivalent to `lpeg.R(s..s)`. Note also that both `lpeg.S("")` and\n`lpeg.R()` are patterns that always fail.
+V lpeg.V(v)\nThis operation creates a non-terminal (a variable) for a grammar. The created non-terminal\nrefers to the rule indexed by `v` in the enclosing grammar. (See Grammars for details.)
_G _G._G (module)\nLua _G module.
-_G _G._G (table)\nA global variable (not a function) that holds the global environment\n(see §2.2). Lua itself does not use this variable; changing its value does\nnot affect any environment, nor vice versa.
-_VERSION _G._VERSION (string)\nA global variable (not a function) that holds a string containing the\nrunning Lua version. The current value of this variable is "`Lua 5.4`".
+_G _G._G (table)\nA global variable (not a function) that holds the global environment (see §2.2). Lua\nitself does not use this variable; changing its value does not affect any environment,\nnor vice versa.
+_VERSION _G._VERSION (string)\nA global variable (not a function) that holds a string containing the running Lua version. The\ncurrent value of this variable is "`Lua 5.4`".
abs math.abs(x)\nReturns the maximum value between `x` and `-x`. (integer/float)
acos math.acos(x)\nReturns the arc cosine of `x` (in radians).
-arshift bit32.arshift(x, disp)\nReturns the number `x` shifted `disp` bits to the right. The number `disp`\nmay be any representable integer. Negative displacements shift to the left.\n\nThis shift operation is what is called arithmetic shift. Vacant bits on the\nleft are filled with copies of the higher bit of `x`; vacant bits on the\nright are filled with zeros. In particular, displacements with absolute\nvalues higher than 31 result in zero or `0xFFFFFFFF` (all original bits are\nshifted out).\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
+arshift bit32.arshift(x, disp)\nReturns the number `x` shifted `disp` bits to the right. The number `disp` may be any\nrepresentable integer. Negative displacements shift to the left.\n\nThis shift operation is what is called arithmetic shift. Vacant bits on the left are filled\nwith copies of the higher bit of `x`; vacant bits on the right are filled with zeros. In\nparticular, displacements with absolute values higher than 31 result in zero or `0xFFFFFFFF`\n(all original bits are shifted out).\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
asin math.asin(x)\nReturns the arc sine of `x` (in radians).
-assert _G.assert(v [, message])\nRaises an error if the value of its argument `v` is false (i.e., nil or\nfalse); otherwise, returns all its arguments. In case of error, `message` is\nthe error object; when absent, it defaults to "assertion failed!".
-atan math.atan(y [, x])\nReturns the arc tangent of `y/x` (in radians), but uses the signs\nof both parameters to find the quadrant of the result. It also handles\ncorrectly the case of `x` being zero.\n\nThe default value for `x` is 1, so that the call `math.atan(y)` returns the\narc tangent of `y`.
-atan2 math.atan2(y, x)\nReturns the arc tangent of `y/x` (in radians), but uses the signs\nof both parameters to find the quadrant of the result. (It also handles\ncorrectly the case of `x` being zero.)\n\nDeprecated in Lua 5.3.
-attributes lfs.attributes(filepath [, aname | atable])\nReturns a table with the file attributes corresponding to filepath (or nil\nfollowed by an error message in case of error). If the second optional\nargument is given and is a string, then only the value of the named attribute\nis returned (this use is equivalent to lfs.attributes(filepath)[aname], but\nthe table is not created and only one attribute is retrieved from the O.S.).\nIf a table is passed as the second argument, it is filled with attributes and\nreturned instead of a new table. The attributes are described as follows;\nattribute mode is a string, all the others are numbers, and the time related\nattributes use the same time reference of os.time:\n dev: on Unix systems, this represents the device that the inode resides on.\n On Windows systems, represents the drive number of the disk containing\n the file\n ino: on Unix systems, this represents the inode number. On Windows systems\n this has no meaning\n mode: string representing the associated protection mode (the values could\n be file, directory, link, socket, named pipe, char device, block\n device or other)\n nlink: number of hard links to the file\n uid: user-id of owner (Unix only, always 0 on Windows)\n gid: group-id of owner (Unix only, always 0 on Windows)\n rdev: on Unix systems, represents the device type, for special file inodes.\n On Windows systems represents the same as dev\n access: time of last access\n modification: time of last data modification\n change: time of last file status change\n size: file size, in bytes\n permissions: file permissions string\n blocks: block allocated for file; (Unix only)\n blksize: optimal file system I/O blocksize; (Unix only)\n\nThis function uses stat internally thus if the given filepath is a symbolic\nlink, it is followed (if it points to another link the chain is followed\nrecursively) and the information is about the file it refers to. To obtain\ninformation about the link itself, see function lfs.symlinkattributes.
-band bit32.band(...)\nReturns the bitwise "and" of its operands.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
+assert _G.assert(v [, message])\nRaises an error if the value of its argument `v` is false (i.e., nil or false); otherwise,\nreturns all its arguments. In case of error, `message` is the error object; when absent,\nit defaults to "assertion failed!".
+atan math.atan(y [, x])\nReturns the arc tangent of `y/x` (in radians), but uses the signs of both parameters to find\nthe quadrant of the result. It also handles correctly the case of `x` being zero.\n\nThe default value for `x` is 1, so that the call `math.atan(y)` returns the arc tangent of `y`.
+atan2 math.atan2(y, x)\nReturns the arc tangent of `y/x` (in radians), but uses the signs of both parameters to find\nthe quadrant of the result. (It also handles correctly the case of `x` being zero.)\n\nDeprecated in Lua 5.3.
+attributes lfs.attributes(filepath [, aname | atable])\nReturns a table with the file attributes corresponding to filepath (or nil followed by\nan error message in case of error). If the second optional argument is given and is a\nstring, then only the value of the named attribute is returned (this use is equivalent to\nlfs.attributes(filepath)[aname], but the table is not created and only one attribute is\nretrieved from the O.S.). If a table is passed as the second argument, it is filled with\nattributes and returned instead of a new table. The attributes are described as follows;\nattribute mode is a string, all the others are numbers, and the time related attributes use\nthe same time reference of os.time:\n\n dev: on Unix systems, this represents the device that the inode resides on. On Windows\n systems, represents the drive number of the disk containing the file\n ino: on Unix systems, this represents the inode number. On Windows systems this has no meaning\n mode: string representing the associated protection mode (the values could be file,\n directory, link, socket, named pipe, char device, block device or other)\n nlink: number of hard links to the file\n uid: user-id of owner (Unix only, always 0 on Windows)\n gid: group-id of owner (Unix only, always 0 on Windows)\n rdev: on Unix systems, represents the device type, for special file inodes. On Windows\n systems represents the same as dev\n access: time of last access\n modification: time of last data modification\n change: time of last file status change\n size: file size, in bytes\n permissions: file permissions string\n blocks: block allocated for file; (Unix only)\n blksize: optimal file system I/O blocksize; (Unix only)\n\nThis function uses stat internally thus if the given filepath is a symbolic link, it is\nfollowed (if it points to another link the chain is followed recursively) and the information\nis about the file it refers to. To obtain information about the link itself, see function\nlfs.symlinkattributes.
+band bit32.band(...)\nReturns the bitwise "and" of its operands.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
bit32 _G.bit32 (module)\nLua bit32 module.
-bnot bit32.bnot(x)\nReturns the bitwise negation of `x`. For any integer `x`, the following\nidentity holds:\n\n assert(bit32.bnot(x) == (-1 - x) % 2^32)\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-bor bit32.bor(...)\nReturns the bitwise "or" of its operands.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-btest bit32.btest(...)\nReturns a boolean signaling whether the bitwise "and" of its operands is\ndifferent from zero.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-byte string.byte(s [, i [, j]])\nReturns the internal numerical codes of the characters `s[i]`, `s[i+1]`,\n···, `s[j]`. The default value for `i` is 1; the default value for `j`\nis `i`. These indices are corrected following the same rules of function\n`string.sub`.\n\nNumerical codes are not necessarily portable across platforms.
+bnot bit32.bnot(x)\nReturns the bitwise negation of `x`. For any integer `x`, the following identity holds:\n\n assert(bit32.bnot(x) == (-1 - x) % 2^32)\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+bor bit32.bor(...)\nReturns the bitwise "or" of its operands.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+btest bit32.btest(...)\nReturns a boolean signaling whether the bitwise "and" of its operands is different from zero.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+byte string.byte(s [, i [, j]])\nReturns the internal numerical codes of the characters `s[i]`, `s[i+1]`, ···, `s[j]`. The\ndefault value for `i` is 1; the default value for `j` is `i`. These indices are corrected\nfollowing the same rules of function `string.sub`.\n\nNumerical codes are not necessarily portable across platforms.
ceil math.ceil(x)\nReturns the smallest integral value greater than or equal to `x`.
-char string.char(···)\nReceives zero or more integers. Returns a string with length equal to\nthe number of arguments, in which each character has the internal numerical\ncode equal to its corresponding argument.\n\nNumerical codes are not necessarily portable across platforms.
-char utf8.char(···)\nReceives zero or more integers, converts each one to its corresponding UTF-8\nbyte sequence and returns a string with the concatenation of all these\nsequences.\n\nNew in Lua 5.3.
-charpattern utf8.charpattern (string)\nThe pattern (a string, not a function) "\0-\x7F\xC2-\xFD*"\n(see §6.4.1), which matches exactly one UTF-8 byte sequence, assuming that\nthe subject is a valid UTF-8 string.\n\nNew in Lua 5.3.
+char string.char(···)\nReceives zero or more integers. Returns a string with length equal to the number of arguments,\nin which each character has the internal numerical code equal to its corresponding argument.\n\nNumerical codes are not necessarily portable across platforms.
+char utf8.char(···)\nReceives zero or more integers, converts each one to its corresponding UTF-8 byte sequence\nand returns a string with the concatenation of all these sequences.\n\nNew in Lua 5.3.
+charpattern utf8.charpattern (string)\nThe pattern (a string, not a function) "\0-\x7F\xC2-\xFD*" (see §6.4.1), which\nmatches exactly one UTF-8 byte sequence, assuming that the subject is a valid UTF-8 string.\n\nNew in Lua 5.3.
chdir lfs.chdir(path)\nChanges the current working directory to the given path.\n\nReturns true in case of success or nil plus an error string.
-clock os.clock()\nReturns an approximation of the amount in seconds of CPU time used by\nthe program, as returned by the underlying ISO C function `clock`.
-close coroutine.close(co)\nCloses coroutine `co`, that is, closes all its pending to-be-closed variables\nand puts the coroutine in a dead state. The given coroutine must be dead or\nsuspended. In case of error closing some variable, returns false plus the\nerror object; otherwise returns true.
-close file:close()\nCloses `file`. Note that files are automatically closed when their\nhandles are garbage collected, but that takes an unpredictable amount of\ntime to happen.\n\nWhen closing a file handle created with `io.popen`, `file:close` returns the\nsame values returned by `os.execute`.
-close io.close([file])\nEquivalent to `file:close()`. Without a `file`, closes the default\noutput file.
-codepoint utf8.codepoint(s [, i [, j [, lax]]])\nReturns the codepoints (as integers) from all characters in `s` that start\nbetween byte position `i` and `j` (both included). The default for `i` is 1\nand for `j` is `i`. It raises an error if it meets any invalid byte sequence.\n\nThis function only accepts valid sequences (well formed and not overlong).\nBy default, it only accepts byte sequences that result in valid Unicode code\npoints, rejecting values greater than `10FFFF` and surrogates. The boolean\nargument `lax` lifts these checks, so that all values up to `0x7FFFFFFF` are\naccepted. (Not well formed and overlong sequences are still rejected.)\n\nNew in Lua 5.3.
-codes utf8.codes(s [, lax])\nReturns values so that the construction\n\n for p, c in utf8.codes(s) do *body* end\n\nwill iterate over all UTF-8 characters in string `s`, with `p` being the\nposition (in bytes) and `c` the code point of each character. It raises an\nerror if it meets any invalid byte sequence.\n\nThis function only accepts valid sequences (well formed and not overlong).\nBy default, it only accepts byte sequences that result in valid Unicode code\npoints, rejecting values greater than `10FFFF` and surrogates. The boolean\nargument `lax` lifts these checks, so that all values up to `0x7FFFFFFF` are\naccepted. (Not well formed and overlong sequences are still rejected.)\n\nNew in Lua 5.3.
-collectgarbage _G.collectgarbage([opt [, arg]])\nThis function is a generic interface to the garbage collector. It\nperforms different functions according to its first argument, `opt`:\n "collect": performs a full garbage-collection cycle. This is the default\n option.\n "stop": stops automatic execution of the garbage collector.\n "restart": restarts automatic execution of the garbage collector.\n "count": returns the total memory in use by Lua in Kbytes. The value has a\n fractional part, so that it multiplied by 1024 gives the exact\n number of bytes in use by Lua.\n "step": performs a garbage-collection step. The step "size" is controlled\n by `arg`. With a zero value, the collector will perform one basic\n (indivisible) step. For non-zero values, the collector will perform\n as if that amount of memory (in Kbytes) had been allocated by Lua.\n Returns true if the step finished a collection cycle.\n "isrunning": returns a boolean that tells whether the collector is running\n (i.e., not stopped).\n "incremental": change the collector mode to incremental. This option can be\n followed by three numbers: the garbage-collector pause, the\n step multiplier, and the step size (see §2.5.1). A zero means to not\n change that value.\n "generational": change the collector mode to generational. This option can\n be followed by two numbers: the garbage-collector minor\n multiplier and the major multiplier (see §2.5.2). A zero\n means to not change that value.\n\nSee §2.5 for more details about garbage collection and some of these options.
-concat table.concat(list [, sep [, i [, j]]])\nGiven a list where all elements are strings or numbers, returns the string\n`list[i]..sep..list[i+1] ··· sep..list[j]`. The default value for `sep` is\nthe empty string, the default for `i` is 1, and the default for `j` is\n`#list`. If `i` is greater than `j`, returns the empty string.
-config package.config (string)\nA string describing some compile-time configurations for packages. This\nstring is a sequence of lines:\n The first line is the directory separator string. Default is '`\`' for\n Windows and '`/`' for all other systems.\n The second line is the character that separates templates in a path.\n Default is '`;`'.\n The third line is the string that marks the substitution points in a\n template. Default is '`?`'.\n The fourth line is a string that, in a path in Windows, is replaced by\n the executable's directory. Default is '`!`'.\n The fifth line is a mark to ignore all text after it when building the\n `luaopen_` function name. Default is '`-`'.\n\nNew in Lua 5.2.
+clock os.clock()\nReturns an approximation of the amount in seconds of CPU time used by the program, as returned\nby the underlying ISO C function `clock`.
+close coroutine.close(co)\nCloses coroutine `co`, that is, closes all its pending to-be-closed variables and puts the\ncoroutine in a dead state. The given coroutine must be dead or suspended. In case of error\nclosing some variable, returns false plus the error object; otherwise returns true.
+close file:close()\nCloses `file`. Note that files are automatically closed when their handles are garbage\ncollected, but that takes an unpredictable amount of time to happen.\n\nWhen closing a file handle created with `io.popen`, `file:close` returns the same values\nreturned by `os.execute`.
+close io.close([file])\nEquivalent to `file:close()`. Without a `file`, closes the default output file.
+codepoint utf8.codepoint(s [, i [, j [, lax]]])\nReturns the codepoints (as integers) from all characters in `s` that start between byte\nposition `i` and `j` (both included). The default for `i` is 1 and for `j` is `i`. It raises\nan error if it meets any invalid byte sequence.\n\nThis function only accepts valid sequences (well formed and not overlong). By default, it only\naccepts byte sequences that result in valid Unicode code points, rejecting values greater than\n`10FFFF` and surrogates. The boolean argument `lax` lifts these checks, so that all values\nup to `0x7FFFFFFF` are accepted. (Not well formed and overlong sequences are still rejected.)\n\nNew in Lua 5.3.
+codes utf8.codes(s [, lax])\nReturns values so that the construction\n\n for p, c in utf8.codes(s) do *body* end\n\nwill iterate over all UTF-8 characters in string `s`, with `p` being the position (in bytes) and\n`c` the code point of each character. It raises an error if it meets any invalid byte sequence.\n\nThis function only accepts valid sequences (well formed and not overlong). By default, it only\naccepts byte sequences that result in valid Unicode code points, rejecting values greater than\n`10FFFF` and surrogates. The boolean argument `lax` lifts these checks, so that all values\nup to `0x7FFFFFFF` are accepted. (Not well formed and overlong sequences are still rejected.)\n\nNew in Lua 5.3.
+collectgarbage _G.collectgarbage([opt [, arg]])\nThis function is a generic interface to the garbage collector. It performs different functions\naccording to its first argument, `opt`:\n "collect": performs a full garbage-collection cycle. This is the default option.\n "stop": stops automatic execution of the garbage collector.\n "restart": restarts automatic execution of the garbage collector.\n "count": returns the total memory in use by Lua in Kbytes. The value has a fractional part,\n so that it multiplied by 1024 gives the exact number of bytes in use by Lua.\n "step": performs a garbage-collection step. The step "size" is controlled by `arg`. With a\n zero value, the collector will perform one basic (indivisible) step. For non-zero values,\n the collector will perform as if that amount of memory (in Kbytes) had been allocated\n by Lua. Returns true if the step finished a collection cycle.\n "isrunning": returns a boolean that tells whether the collector is running (i.e., not\n stopped).\n "incremental": change the collector mode to incremental. This option can be followed\n by three numbers: the garbage-collector pause, the step multiplier, and the step size\n (see §2.5.1). A zero means to not change that value.\n "generational": change the collector mode to generational. This option can be followed\n by two numbers: the garbage-collector minor multiplier and the major multiplier (see\n §2.5.2). A zero means to not change that value.\n\nSee §2.5 for more details about garbage collection and some of these options.
+concat table.concat(list [, sep [, i [, j]]])\nGiven a list where all elements are strings or numbers, returns the string\n`list[i]..sep..list[i+1] ··· sep..list[j]`. The default value for `sep` is the empty\nstring, the default for `i` is 1, and the default for `j` is `#list`. If `i` is greater than\n`j`, returns the empty string.
+config package.config (string)\nA string describing some compile-time configurations for packages. This string is a sequence\nof lines:\n\n * The first line is the directory separator string. Default is '`\`' for Windows and\n '`/`' for all other systems.\n * The second line is the character that separates templates in a path. Default is '`;`'.\n * The third line is the string that marks the substitution points in a template. Default\n is '`?`'.\n * The fourth line is a string that, in a path in Windows, is replaced by the executable's\n directory. Default is '`!`'.\n * The fifth line is a mark to ignore all text after it when building the `luaopen_`\n function name. Default is '`-`'.\n\nNew in Lua 5.2.
coroutine _G.coroutine (module)\nLua coroutine module.
cos math.cos(x)\nReturns the cosine of `x` (assumed to be in radians).
cosh math.cosh(x)\nReturns the hyperbolic cosine of `x`.\n\nDeprecated in Lua 5.3.
-cpath package.cpath (string)\nA string with the path used by `require` to search for a C loader.\nLua initializes the C path `package.cpath` in the same way it initializes\nthe Lua path `package.path`, using the environment variable `LUA_CPATH_5_4`\nor the environment variable `LUA_CPATH` or a default path defined in\n`luaconf.h`.
-create coroutine.create(f)\nCreates a new coroutine, with body `f`. `f` must be a Lua\nfunction. Returns this new coroutine, an object with type `"thread"`.
-currentdir lfs.currentdir()\nReturns a string with the current working directory or nil plus an error\nstring.
-date os.date([format [, time]])\nReturns a string or a table containing date and time, formatted according\nto the given string `format`.\n\nIf the `time` argument is present, this is the time to be formatted\n(see the `os.time` function for a description of this value). Otherwise,\n`date` formats the current time.\n\nIf `format` starts with '`!`', then the date is formatted in Coordinated\nUniversal Time. After this optional character, if `format` is the string\n"`*t`", then `date` returns a table with the following fields: `year`,\n`month` (1-12), `day` (1-31), `hour` (0-23), `min` (0-59), `sec` (0-61, due\nto leap seconds), `wday` (weekday, 1-7, Sunday is 1), `yday` (day of the\nyear, 1-366), and `isdst` (daylight saving flag, a boolean). This last field\nmay be absent if the information is not available.\n\nIf `format` is not "`*t`", then `date` returns the date as a string,\nformatted according to the same rules as the ISO C function `strftime`.\n\nIf `format` is absent, it defaults to "`%c`", which gives a human-readable\ndate and time representation using the current locale.\n\nOn non-POSIX systems, this function may be not thread safe because of its\nreliance on C function `gmtime` and C function `localtime`.
+cpath package.cpath (string)\nA string with the path used by `require` to search for a C loader.\n\nLua initializes the C path `package.cpath` in the same way it initializes the Lua path\n`package.path`, using the environment variable `LUA_CPATH_5_4` or the environment variable\n`LUA_CPATH` or a default path defined in `luaconf.h`.
+create coroutine.create(f)\nCreates a new coroutine, with body `f`. `f` must be a Lua function. Returns this new coroutine,\nan object with type `"thread"`.
+currentdir lfs.currentdir()\nReturns a string with the current working directory or nil plus an error string.
+date os.date([format [, time]])\nReturns a string or a table containing date and time, formatted according to the given string\n`format`.\n\nIf the `time` argument is present, this is the time to be formatted (see the `os.time`\nfunction for a description of this value). Otherwise, `date` formats the current time.\n\nIf `format` starts with '`!`', then the date is formatted in Coordinated Universal Time. After\nthis optional character, if `format` is the string "`*t`", then `date` returns a table with\nthe following fields: `year`, `month` (1-12), `day` (1-31), `hour` (0-23), `min` (0-59),\n`sec` (0-61, due to leap seconds), `wday` (weekday, 1-7, Sunday is 1), `yday` (day of the\nyear, 1-366), and `isdst` (daylight saving flag, a boolean). This last field may be absent\nif the information is not available.\n\nIf `format` is not "`*t`", then `date` returns the date as a string, formatted according to\nthe same rules as the ISO C function `strftime`.\n\nIf `format` is absent, it defaults to "`%c`", which gives a human-readable date and time\nrepresentation using the current locale.\n\nOn non-POSIX systems, this function may be not thread safe because of its reliance on C\nfunction `gmtime` and C function `localtime`.
debug _G.debug (module)\nLua debug module.
-debug debug.debug()\nEnters an interactive mode with the user, running each string that\nthe user enters. Using simple commands and other debug facilities,\nthe user can inspect global and local variables, change their values,\nevaluate expressions, and so on. A line containing only the word `cont`\nfinishes this function, so that the caller continues its execution.\n\nNote that commands for `debug.debug` are not lexically nested within any\nfunction and so have no direct access to local variables.
+debug debug.debug()\nEnters an interactive mode with the user, running each string that the user enters. Using\nsimple commands and other debug facilities, the user can inspect global and local variables,\nchange their values, evaluate expressions, and so on. A line containing only the word `cont`\nfinishes this function, so that the caller continues its execution.\n\nNote that commands for `debug.debug` are not lexically nested within any function and so\nhave no direct access to local variables.
deg math.deg(x)\nConverts the angle `x` from radians to degrees.
-difftime os.difftime(t2, t1)\nReturns the difference, in seconds, from time `t1` to time `t2` (where the\ntimes are values returned by `os.time`). In POSIX, Windows, and some other\nsystems, this value is exactly `t2`*-*`t1`.
-dir lfs.dir(path)\nLua iterator over the entries of a given directory. Each time the iterator is\ncalled with dir_obj it returns a directory entry's name as a string, or nil\nif there are no more entries. You can also iterate by calling dir_obj:next(),\nand explicitly close the directory before the iteration finished with\ndir_obj:close(). Raises an error if path is not a directory.
-dofile _G.dofile([filename])\nOpens the named file and executes its content as a Lua chunk. When\ncalled without arguments,\n`dofile` executes the content of the standard input (`stdin`). Returns\nall values returned by the chunk. In case of errors, `dofile` propagates\nthe error to its caller. (That is, `dofile` does not run in protected mode.)
-dump string.dump(function [, strip])\nReturns a string containing a binary representation (a _binary chunk_) of the\ngiven function, so that a later `load` on this string returns a copy of the\nfunction (but with new upvalues). If `strip` is a true value, the binary\nrepresentation is created without debug information about the function (local\nvariable names, lines, etc.).\n\nFunctions with upvalues have only their number of upvalues saved. When\n(re)loaded, those upvalues receive fresh instances. (See the `load` function\nfor details about how these upvalues are initialized. You can use the debug\nlibrary to serialize and reload the upvalues of a function in a way adequate\nto your needs.)
-error _G.error(message [, level])\nRaises an error (see §2.3) with `message` as the error object. This function\nnever returns.\n\nUsually, `error` adds some information about the error position at the\nbeginning of the message, if the message is a string. The `level` argument\nspecifies how to get the error position. With level 1 (the default), the\nerror position is where the `error` function was called. Level 2 points the\nerror to where the function that called `error` was called; and so on.\nPassing a level 0 avoids the addition of error position information to the\nmessage.
-execute os.execute([command])\nThis function is equivalent to the ISO C function `system`. It passes\n`command` to be executed by an operating system shell. Its first result is\n`true` if the command terminated successfully, or `nil` otherwise. After this\nfirst result the function returns a string plus a number, as follows:\n "exit": the command terminated normally; the following number is the exit\n status of the command.\n "signal": the command was terminated by a signal; the following number is\n the signal that terminated the command.\n\nWhen called without a `command`, `os.execute` returns a boolean that is true\nif a shell is available.
-exit os.exit([code [, close]])\nCalls the ISO C function `exit` to terminate the host program. If `code` is\n`true`, the returned status is `EXIT_SUCCESS`; if `code` is `false`, the\nreturned status is `EXIT_FAILURE`; if `code` is a number, the returned status\nis this number. The default value for `code` is `true`.\n\nIf the optional second argument `close` is true, closes the Lua state before\nexiting.
+difftime os.difftime(t2, t1)\nReturns the difference, in seconds, from time `t1` to time `t2` (where the times are values\nreturned by `os.time`). In POSIX, Windows, and some other systems, this value is exactly\n`t2`*-*`t1`.
+dir lfs.dir(path)\nLua iterator over the entries of a given directory. Each time the iterator is called\nwith dir_obj it returns a directory entry's name as a string, or nil if there are no more\nentries. You can also iterate by calling dir_obj:next(), and explicitly close the directory\nbefore the iteration finished with dir_obj:close(). Raises an error if path is not a directory.
+dofile _G.dofile([filename])\nOpens the named file and executes its content as a Lua chunk. When called without arguments,\n`dofile` executes the content of the standard input (`stdin`). Returns all values returned\nby the chunk. In case of errors, `dofile` propagates the error to its caller. (That is,\n`dofile` does not run in protected mode.)
+dump string.dump(function [, strip])\nReturns a string containing a binary representation (a _binary chunk_) of the given function, so\nthat a later `load` on this string returns a copy of the function (but with new upvalues). If\n`strip` is a true value, the binary representation is created without debug information\nabout the function (local variable names, lines, etc.).\n\nFunctions with upvalues have only their number of upvalues saved. When (re)loaded, those\nupvalues receive fresh instances. (See the `load` function for details about how these\nupvalues are initialized. You can use the debug library to serialize and reload the upvalues\nof a function in a way adequate to your needs.)
+error _G.error(message [, level])\nRaises an error (see §2.3) with `message` as the error object. This function never returns.\n\nUsually, `error` adds some information about the error position at the beginning of the\nmessage, if the message is a string. The `level` argument specifies how to get the error\nposition. With level 1 (the default), the error position is where the `error` function\nwas called. Level 2 points the error to where the function that called `error` was called;\nand so on. Passing a level 0 avoids the addition of error position information to the message.
+execute os.execute([command])\nThis function is equivalent to the ISO C function `system`. It passes `command` to be\nexecuted by an operating system shell. Its first result is `true` if the command terminated\nsuccessfully, or `nil` otherwise. After this first result the function returns a string plus\na number, as follows:\n\n * "exit": the command terminated normally; the following number is the exit status of\n the command.\n * "signal": the command was terminated by a signal; the following number is the signal\n that terminated the command.\n\nWhen called without a `command`, `os.execute` returns a boolean that is true if a shell\nis available.
+exit os.exit([code [, close]])\nCalls the ISO C function `exit` to terminate the host program. If `code` is `true`, the returned\nstatus is `EXIT_SUCCESS`; if `code` is `false`, the returned status is `EXIT_FAILURE`; if\n`code` is a number, the returned status is this number. The default value for `code` is `true`.\n\nIf the optional second argument `close` is true, closes the Lua state before exiting.
exp math.exp(x)\nReturns the value *e^x*.
-extract bit32.extract(n, field [, width])\nReturns the unsigned number formed by the bits `field` to `field + width - 1`\nfrom `n`. Bits are numbered from 0 (least significant) to 31 (most\nsignificant). All accessed bits must be in the range [0, 31].\n\nThe default for `width` is 1.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-find string.find(s, pattern [, init [, plain]])\nLooks for the first match of `pattern` (see §6.4.1) in the string `s`. If it\nfinds a match, then `find` returns the indices of `s` where this occurrence\nstarts and ends; otherwise, it returns nil. A third, optional numerical\nargument `init` specifies where to start the search; its default value is 1\nand can be negative. A value of true as a fourth, optional argument `plain`\nturns off the pattern matching facilities, so the function does a plain\n"find substring" operation, with no characters in `pattern` being considered\nmagic.\n\nIf the pattern has captures, then in a successful match the captured values\nare also returned, after the two indices.
+extract bit32.extract(n, field [, width])\nReturns the unsigned number formed by the bits `field` to `field + width - 1` from `n`. Bits\nare numbered from 0 (least significant) to 31 (most significant). All accessed bits must be\nin the range [0, 31].\n\nThe default for `width` is 1.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+find string.find(s, pattern [, init [, plain]])\nLooks for the first match of `pattern` (see §6.4.1) in the string `s`. If it finds a match,\nthen `find` returns the indices of `s` where this occurrence starts and ends; otherwise,\nit returns nil. A third, optional numerical argument `init` specifies where to start the\nsearch; its default value is 1 and can be negative. A value of true as a fourth, optional\nargument `plain` turns off the pattern matching facilities, so the function does a plain\n"find substring" operation, with no characters in `pattern` being considered magic.\n\nIf the pattern has captures, then in a successful match the captured values are also returned,\nafter the two indices.
floor math.floor(x)\nReturns the largest integral value less than or equal to `x`.
flush file:flush()\nSaves any written data to `file`.
flush io.flush()\nEquivalent to `io.output():flush()`.
-fmod math.fmod(x, y)\nReturns the remainder of the division of `x` by `y` that rounds the\nquotient towards zero. (integer/float)
-format string.format(formatstring, ···)\nReturns a formatted version of its variable number of arguments following the\ndescription given in its first argument, which must be a string. The format\nstring follows the same rules as the ISO C function `sprintf`. The only\ndifferences are that the conversion specifiers and modifiers `*`, `h`, `L`,\n`l`, and `n` are not supported and that there is an extra specifier, `q`.\n\nThe specifier `q` formats booleans, nil, numbers, and strings in a way that\nthe result is a valid constant in Lua source code. Booleans and nil are\nwritten in the obvious way (`true`, `false`, `nil`). Floats are written in\nhexadecimal, to preserve full precision. A string is written between double\nquotes, using escape sequences when necessary to ensure that it can safely be\nread back by the Lua interpreter. For instance, the call\n\n string.format('%q', 'a string with "quotes" and \\n new line')\n\nmay produce the string:\n\n "a string with \"quotes\" and \\n new line"\n\nThis specifier does not support modifiers (flags, width, length).\n\nThe conversion specifiers `A` and `a` (when available), `E`, `e`, `f`, `G`,\nand `g` all expect a number as argument. The specifiers `c`, `d`, `i`, `o`,\n`u`, `X`, and `x` expect an integer. When Lua is compiled with a C89\ncompiler, the specifiers `A` and `a` (hexadecimal floats) do not support\nmodifiers.\n\nThe specifier `s` expects a string; if its argument is not a string, it is\nconverted to one following the same rules of `tostring`. If the specifier has\nany modifier, the corresponding string argument should not contain zeros.\n\nThe specifier `p` formats the pointer returned by `lua_topointer`. That gives\na unique string identifier for tables, userdata, threads, strings, and\nfunctions. For other values (numbers, nil, booleans), this specifier results\nin a string representing the pointer `NULL`.
-frexp math.frexp(x)\nReturns `m` and `e` such that 'x = m2^e', `e` is an integer and the\nabsolute value of `m` is in the range *[0.5, 1)* (or zero when `x` is zero).\n\nDeprecated in Lua 5.3.
-getenv os.getenv(varname)\nReturns the value of the process environment variable `varname`, or\nnil if the variable is not defined.
-getfenv _G.getfenv([f])\nReturns the current environment in use by the function. `f` can be a Lua\nfunction or a number that specifies the function at that stack level:\nLevel 1 is the function calling `getfenv`. If the given function is not a\nLua function, or if `f` is 0, `getfenv` returns the global environment. The\ndefault for `f` is 1.\n\nDeprecated in Lua 5.2.
+fmod math.fmod(x, y)\nReturns the remainder of the division of `x` by `y` that rounds the quotient towards\nzero. (integer/float)
+format string.format(formatstring, ···)\nReturns a formatted version of its variable number of arguments following the description\ngiven in its first argument, which must be a string. The format string follows the same rules\nas the ISO C function `sprintf`. The only differences are that the conversion specifiers and\nmodifiers `*`, `h`, `L`, `l`, and `n` are not supported and that there is an extra specifier,\n`q`.\n\nThe specifier `q` formats booleans, nil, numbers, and strings in a way that the result is a\nvalid constant in Lua source code. Booleans and nil are written in the obvious way (`true`,\n`false`, `nil`). Floats are written in hexadecimal, to preserve full precision. A string is\nwritten between double quotes, using escape sequences when necessary to ensure that it can\nsafely be read back by the Lua interpreter. For instance, the call\n\n string.format('%q', 'a string with "quotes" and \\n new line')\n\nmay produce the string:\n\n "a string with \"quotes\" and \ new line"\n\nThis specifier does not support modifiers (flags, width, length).\n\nThe conversion specifiers `A` and `a` (when available), `E`, `e`, `f`, `G`, and `g` all\nexpect a number as argument. The specifiers `c`, `d`, `i`, `o`, `u`, `X`, and `x` expect an\ninteger. When Lua is compiled with a C89 compiler, the specifiers `A` and `a` (hexadecimal\nfloats) do not support modifiers.\n\nThe specifier `s` expects a string; if its argument is not a string, it is converted to one\nfollowing the same rules of `tostring`. If the specifier has any modifier, the corresponding\nstring argument should not contain zeros.\n\nThe specifier `p` formats the pointer returned by `lua_topointer`. That gives a unique string\nidentifier for tables, userdata, threads, strings, and functions. For other values (numbers,\nnil, booleans), this specifier results in a string representing the pointer `NULL`.
+frexp math.frexp(x)\nReturns `m` and `e` such that 'x = m2^e', `e` is an integer and the absolute value of `m`\nis in the range *[0.5, 1)* (or zero when `x` is zero).\n\nDeprecated in Lua 5.3.
+getenv os.getenv(varname)\nReturns the value of the process environment variable `varname`, or nil if the variable is\nnot defined.
+getfenv _G.getfenv([f])\nReturns the current environment in use by the function. `f` can be a Lua function or a\nnumber that specifies the function at that stack level: Level 1 is the function calling\n`getfenv`. If the given function is not a Lua function, or if `f` is 0, `getfenv` returns\nthe global environment. The default for `f` is 1.\n\nDeprecated in Lua 5.2.
getfenv debug.getfenv(o)\nReturns the environment of object `o`.\n\nDeprecated in Lua 5.2.
-gethook debug.gethook([thread])\nReturns the current hook settings of the thread, as three values: the\ncurrent hook function, the current hook mask, and the current hook count,\nas set by the `debug.sethook` function.\n\nReturns nil if there is no active hook.
-getinfo debug.getinfo([thread, ] f [, what])\nReturns a table with information about a function. You can give the\nfunction directly or you can give a number as the value of `f`, which means\nthe function running at level `f` of the call stack of the given thread:\nlevel 0 is the current function (`getinfo` itself); level 1 is the function\nthat called `getinfo` (except for tail calls, which do not count in the\nstack); and so on. If `f` is a number greater than the number of active\nfunctions, then `getinfo` returns nil.\n\nThe returned table can contain all the fields returned by `lua_getinfo`,\nwith the string `what` describing which fields to fill in. The default for\n`what` is to get all information available, except the table of valid\nlines. If present, the option '`f`' adds a field named `func` with\nthe function itself. If present, the option '`L`' adds a field named\n`activelines` with the table of valid lines.\n\nFor instance, the expression `debug.getinfo(1,"n").name` returns a table\nwith a name for the current function, if a reasonable name can be found,\nand the expression `debug.getinfo(print)` returns a table with all available\ninformation about the `print` function.
-getlocal debug.getlocal([thread, ] f, local)\nThis function returns the name and the value of the local variable with index\n`local` of the function at level `f` of the stack. This function accesses not\nonly explicit local variables, but also parameters and temporary values.\n\nThe first parameter or local variable has index 1, and so on, following the\norder that they are declared in the code, counting only the variables that\nare active in the current scope of the function. Compile-time constants may\nnot appear in this listing, if they were optimized away by the compiler.\nNegative indices refer to vararg parameters; -1 is the first vararg\nparameter. The function returns nil if there is no variable with the given\nindex, and raises an error when called with a level out of range. (You can\ncall `debug.getinfo` to check whether the level is valid.)\n\nVariable names starting with '(' (open parenthesis) represent variables with\nno known names (internal variables such as loop control variables, and\nvariables from chunks saved without debug information).\n\nThe parameter `f` may also be a function. In that case, `getlocal` returns\nonly the name of function parameters.
-getmetatable _G.getmetatable(object)\nIf `object` does not have a metatable, returns nil. Otherwise, if the\nobject's metatable has a `__metatable` field, returns the associated\nvalue. Otherwise, returns the metatable of the given object.
-getmetatable debug.getmetatable(value)\nReturns the metatable of the given `value` or nil if it does not have\na metatable.
+gethook debug.gethook([thread])\nReturns the current hook settings of the thread, as three values: the current hook function,\nthe current hook mask, and the current hook count, as set by the `debug.sethook` function.\n\nReturns nil if there is no active hook.
+getinfo debug.getinfo([thread, ] f [, what])\nReturns a table with information about a function. You can give the function directly or\nyou can give a number as the value of `f`, which means the function running at level `f`\nof the call stack of the given thread: level 0 is the current function (`getinfo` itself);\nlevel 1 is the function that called `getinfo` (except for tail calls, which do not count in\nthe stack); and so on. If `f` is a number greater than the number of active functions, then\n`getinfo` returns nil.\n\nThe returned table can contain all the fields returned by `lua_getinfo`, with the string\n`what` describing which fields to fill in. The default for `what` is to get all information\navailable, except the table of valid lines. If present, the option '`f`' adds a field named\n`func` with the function itself. If present, the option '`L`' adds a field named `activelines`\nwith the table of valid lines.\n\nFor instance, the expression `debug.getinfo(1,"n").name` returns a table with a name for the\ncurrent function, if a reasonable name can be found, and the expression `debug.getinfo(print)`\nreturns a table with all available information about the `print` function.
+getlocal debug.getlocal([thread, ] f, local)\nThis function returns the name and the value of the local variable with index `local` of the\nfunction at level `f` of the stack. This function accesses not only explicit local variables,\nbut also parameters and temporary values.\n\nThe first parameter or local variable has index 1, and so on, following the order that\nthey are declared in the code, counting only the variables that are active in the current\nscope of the function. Compile-time constants may not appear in this listing, if they were\noptimized away by the compiler. Negative indices refer to vararg parameters; -1 is the first\nvararg parameter. The function returns nil if there is no variable with the given index,\nand raises an error when called with a level out of range. (You can call `debug.getinfo`\nto check whether the level is valid.)\n\nVariable names starting with '(' (open parenthesis) represent variables with no known names\n(internal variables such as loop control variables, and variables from chunks saved without\ndebug information).\n\nThe parameter `f` may also be a function. In that case, `getlocal` returns only the name of\nfunction parameters.
+getmetatable _G.getmetatable(object)\nIf `object` does not have a metatable, returns nil. Otherwise, if the object's metatable\nhas a `__metatable` field, returns the associated value. Otherwise, returns the metatable\nof the given object.
+getmetatable debug.getmetatable(value)\nReturns the metatable of the given `value` or nil if it does not have a metatable.
getregistry debug.getregistry()\nReturns the registry table (see §4.3).
-getupvalue debug.getupvalue(f, up)\nThis function returns the name and the value of the upvalue with index\n`up` of the function `f`. The function returns nil if there is no upvalue\nwith the given index.\n\n(For Lua functions, upvalues are the external local variables that the\nfunction uses, and that are consequently included in its closure.)\n\nFor C functions, this function uses the empty string `""` as a name for all\nupvalues.\n\nVariable name '`?`' (interrogation mark) represents variables with no known\nnames (variables from chunks saved without debug information).
-getuservalue debug.getuservalue(u, n)\nReturns the `n`-th user value associated to the userdata `u` plus a boolean,\nfalse, if the userdata does not have that value.\n\nNew in Lua 5.2.
-gmatch string.gmatch(s, pattern [, init])\nReturns an iterator function that, each time it is called, returns the\nnext captures from `pattern` (see §6.4.1) over the string `s`. If `pattern`\nspecifies no captures, then the whole match is produced in each call. A\nthird, optional argument `init` specifies where to start the search; its\ndefault value is 1 and can be negative.\n\nAs an example, the following loop will iterate over all the words from string\n`s`, printing one per line:\n\n s = "hello world from Lua"\n for w in string.gmatch(s, "%a+") do\n print(w)\n end\n\nThe next example collects all pairs `key=value` from the given string into a\ntable:\n\n t = {}\n s = "from=world, to=Lua"\n for k, v in string.gmatch(s, "(%w+)=(%w+)") do\n t[k] = v\n end\n\nFor this function, a caret '`^`' at the start of a pattern does not work as\nan anchor, as this would prevent the iteration.
-gsub string.gsub(s, pattern, repl [, n])\nReturns a copy of `s` in which all (or the first `n`, if given)\noccurrences of the `pattern` (see §6.4.1) have been replaced by a replacement\nstring specified by `repl`, which can be a string, a table, or a function.\n`gsub` also returns, as its second value, the total number of matches that\noccurred. The name `gsub` comes from "Global SUBstitution".\n\nIf `repl` is a string, then its value is used for replacement. The character\n`%` works as an escape character: any sequence in `repl` of the form `%d`,\nwith `d` between 1 and 9, stands for the value of the `d`-th captured\nsubstring; the sequence `%0` stands for the whole match; the sequence `%%`\nstands for a single `%`.\n\nIf `repl` is a table, then the table is queried for every match, using\nthe first capture as the key.\n\nIf `repl` is a function, then this function is called every time a match\noccurs, with all captured substrings passed as arguments, in order.\n\nIn any case, if the pattern specifies no captures, then it behaves as if the\nwhole pattern was inside a capture.\n\nIf the value returned by the table query or by the function call is a\nstring or a number, then it is used as the replacement string; otherwise,\nif it is false or nil, then there is no replacement (that is, the original\nmatch is kept in the string).\n\nHere are some examples:\n\n x = string.gsub("hello world", "(%w+)", "%1 %1")\n --> x="hello hello world world"\n x = string.gsub("hello world", "%w+", "%0 %0", 1)\n --> x="hello hello world"\n x = string.gsub("hello world from Lua", "(%w+)%s*(%w+)", "%2 %1")\n --> x="world hello Lua from"\n x = string.gsub("home = $HOME, user = $USER", "%$(%w+)", os.getenv)\n --> x="home = /home/roberto, user = roberto"\n x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s)\n return load(s)()\n end)\n --> x="4+5 = 9"\n local t = {name="lua", version="5.4"}\n x = string.gsub("$name-$version.tar.gz", "%$(%w+)", t)\n --> x="lua-5.4.tar.gz"
+getupvalue debug.getupvalue(f, up)\nThis function returns the name and the value of the upvalue with index `up` of the function\n`f`. The function returns nil if there is no upvalue with the given index.\n\n(For Lua functions, upvalues are the external local variables that the function uses, and\nthat are consequently included in its closure.)\n\nFor C functions, this function uses the empty string `""` as a name for all upvalues.\n\nVariable name '`?`' (interrogation mark) represents variables with no known names (variables\nfrom chunks saved without debug information).
+getuservalue debug.getuservalue(u, n)\nReturns the `n`-th user value associated to the userdata `u` plus a boolean, false, if the\nuserdata does not have that value.\n\nNew in Lua 5.2.
+gmatch string.gmatch(s, pattern [, init])\nReturns an iterator function that, each time it is called, returns the next captures from\n`pattern` (see §6.4.1) over the string `s`. If `pattern` specifies no captures, then the\nwhole match is produced in each call. A third, optional argument `init` specifies where to\nstart the search; its default value is 1 and can be negative.\n\nAs an example, the following loop will iterate over all the words from string `s`, printing\none per line:\n\n s = "hello world from Lua" for w in string.gmatch(s, "%a+") do\n print(w) end\n\nThe next example collects all pairs `key=value` from the given string into a table:\n\n t = {} s = "from=world, to=Lua" for k, v in string.gmatch(s, "(%w+)=(%w+)") do\n t[k] = v end\n\nFor this function, a caret '`^`' at the start of a pattern does not work as an anchor,\nas this would prevent the iteration.
+gsub string.gsub(s, pattern, repl [, n])\nReturns a copy of `s` in which all (or the first `n`, if given) occurrences of the `pattern`\n(see §6.4.1) have been replaced by a replacement string specified by `repl`, which can be\na string, a table, or a function. `gsub` also returns, as its second value, the total number\nof matches that occurred. The name `gsub` comes from "Global SUBstitution".\n\nIf `repl` is a string, then its value is used for replacement. The character `%` works as an\nescape character: any sequence in `repl` of the form `%d`, with `d` between 1 and 9, stands\nfor the value of the `d`-th captured substring; the sequence `%0` stands for the whole match;\nthe sequence `%%` stands for a single `%`.\n\nIf `repl` is a table, then the table is queried for every match, using the first capture as\nthe key.\n\nIf `repl` is a function, then this function is called every time a match occurs, with all\ncaptured substrings passed as arguments, in order.\n\nIn any case, if the pattern specifies no captures, then it behaves as if the whole pattern\nwas inside a capture.\n\nIf the value returned by the table query or by the function call is a string or a number,\nthen it is used as the replacement string; otherwise, if it is false or nil, then there is\nno replacement (that is, the original match is kept in the string).\n\nHere are some examples:\n\n x = string.gsub("hello world", "(%w+)", "%1 %1") --> x="hello hello world world" x =\n string.gsub("hello world", "%w+", "%0 %0", 1) --> x="hello hello world" x = string.gsub("hello\n world from Lua", "(%w+)%s*(%w+)", "%2 %1") --> x="world hello Lua from" x = string.gsub("home\n = $HOME, user = $USER", "%$(%w+)", os.getenv) --> x="home = /home/roberto, user = roberto"\n x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s)\n return load(s)() end)\n --> x="4+5 = 9" local t = {name="lua", version="5.4"} x = string.gsub("$name-$version.tar.gz",\n "%$(%w+)", t) --> x="lua-5.4.tar.gz"
huge math.huge (number)\nThe float value `HUGE_VAL`, a value greater than any other numerical value.
-input io.input([file])\nWhen called with a file name, it opens the named file (in text mode),\nand sets its handle as the default input file. When called with a file\nhandle, it simply sets this file handle as the default input file. When\ncalled without parameters, it returns the current default input file.\n\nIn case of errors this function raises the error, instead of returning an\nerror code.
-insert table.insert(list, [pos, ] value)\nInserts element `value` at position `pos` in `list`, shifting up the elements\n`list[pos], list[pos+1], ···, list[#list]`. The default value for `pos` is\n`#list+1`, so that a call `table.insert(t,x)` inserts `x` at the end of the\nlist `t`.
+input io.input([file])\nWhen called with a file name, it opens the named file (in text mode), and sets its handle as\nthe default input file. When called with a file handle, it simply sets this file handle as the\ndefault input file. When called without parameters, it returns the current default input file.\n\nIn case of errors this function raises the error, instead of returning an error code.
+insert table.insert(list, [pos, ] value)\nInserts element `value` at position `pos` in `list`, shifting up the elements `list[pos],\nlist[pos+1], ···, list[#list]`. The default value for `pos` is `#list+1`, so that a call\n`table.insert(t,x)` inserts `x` at the end of the list `t`.
io _G.io (module)\nLua io module.
-ipairs _G.ipairs(t)\nReturns three values (an iterator function, the table `t`, and 0) so that the\nconstruction\n\n for i,v in ipairs(t) do *body* end\n\nwill iterate over the key-value pairs (`1,t[1]`), (`2,t[2]`), ···, up to the\nfirst absent index.
-isyieldable coroutine.isyieldable([co])\nReturns true when the coroutine `co` can yield. The default for `co` is the\nrunning coroutine.\n\nA coroutine is yieldable if it is not the main thread and it is not inside a\nnon-yieldable C function.\n\nNew in Lua 5.3.
+ipairs _G.ipairs(t)\nReturns three values (an iterator function, the table `t`, and 0) so that the construction\n\n for i,v in ipairs(t) do *body* end\n\nwill iterate over the key-value pairs (`1,t[1]`), (`2,t[2]`), ···, up to the first\nabsent index.
+isyieldable coroutine.isyieldable([co])\nReturns true when the coroutine `co` can yield. The default for `co` is the running coroutine.\n\nA coroutine is yieldable if it is not the main thread and it is not inside a non-yieldable\nC function.\n\nNew in Lua 5.3.
ldexp math.ldexp(m, e)\nReturns 'm2^e' (`e` should be an integer).\n\nDeprecated in Lua 5.3.
-len string.len(s)\nReceives a string and returns its length. The empty string `""` has\nlength 0. Embedded zeros are counted, so `"a\000bc\000"` has length 5.
-len utf8.len(s [, i [, j [, lax]]])\nReturns the number of UTF-8 characters in string `s` that start between\npositions `i` and `j` (both inclusive). The default for `i` is 1 and for `j`\nis -1. If it finds any invalid byte sequence, returns nil plus the position\nof the first invalid byte.\n\nThis function only accepts valid sequences (well formed and not overlong).\nBy default, it only accepts byte sequences that result in valid Unicode code\npoints, rejecting values greater than `10FFFF` and surrogates. The boolean\nargument `lax` lifts these checks, so that all values up to `0x7FFFFFFF` are\naccepted. (Not well formed and overlong sequences are still rejected.)\n\nNew in Lua 5.3.
+len string.len(s)\nReceives a string and returns its length. The empty string `""` has length 0. Embedded zeros\nare counted, so `"a\000bc\000"` has length 5.
+len utf8.len(s [, i [, j [, lax]]])\nReturns the number of UTF-8 characters in string `s` that start between positions `i` and `j`\n(both inclusive). The default for `i` is 1 and for `j` is -1. If it finds any invalid byte\nsequence, returns nil plus the position of the first invalid byte.\n\nThis function only accepts valid sequences (well formed and not overlong). By default, it only\naccepts byte sequences that result in valid Unicode code points, rejecting values greater than\n`10FFFF` and surrogates. The boolean argument `lax` lifts these checks, so that all values\nup to `0x7FFFFFFF` are accepted. (Not well formed and overlong sequences are still rejected.)\n\nNew in Lua 5.3.
lfs _G.lfs (module)\nLua lfs module.
-lines file:lines(···)\nReturns an iterator function that, each time it is called, reads the file\naccording to the given formats. When no format is given, uses "l" as a\ndefault. As an example, the construction\n\n for c in file:lines(1) do *body* end\n\nwill iterate over all characters of the file, starting at the current\nposition. Unlike `io.lines`, this function does not close the file when the\nloop ends.
-lines io.lines([filename, ···])\nOpens the given file name in read mode and returns an iterator function that\nworks like `file:lines(···)` over the opened file. When the iterator function\nfails to read any value, it automatically closes the file. Besides the\niterator function, `io.lines` returns three other values: two nil values as\nplaceholders, plus the created file handle. Therefore, when used in a generic\nfor loop, the file is closed also if the loop is interrupted by an error or a\n`break`.\n\nThe call `io.lines()` (with no file name) is equivalent to\n`io.input():lines("l")`; that is, it iterates over the lines of the default\ninput file. In this case it does not close the file when the loop ends.\n\nIn case of errors opening the file, this function raises the error, instead\nof returning an error code.
-link lfs.link(old, new[, symlink])\nCreates a link. The first argument is the object to link to and the second is\nthe name of the link. If the optional third argument is true, the link will\nbe a symbolic link (by default, a hard link is created).
-load _G.load(chunk [, chunkname [, mode [, env]]])\nLoads a chunk.\n\nIf `chunk` is a string, the chunk is this string. If `chunk` is a function,\n`load` calls it repeatedly to get the chunk pieces. Each call to `chunk` must\nreturn a string that concatenates with previous results. A return of an empty\nstring, nil, or no value signals the end of the chunk.\n\nIf there are no syntactic errors, `load` returns the compiled chunk as a\nfunction; otherwise, it returns nil plus the error message.\n\nWhen you load a main chunk, the resulting function will always have exactly\none upvalue, the `_ENV` variable (see §2.2). However, when you load a binary\nchunk created from a function (see `string.dump`), the resulting function can\nhave an arbitrary number of upvalues, and there is no guarantee that its\nfirst upvalue will be the `_ENV` variable. (A non-main function may not even\nhave an `_ENV` upvalue.)\n\nRegardless, if the resulting function has any upvalues, its first upvalue is\nset to the value of `env`, if that parameter is given, or to the value of the\nglobal environment. Other upvalues are initialized with nil. All upvalues are\nfresh, that is, they are not shared with any other function.\n\n`chunkname` is used as the name of the chunk for error messages and debug\ninformation (see §4.7). When absent, it defaults to `chunk`, if `chunk` is a\nstring, or to "`=(load)`" otherwise.\n\nThe string `mode` controls whether the chunk can be text or binary (that is,\na precompiled chunk). It may be the string "`b`" (only binary chunks), "`t`"\n(only text chunks), or "`bt`" (both binary and text). The default is "`bt`".\n\nIt is safe to load malformed binary chunks; `load` signals an appropriate\nerror. However, Lua does not check the consistency of the code inside binary\nchunks; running maliciously crafted bytecode can crash the interpreter.
-loaded package.loaded (table)\nA table used by `require` to control which modules are already loaded. When\nyou require a module `modname` and `package.loaded[modname]` is not false,\n`require` simply returns the value stored there.\nThis variable is only a reference to the real table; assignments to this\nvariable do not change the table used by `require`.
+lines file:lines(···)\nReturns an iterator function that, each time it is called, reads the file according to the\ngiven formats. When no format is given, uses "l" as a default. As an example, the construction\n\n for c in file:lines(1) do *body* end\n\nwill iterate over all characters of the file, starting at the current position. Unlike\n`io.lines`, this function does not close the file when the loop ends.
+lines io.lines([filename, ···])\nOpens the given file name in read mode and returns an iterator function that works like\n`file:lines(···)` over the opened file. When the iterator function fails to read any value,\nit automatically closes the file. Besides the iterator function, `io.lines` returns three other\nvalues: two nil values as placeholders, plus the created file handle. Therefore, when used in\na generic for loop, the file is closed also if the loop is interrupted by an error or a `break`.\n\nThe call `io.lines()` (with no file name) is equivalent to `io.input():lines("l")`; that is,\nit iterates over the lines of the default input file. In this case it does not close the\nfile when the loop ends.\n\nIn case of errors opening the file, this function raises the error, instead of returning an\nerror code.
+link lfs.link(old, new[, symlink])\nCreates a link. The first argument is the object to link to and the second is the name of the\nlink. If the optional third argument is true, the link will be a symbolic link (by default,\na hard link is created).
+load _G.load(chunk [, chunkname [, mode [, env]]])\nLoads a chunk.\n\nIf `chunk` is a string, the chunk is this string. If `chunk` is a function, `load` calls\nit repeatedly to get the chunk pieces. Each call to `chunk` must return a string that\nconcatenates with previous results. A return of an empty string, nil, or no value signals\nthe end of the chunk.\n\nIf there are no syntactic errors, `load` returns the compiled chunk as a function; otherwise,\nit returns nil plus the error message.\n\nWhen you load a main chunk, the resulting function will always have exactly one upvalue, the\n`_ENV` variable (see §2.2). However, when you load a binary chunk created from a function\n(see `string.dump`), the resulting function can have an arbitrary number of upvalues,\nand there is no guarantee that its first upvalue will be the `_ENV` variable. (A non-main\nfunction may not even have an `_ENV` upvalue.)\n\nRegardless, if the resulting function has any upvalues, its first upvalue is set to the\nvalue of `env`, if that parameter is given, or to the value of the global environment. Other\nupvalues are initialized with nil. All upvalues are fresh, that is, they are not shared with\nany other function.\n\n`chunkname` is used as the name of the chunk for error messages and debug information (see\n§4.7). When absent, it defaults to `chunk`, if `chunk` is a string, or to "`=(load)`"\notherwise.\n\nThe string `mode` controls whether the chunk can be text or binary (that is, a precompiled\nchunk). It may be the string "`b`" (only binary chunks), "`t`" (only text chunks), or "`bt`"\n(both binary and text). The default is "`bt`".\n\nIt is safe to load malformed binary chunks; `load` signals an appropriate error. However,\nLua does not check the consistency of the code inside binary chunks; running maliciously\ncrafted bytecode can crash the interpreter.
+loaded package.loaded (table)\nA table used by `require` to control which modules are already loaded. When you require\na module `modname` and `package.loaded[modname]` is not false, `require` simply returns\nthe value stored there.\n\nThis variable is only a reference to the real table; assignments to this variable do not\nchange the table used by `require`.
loaders package.loaders (table)\nSee `package.searchers`.\n\nDeprecated in Lua 5.2.
-loadfile _G.loadfile([filename [, mode [, env]]])\nSimilar to `load`, but gets the chunk from file `filename` or from the\nstandard input, if no file name is given.
-loadlib package.loadlib(libname, funcname)\nDynamically links the host program with the C library `libname`.\n\nIf `funcname` is "`*`", then it only links with the library, making the\nsymbols exported by the library available to other dynamically linked\nlibraries. Otherwise, it looks for a function `funcname` inside the library\nand returns this function as a C function. So, `funcname` must follow the\n`lua_CFunction` prototype (see `lua_CFunction`).\n\nThis is a low-level function. It completely bypasses the package and module\nsystem. Unlike `require`, it does not perform any path searching and does\nnot automatically adds extensions. `libname` must be the complete file name\nof the C library, including if necessary a path and an extension. `funcname`\nmust be the exact name exported by the C library (which may depend on the\nC compiler and linker used).\n\nThis function is not supported by Standard C. As such, it is only available\non some platforms (Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix\nsystems that support the `dlfcn` standard).\n\nThis function is inherently insecure, as it allows Lua to call any function\nin any readable dynamic library in the system. (Lua calls any function\nassuming the function has a proper prototype and respects a proper protocol\n(see lua_CFunction). Therefore, calling an arbitrary function in an arbitrary\ndynamic library more often than not results in an access violation.)
-loadstring _G.loadstring(string [, chunkname])\nSimilar to `load`, but gets the chunk from the given string. To load and\nrun a given string, use the idiom assert(loadstring(s))() When absent,\n`chunkname` defaults to the given string.\n\nDeprecated in Lua 5.2.
-locale lpeg.locale([table])\nReturns a table with patterns for matching some character classes according\nto the current locale. The table has fields named `alnum`, `alpha`, `cntrl`,\n`digit`, `graph`, `lower`, `print`, `punct`, `space`, `upper`, and `xdigit`,\neach one containing a correspondent pattern. Each pattern matches any single\ncharacter that belongs to its class.\n\nIf called with an argument `table`, then it creates those fields inside the\ngiven table and returns that table.
-lock lfs.lock(filehandle, mode[, start[, length]])\nLocks a file or a part of it. This function works on open files; the file\nhandle should be specified as the first argument. The string mode could be\neither r (for a read/shared lock) or w (for a write/exclusive lock). The\noptional arguments start and length can be used to specify a starting point\nand its length; both should be numbers.\n\nReturns true if the operation was successful; in case of error, it returns\nnil plus an error string.
-lock_dir lfs.lock_dir(path, [seconds_stale])\nCreates a lockfile (called lockfile.lfs) in path if it does not exist and\nreturns the lock. If the lock already exists checks if it's stale, using the\nsecond parameter (default for the second parameter is INT_MAX, which in\npractice means the lock will never be stale. To free the the lock call\nlock:free().\n\nIn case of any errors it returns nil and the error message. In particular,\nif the lock exists and is not stale it returns the "File exists" message.
-log math.log(x [, base])\nReturns the logarithm of `x` in the given base. The default for `base` is 'e'\n(so that the function returns the natural logarithm of `x`).
+loadfile _G.loadfile([filename [, mode [, env]]])\nSimilar to `load`, but gets the chunk from file `filename` or from the standard input,\nif no file name is given.
+loadlib package.loadlib(libname, funcname)\nDynamically links the host program with the C library `libname`.\n\nIf `funcname` is "`*`", then it only links with the library, making the symbols exported\nby the library available to other dynamically linked libraries. Otherwise, it looks for\na function `funcname` inside the library and returns this function as a C function. So,\n`funcname` must follow the `lua_CFunction` prototype (see `lua_CFunction`).\n\nThis is a low-level function. It completely bypasses the package and module system. Unlike\n`require`, it does not perform any path searching and does not automatically adds\nextensions. `libname` must be the complete file name of the C library, including if necessary\na path and an extension. `funcname` must be the exact name exported by the C library (which\nmay depend on the C compiler and linker used).\n\nThis function is not supported by Standard C. As such, it is only available on some platforms\n(Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix systems that support the `dlfcn`\nstandard).\n\nThis function is inherently insecure, as it allows Lua to call any function in any readable\ndynamic library in the system. (Lua calls any function assuming the function has a proper\nprototype and respects a proper protocol (see lua_CFunction). Therefore, calling an arbitrary\nfunction in an arbitrary dynamic library more often than not results in an access violation.)
+loadstring _G.loadstring(string [, chunkname])\nSimilar to `load`, but gets the chunk from the given string. To load and run a given string,\nuse the idiom assert(loadstring(s))() When absent, `chunkname` defaults to the given string.\n\nDeprecated in Lua 5.2.
+locale lpeg.locale([table])\nReturns a table with patterns for matching some character classes according to the current\nlocale. The table has fields named `alnum`, `alpha`, `cntrl`, `digit`, `graph`, `lower`,\n`print`, `punct`, `space`, `upper`, and `xdigit`, each one containing a correspondent\npattern. Each pattern matches any single character that belongs to its class.\n\nIf called with an argument `table`, then it creates those fields inside the given table and\nreturns that table.
+lock lfs.lock(filehandle, mode[, start[, length]])\nLocks a file or a part of it. This function works on open files; the file handle should be\nspecified as the first argument. The string mode could be either r (for a read/shared lock)\nor w (for a write/exclusive lock). The optional arguments start and length can be used to\nspecify a starting point and its length; both should be numbers.\n\nReturns true if the operation was successful; in case of error, it returns nil plus an\nerror string.
+lock_dir lfs.lock_dir(path, [seconds_stale])\nCreates a lockfile (called lockfile.lfs) in path if it does not exist and returns the lock. If\nthe lock already exists checks if it's stale, using the second parameter (default for the\nsecond parameter is INT_MAX, which in practice means the lock will never be stale. To free\nthe the lock call lock:free().\n\nIn case of any errors it returns nil and the error message. In particular, if the lock exists\nand is not stale it returns the "File exists" message.
+log math.log(x [, base])\nReturns the logarithm of `x` in the given base. The default for `base` is 'e' (so that the\nfunction returns the natural logarithm of `x`).
log10 math.log10(x)\nReturns the base-10 logarithm of `x`.\n\nDeprecated in Lua 5.2.
-lower string.lower(s)\nReceives a string and returns a copy of this string with all uppercase\nletters changed to lowercase. All other characters are left unchanged. The\ndefinition of what an uppercase letter is depends on the current locale.
+lower string.lower(s)\nReceives a string and returns a copy of this string with all uppercase letters changed to\nlowercase. All other characters are left unchanged. The definition of what an uppercase\nletter is depends on the current locale.
lpeg _G.lpeg (module)\nLua lpeg module.
-lrotate bit32.lrotate(x, disp)\nReturns the number `x` rotated `disp` bits to the left. The number `disp` may\nbe any representable integer.\n\nFor any valid displacement, the following identity holds:\n\n assert(bit32.lrotate(x, disp) == bit32.lrotate(x, disp % 32))\n\nIn particular, negative displacements rotate to the right.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-lshift bit32.lshift(x, disp)\nReturns the number `x` shifted `disp` bits to the left. The number `disp` may\nbe any representable integer. Negative displacements shift to the right. In\nany direction, vacant bits are filled with zeros. In particular,\ndisplacements with absolute values higher than 31 result in zero (all bits\nare shifted out).\n\nFor positive displacements, the following equality holds:\n\n assert(bit32.lshift(b, disp) == (b * 2^disp) % 2^32)\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-match lpeg.match(pattern, subject [, init])\nThe matching function. It attempts to match the given pattern against the\nsubject string. If the match succeeds, returns the index in the subject of\nthe first character after the match, or the captured values (if the pattern\ncaptured any value).\n\nAn optional numeric argument `init` makes the match start at that position in\nthe subject string. As usual in Lua libraries, a negative value counts from\nthe end.\n\nUnlike typical pattern-matching functions, match works only in anchored mode;\nthat is, it tries to match the pattern with a prefix of the given subject\nstring (at position `init`), not with an arbitrary substring of the subject.\nSo, if we want to find a pattern anywhere in a string, we must either write a\nloop in Lua or write a pattern that matches anywhere. This second approach is\neasy and quite efficient; see examples.
-match string.match(s, pattern [, init])\nLooks for the first *match* of the `pattern` (see §6.4.1) in the string `s`.\nIf it finds one, then `match` returns the captures from the pattern;\notherwise it returns nil. If `pattern` specifies no captures, then the whole\nmatch is returned. A third, optional numerical argument `init` specifies\nwhere to start the search; its default value is 1 and can be negative.
+lrotate bit32.lrotate(x, disp)\nReturns the number `x` rotated `disp` bits to the left. The number `disp` may be any\nrepresentable integer.\n\nFor any valid displacement, the following identity holds:\n\n assert(bit32.lrotate(x, disp) == bit32.lrotate(x, disp % 32))\n\nIn particular, negative displacements rotate to the right.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+lshift bit32.lshift(x, disp)\nReturns the number `x` shifted `disp` bits to the left. The number `disp` may be any\nrepresentable integer. Negative displacements shift to the right. In any direction, vacant\nbits are filled with zeros. In particular, displacements with absolute values higher than\n31 result in zero (all bits are shifted out).\n\nFor positive displacements, the following equality holds:\n\n assert(bit32.lshift(b, disp) == (b * 2^disp) % 2^32)\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+match lpeg.match(pattern, subject [, init])\nThe matching function. It attempts to match the given pattern against the subject string. If\nthe match succeeds, returns the index in the subject of the first character after the match,\nor the captured values (if the pattern captured any value).\n\nAn optional numeric argument `init` makes the match start at that position in the subject\nstring. As usual in Lua libraries, a negative value counts from the end.\n\nUnlike typical pattern-matching functions, match works only in anchored mode; that is, it\ntries to match the pattern with a prefix of the given subject string (at position `init`),\nnot with an arbitrary substring of the subject. So, if we want to find a pattern anywhere in\na string, we must either write a loop in Lua or write a pattern that matches anywhere. This\nsecond approach is easy and quite efficient; see examples.
+match string.match(s, pattern [, init])\nLooks for the first *match* of the `pattern` (see §6.4.1) in the string `s`. If it finds one,\nthen `match` returns the captures from the pattern; otherwise it returns nil. If `pattern`\nspecifies no captures, then the whole match is returned. A third, optional numerical argument\n`init` specifies where to start the search; its default value is 1 and can be negative.
math _G.math (module)\nLua math module.
-max math.max(x, ···)\nReturns the argument with the maximum value, according to the Lua operator\n`<`.
+max math.max(x, ···)\nReturns the argument with the maximum value, according to the Lua operator `<`.
maxinteger math.maxinteger (number)\nAn integer with the maximum value for an integer.\n\nNew in Lua 5.3.
-maxn table.maxn(table)\nReturns the largest positive numerical index of the given table, or zero if\nthe table has no positive numerical indices. (To do its job this function\ndoes a linear traversal of the whole table.)\n\nDeprecated in Lua 5.2.
-min math.min(x, ···)\nReturns the argument with the minimum value, according to the Lua operator\n`<`.
+maxn table.maxn(table)\nReturns the largest positive numerical index of the given table, or zero if the table has\nno positive numerical indices. (To do its job this function does a linear traversal of the\nwhole table.)\n\nDeprecated in Lua 5.2.
+min math.min(x, ···)\nReturns the argument with the minimum value, according to the Lua operator `<`.
mininteger math.mininteger (number)\nAn integer with the minimum value for an integer.\n\nNew in Lua 5.3.
-mkdir lfs.mkdir(dirname)\nCreates a new directory. The argument is the name of the new directory.\n\nReturns true in case of success or nil, an error message and a\nsystem-dependent error code in case of error.
-modf math.modf(x)\nReturns the integral part of `x` and the fractional part of `x`. Its second\nresult is always a float.
-module _G.module(name [, ···])\nCreates a module. If there is a table in `package.loaded[name]`, this table\nis the module. Otherwise, if there is a global table `t` with the given name,\nthis table is the module. Otherwise creates a new table `t` and sets it as\nthe value of the global `name` and the value of `package.loaded[name]`. This\nfunction also initializes `t._NAME` with the given name, `t._M` with the\nmodule (`t` itself), and `t._PACKAGE` with the package name (the full module\nname minus last component; see below). Finally, `module` sets `t` as the new\nenvironment of the current function and the new value of\n`package.loaded[name]`, so that `require` returns `t`. If `name` is a\ncompound name (that is, one with components separated by dots), `module`\ncreates (or reuses, if they already exist) tables for each component. For\ninstance, if `name` is `a.b.c`, then `module` stores the module table in\nfield `c` of field `b` of global `a`. This function can receive optional\n*options* after the module name, where each option is a function to be\napplied over the module.\n\nDeprecated in Lua 5.2.
-move table.move(a1, f, e, t [, a2])\nMoves elements from the table `a1` to the table `a2`, performing the\nequivalent to the following multiple assignment: `a2[t], ··· = a1[f], ···,\na1[e]`. The default for `a2` is `a1`. The destination range can overlap with\nthe source range. Index `f` must be positive.\n\nReturns the destination table `a2`.\n\nNew in Lua 5.3.
-next _G.next(table [, index])\nAllows a program to traverse all fields of a table. Its first argument is\na table and its second argument is an index in this table. A call to `next`\nreturns the next index of the table and its associated value. When called\nwith nil as its second argument, `next` returns an initial index and its\nassociated value. When called with the last index, or with nil in an empty\ntable, `next` returns nil. If the second argument is absent, then it is\ninterpreted as nil. In particular, you can use `next(t)` to check whether a\ntable is empty.\n\nThe order in which the indices are enumerated is not specified, *even for\nnumeric indices*. (To traverse a table in numeric order, use a numerical\n`for`.)\n\nThe behavior of `next` is undefined if, during the traversal, you assign any\nvalue to a non-existent field in the table. You may however modify existing\nfields. In particular, you may set existing fields to nil.
-offset utf8.offset(s, n [, i])\nReturns the position (in bytes) where the encoding of the `n`-th character of\n`s` (counting from position `i`) starts. A negative `n` gets characters\nbefore position `i`. The default for `i` is 1 when `n` is non-negative and\n`#s + 1` otherwise, so that `utf8.offset(s, -n)` gets the offset of the\n`n`-th character from the end of the string. If the specified character is\nneither in the subject nor right after its end, the function returns nil.\n\nAs a special case, when `n` is 0 the function returns the start of the\nencoding of the character that contains the `i`-th byte of `s`.\n\nThis function assumes that `s` is a valid UTF-8 string.\n\nNew in Lua 5.3.
-open io.open(filename [, mode])\nThis function opens a file, in the mode specified in the string `mode`. It\nreturns a new file handle, or, in case of errors, nil plus an error message.\n\nThe `mode` string can be any of the following:\n "r": read mode (the default);\n "w": write mode;\n "a": append mode;\n "r+": update mode, all previous data is preserved;\n "w+": update mode, all previous data is erased;\n "a+": append update mode, previous data is preserved, writing is only\n allowed at the end of file.\n\nThe `mode` string can also have a '`b`' at the end, which is needed in\nsome systems to open the file in binary mode.
+mkdir lfs.mkdir(dirname)\nCreates a new directory. The argument is the name of the new directory.\n\nReturns true in case of success or nil, an error message and a system-dependent error code\nin case of error.
+modf math.modf(x)\nReturns the integral part of `x` and the fractional part of `x`. Its second result is always\na float.
+module _G.module(name [, ···])\nCreates a module. If there is a table in `package.loaded[name]`, this table is the\nmodule. Otherwise, if there is a global table `t` with the given name, this table is the\nmodule. Otherwise creates a new table `t` and sets it as the value of the global `name`\nand the value of `package.loaded[name]`. This function also initializes `t._NAME` with the\ngiven name, `t._M` with the module (`t` itself), and `t._PACKAGE` with the package name\n(the full module name minus last component; see below). Finally, `module` sets `t` as the\nnew environment of the current function and the new value of `package.loaded[name]`, so that\n`require` returns `t`. If `name` is a compound name (that is, one with components separated\nby dots), `module` creates (or reuses, if they already exist) tables for each component. For\ninstance, if `name` is `a.b.c`, then `module` stores the module table in field `c` of field\n`b` of global `a`. This function can receive optional *options* after the module name,\nwhere each option is a function to be applied over the module.\n\nDeprecated in Lua 5.2.
+move table.move(a1, f, e, t [, a2])\nMoves elements from the table `a1` to the table `a2`, performing the equivalent to the\nfollowing multiple assignment: `a2[t], ··· = a1[f], ···, a1[e]`. The default for `a2`\nis `a1`. The destination range can overlap with the source range. Index `f` must be positive.\n\nReturns the destination table `a2`.\n\nNew in Lua 5.3.
+next _G.next(table [, index])\nAllows a program to traverse all fields of a table. Its first argument is a table and its\nsecond argument is an index in this table. A call to `next` returns the next index of the\ntable and its associated value. When called with nil as its second argument, `next` returns\nan initial index and its associated value. When called with the last index, or with nil in\nan empty table, `next` returns nil. If the second argument is absent, then it is interpreted\nas nil. In particular, you can use `next(t)` to check whether a table is empty.\n\nThe order in which the indices are enumerated is not specified, *even for numeric indices*. (To\ntraverse a table in numeric order, use a numerical `for`.)\n\nThe behavior of `next` is undefined if, during the traversal, you assign any value to a\nnon-existent field in the table. You may however modify existing fields. In particular,\nyou may set existing fields to nil.
+offset utf8.offset(s, n [, i])\nReturns the position (in bytes) where the encoding of the `n`-th character of `s` (counting\nfrom position `i`) starts. A negative `n` gets characters before position `i`. The default\nfor `i` is 1 when `n` is non-negative and `#s + 1` otherwise, so that `utf8.offset(s, -n)`\ngets the offset of the `n`-th character from the end of the string. If the specified character\nis neither in the subject nor right after its end, the function returns nil.\n\nAs a special case, when `n` is 0 the function returns the start of the encoding of the\ncharacter that contains the `i`-th byte of `s`.\n\nThis function assumes that `s` is a valid UTF-8 string.\n\nNew in Lua 5.3.
+open io.open(filename [, mode])\nThis function opens a file, in the mode specified in the string `mode`. It returns a new\nfile handle, or, in case of errors, nil plus an error message.\n\nThe `mode` string can be any of the following:\n\n * "r": read mode (the default);\n * "w": write mode;\n * "a": append mode;\n * "r+": update mode, all previous data is preserved;\n * "w+": update mode, all previous data is erased;\n * "a+": append update mode, previous data is preserved, writing is only allowed at the\n end of file.\n\nThe `mode` string can also have a '`b`' at the end, which is needed in some systems to open\nthe file in binary mode.
os _G.os (module)\nLua os module.
output io.output([file])\nSimilar to `io.input`, but operates over the default output file.
-pack string.pack(fmt, v1, v2, ···)\nReturns a binary string containing the values `v1`, `v2`, etc. serialized in\nbinary form (packed) according to the format string `fmt` (see §6.4.2).\n\nNew in Lua 5.3.
-pack table.pack(···)\nReturns a new table with all parameters stored into keys 1, 2, etc. and with\na field "`n`" with the total number of parameters. Note that the resulting\ntable may not be a sequence, if some arguments are nil.\n\nNew in Lua 5.2.
+pack string.pack(fmt, v1, v2, ···)\nReturns a binary string containing the values `v1`, `v2`, etc. serialized in binary form\n(packed) according to the format string `fmt` (see §6.4.2).\n\nNew in Lua 5.3.
+pack table.pack(···)\nReturns a new table with all parameters stored into keys 1, 2, etc. and with a field "`n`"\nwith the total number of parameters. Note that the resulting table may not be a sequence,\nif some arguments are nil.\n\nNew in Lua 5.2.
package _G.package (module)\nLua package module.
-packsize string.packsize(fmt)\nReturns the size of a string resulting from `string.pack` with the given\nformat. The format string cannot have the variable-length options 's' or 'z'\n(see §6.4.2).\n\nNew in Lua 5.3.
-pairs _G.pairs(t)\nIf `t` has a metamethod `__pairs`, calls it with `t` as argument and returns\nthe first three results from the call.\n\nOtherwise, returns three values: the `next` function, the table `t`, and nil,\nso that the construction\n\n for k,v in pairs(t) do *body* end\n\nwill iterate over all key–value pairs of table `t`.\n\nSee function `next` for the caveats of modifying the table during its\ntraversal.
-path package.path (string)\nA string with the path used by `require` to search for a Lua loader.\nAt start-up, Lua initializes this variable with the value of the\nenvironment variable `LUA_PATH_5_4` or the environment variable `LUA_PATH`\nor with a default path defined in `luaconf.h`, if those environment\nvariables are not defined. A "`;;`" in the value of the environment\nvariable is replaced by the default path.
-pcall _G.pcall(f [, arg1, ···])\nCalls the function `f` with the given arguments in *protected mode*. This\nmeans that any error inside `f` is not propagated; instead, `pcall` catches\nthe error and returns a status code. Its first result is the status code (a\nboolean), which is true if the call succeeds without errors. In such case,\n`pcall` also returns all results from the call, after this first result. In\ncase of any error, `pcall` returns false plus the error object. Note that\nerrors caught by `pcall` do not call a message handler.
+packsize string.packsize(fmt)\nReturns the size of a string resulting from `string.pack` with the given format. The format\nstring cannot have the variable-length options 's' or 'z' (see §6.4.2).\n\nNew in Lua 5.3.
+pairs _G.pairs(t)\nIf `t` has a metamethod `__pairs`, calls it with `t` as argument and returns the first three\nresults from the call.\n\nOtherwise, returns three values: the `next` function, the table `t`, and nil, so that the\nconstruction\n\n for k,v in pairs(t) do *body* end\n\nwill iterate over all key–value pairs of table `t`.\n\nSee function `next` for the caveats of modifying the table during its traversal.
+path package.path (string)\nA string with the path used by `require` to search for a Lua loader.\n\nAt start-up, Lua initializes this variable with the value of the environment variable\n`LUA_PATH_5_4` or the environment variable `LUA_PATH` or with a default path defined in\n`luaconf.h`, if those environment variables are not defined. A "`;;`" in the value of the\nenvironment variable is replaced by the default path.
+pcall _G.pcall(f [, arg1, ···])\nCalls the function `f` with the given arguments in *protected mode*. This means that any\nerror inside `f` is not propagated; instead, `pcall` catches the error and returns a status\ncode. Its first result is the status code (a boolean), which is true if the call succeeds\nwithout errors. In such case, `pcall` also returns all results from the call, after this\nfirst result. In case of any error, `pcall` returns false plus the error object. Note that\nerrors caught by `pcall` do not call a message handler.
pi math.pi (number)\nThe value of 'π'.
-popen io.popen(prog [, mode])\nStarts the program `prog` in a separated process and returns a file handle\nthat you can use to read data from this program (if `mode` is `"r"`,\nthe default) or to write data to this program (if `mode` is `"w"`).\n\nThis function is system dependent and is not available on all platforms.
-pow math.pow(x, y)\nReturns *x^y*. (You can also use the expression `x^y` to compute this\nvalue.)\n\nDeprecated in Lua 5.3.
-preload package.preload (table)\nA table to store loaders for specific modules (see `require`).\nThis variable is only a reference to the real table; assignments to this\nvariable do not change the table used by `require`.
-print _G.print(···)\nReceives any number of arguments and prints their values to `stdout`,\nconverting each argument to a string following the same rules of `tostring`.\n\nThe function `print` is not intended for formatted output, but only as a\nquick way to show a value, for instance for debugging. For complete control\nover the output, use `string.format` and `io.write`.
+popen io.popen(prog [, mode])\nStarts the program `prog` in a separated process and returns a file handle that you can use\nto read data from this program (if `mode` is `"r"`, the default) or to write data to this\nprogram (if `mode` is `"w"`).\n\nThis function is system dependent and is not available on all platforms.
+pow math.pow(x, y)\nReturns *x^y*. (You can also use the expression `x^y` to compute this value.)\n\nDeprecated in Lua 5.3.
+preload package.preload (table)\nA table to store loaders for specific modules (see `require`).\n\nThis variable is only a reference to the real table; assignments to this variable do not\nchange the table used by `require`.
+print _G.print(···)\nReceives any number of arguments and prints their values to `stdout`, converting each argument\nto a string following the same rules of `tostring`.\n\nThe function `print` is not intended for formatted output, but only as a quick way to show a\nvalue, for instance for debugging. For complete control over the output, use `string.format`\nand `io.write`.
rad math.rad(x)\nConverts the angle `x` from degrees to radians.
-random math.random([m [, n]])\nWhen called without arguments, returns a pseudo-random float with uniform\ndistribution in the range [0,1). When called with two integers `m` and `n`,\n`math.random` returns a pseudo-random integer with uniform distribution in\nthe range `[m, n]. The call `math.random(n)`, for a positive `n`, is\nequivalent to `math.random(1,n)`. The call `math.random(0)` produces an\ninteger with all bits (pseudo)random.\n\nThis function uses the `xoshiro256**` algorithm to produce pseudo-random\n64-bit integers, which are the results of calls with argument 0. Other\nresults (ranges and floats) are unbiased extracted from these integers.\n\nLua initializes its pseudo-random generator with the equivalent of a call to\n`math.randomseed` with no arguments, so that `math.random` should generate\ndifferent sequences of results each time the program runs.
-randomseed math.randomseed([x [, y]])\nWhen called with at least one argument, the integer parameters `x` and `y`\nare joined into a 128-bit *seed* that is used to reinitialize the\npseudo-random generator; equal seeds produce equal sequences of numbers. The\ndefault for `y` is zero.\n\nWhen called with no arguments, Lua generates a seed with a weak attempt for\nrandomness.\n\nThis function returns the two seed components that were effectively used, so\nthat setting them again repeats the sequence.\n\nTo ensure a required level of randomness to the initial state (or contrarily,\nto have a deterministic sequence, for instance when debugging a program), you\nshould call `math.randomseed` with explicit arguments.
-rawequal _G.rawequal(v1, v2)\nChecks whether `v1` is equal to `v2`, without invoking the `__eq`\nmetamethod. Returns a boolean.
-rawget _G.rawget(table, index)\nGets the real value of `table[index]`, without using the `__index`\nmetavalue. `table` must be a table; `index` may be any value.
-rawlen _G.rawlen(v)\nReturns the length of the object `v`,\nwhich must be a table or a string,\nwithout invoking the `__len` metamethod.\nReturns an integer.\n\nNew in Lua 5.2.
-rawset _G.rawset(table, index, value)\nSets the real value of `table[index]` to `value`, without using the\n`__newindex` metavalue. `table` must be a table, `index` any value different\nfrom nil and NaN, and `value` any Lua value.\n\nThis function returns `table`.
-read file:read(···)\nReads the file `file`, according to the given formats, which specify\nwhat to read. For each format, the function returns a string or a number\nwith the characters read, or nil if it cannot read data with the specified\nformat. (In this latter case, the function does not read subsequent formats.)\nWhen called without arguments, it uses a default format that reads the next\nline (see below).\n\nThe available formats are\n "n": reads a numeral and returns it as a float or an integer, following the\n lexical conventions of Lua. (The numeral may have leading whitespaces\n and a sign.) This format always reads the longest input sequence that\n is a valid prefix for a number; if that prefix does not form a valid\n number (e.g., an empty string, "0x", or "3.4e-") or it is too long\n (more than 200 characters), it is discarded and the format returns\n nil.\n "a": reads the whole file, starting at the current position. On end of\n file, it returns the empty string; this format never fails.\n "l": reads the next line skipping the end of line, returning nil on\n end of file. This is the default format.\n "L": reads the next line keeping the end-of-line character (if present),\n returning nil on end of file.\n *number*: reads a string with up to this number of bytes, returning nil on\n end of file. If *number* is zero, it reads nothing and returns an\n empty string, or nil on end of file.\n\nThe formats "l" and "L" should be used only for text files.
+random math.random([m [, n]])\nWhen called without arguments, returns a pseudo-random float with uniform distribution in the\nrange [0,1). When called with two integers `m` and `n`, `math.random` returns a pseudo-random\ninteger with uniform distribution in the range `[m, n]. The call `math.random(n)`, for a\npositive `n`, is equivalent to `math.random(1,n)`. The call `math.random(0)` produces an\ninteger with all bits (pseudo)random.\n\nThis function uses the `xoshiro256**` algorithm to produce pseudo-random 64-bit integers,\nwhich are the results of calls with argument 0. Other results (ranges and floats) are unbiased\nextracted from these integers.\n\nLua initializes its pseudo-random generator with the equivalent of a call to `math.randomseed`\nwith no arguments, so that `math.random` should generate different sequences of results each\ntime the program runs.
+randomseed math.randomseed([x [, y]])\nWhen called with at least one argument, the integer parameters `x` and `y` are joined into a\n128-bit *seed* that is used to reinitialize the pseudo-random generator; equal seeds produce\nequal sequences of numbers. The default for `y` is zero.\n\nWhen called with no arguments, Lua generates a seed with a weak attempt for randomness.\n\nThis function returns the two seed components that were effectively used, so that setting\nthem again repeats the sequence.\n\nTo ensure a required level of randomness to the initial state (or contrarily, to have\na deterministic sequence, for instance when debugging a program), you should call\n`math.randomseed` with explicit arguments.
+rawequal _G.rawequal(v1, v2)\nChecks whether `v1` is equal to `v2`, without invoking the `__eq` metamethod. Returns a boolean.
+rawget _G.rawget(table, index)\nGets the real value of `table[index]`, without using the `__index` metavalue. `table` must\nbe a table; `index` may be any value.
+rawlen _G.rawlen(v)\nReturns the length of the object `v`, which must be a table or a string, without invoking the\n`__len` metamethod. Returns an integer.\n\nNew in Lua 5.2.
+rawset _G.rawset(table, index, value)\nSets the real value of `table[index]` to `value`, without using the `__newindex`\nmetavalue. `table` must be a table, `index` any value different from nil and NaN, and `value`\nany Lua value.\n\nThis function returns `table`.
+read file:read(···)\nReads the file `file`, according to the given formats, which specify what to read. For each\nformat, the function returns a string or a number with the characters read, or nil if it\ncannot read data with the specified format. (In this latter case, the function does not read\nsubsequent formats.) When called without arguments, it uses a default format that reads\nthe next line (see below).\n\nThe available formats are\n\n * "n": reads a numeral and returns it as a float or an integer, following the lexical\n conventions of Lua. (The numeral may have leading whitespaces and a sign.) This format\n always reads the longest input sequence that is a valid prefix for a number; if that\n prefix does not form a valid number (e.g., an empty string, "0x", or "3.4e-") or it is\n too long (more than 200 characters), it is discarded and the format returns nil.\n * "a": reads the whole file, starting at the current position. On end of file, it returns\n the empty string; this format never fails.\n * "l": reads the next line skipping the end of line, returning nil on end of file. This\n is the default format.\n * "L": reads the next line keeping the end-of-line character (if present), returning nil\n on end of file.\n * *number*: reads a string with up to this number of bytes, returning nil on end of file. If\n *number* is zero, it reads nothing and returns an empty string, or nil on end of file.\n\nThe formats "l" and "L" should be used only for text files.
read io.read(···)\nEquivalent to `io.input():read(···)`.
-remove os.remove(filename)\nDeletes the file (or empty directory, on POSIX systems) with the given name.\nIf this function fails, it returns nil, plus a string describing the error\nand the error code.
-remove table.remove(list [, pos])\nRemoves from `list` the element at position `pos`, returning the value of the\nremoved element. When `pos` is an integer between 1 and `#list`, it shifts\ndown the elements `list[pos+1], list[pos+2], ···, list[#list]` and erases\nelement `list[#list]`; The index `pos` can also be 0 when `#list` is 0, or\n`#list + 1`.\n\nThe default value for `pos` is `#list`, so that a call `table.remove(l)`\nremoves the last element of the list `l`.
-rename os.rename(oldname, newname)\nRenames file or directory named `oldname` to `newname`. If this function\nfails, it returns nil, plus a string describing the error and the error code.
-rep string.rep(s, n [, sep])\nReturns a string that is the concatenation of `n` copies of the string `s`\nseparated by the string `sep`. The default value for `sep` is the empty\nstring (that is, no separator). Returns the empty string if `n` is not\npositive.\n\n(Note that it is very easy to exhaust the memory of your machine with a\nsingle call to this function.)
-replace bit32.replace(n, v, field [, width])\nReturns a copy of `n` with the bits `field` to `field + width - 1` replaced\nby the value `v`. See `bit32.extract` for details about `field` and `width`.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-require _G.require(modname)\nLoads the given module. The function starts by looking into the\n`package.loaded` table to determine whether `modname` is already loaded. If\nit is, then `require` returns the value stored at `package.loaded[modname]`.\n(The absence of a second result in this case signals that this call did not\nhave to load the module.) Otherwise, it tries to find a *loader* for the\nmodule.\n\nTo find a loader, `require` is guided by the table `package.searchers`. Each\nitem in this table is a search function, that searches for the module in a\nparticular way. By changing this table, we can change how `require` looks for\na module. The following explanation is based on the default configuration for\n`package.searchers`.\n\nFirst `require` queries `package.preload[modname]`. If it has a value,\nthis value (which must be a function) is the loader. Otherwise `require`\nsearches for a Lua loader using the path stored in `package.path`. If\nthat also fails, it searches for a C loader using the path stored in\n`package.cpath`. If that also fails, it tries an *all-in-one* loader (see\n`package.searchers`).\n\nOnce a loader is found, `require` calls the loader with two arguments:\n`modname` and an extra value, a *loader data*, also returned by the searcher.\nThe loader data can be any value useful to the module; for the default\nsearchers, it indicates where the loader was found. (For instance, if the\nloader came from a file, this extra value is the file path.) If the loader\nreturns any non-nil value, `require` assigns the returned value to\n`package.loaded[modname]`. If the loader does not return a non-nil value and\nhas not assigned any value to `package.loaded[modname]`, then `require`\nassigns true to this entry. In any case, `require` returns the final value of\n`package.loaded[modname]`. Besides that value, `require` also returns as a\nsecond result the loader data returned by the searcher, which indicates how\n`require` found the module.\n\nIf there is any error loading or running the module, or if it cannot find\nany loader for the module, then `require` raises an error.
-resume coroutine.resume(co [, val1, ···])\nStarts or continues the execution of coroutine `co`. The first time\nyou resume a coroutine, it starts running its body. The values `val1`,\n··· are passed as the arguments to the body function. If the coroutine\nhas yielded, `resume` restarts it; the values `val1`, ··· are passed\nas the results from the yield.\n\nIf the coroutine runs without any errors, `resume` returns true plus any\nvalues passed to `yield` (when the coroutine yields) or any values returned\nby the body function (when the coroutine terminates). If there is any error,\n`resume` returns false plus the error message.
+remove os.remove(filename)\nDeletes the file (or empty directory, on POSIX systems) with the given name. If this function\nfails, it returns nil, plus a string describing the error and the error code.
+remove table.remove(list [, pos])\nRemoves from `list` the element at position `pos`, returning the value of the removed\nelement. When `pos` is an integer between 1 and `#list`, it shifts down the elements\n`list[pos+1], list[pos+2], ···, list[#list]` and erases element `list[#list]`; The index\n`pos` can also be 0 when `#list` is 0, or `#list + 1`.\n\nThe default value for `pos` is `#list`, so that a call `table.remove(l)` removes the last\nelement of the list `l`.
+rename os.rename(oldname, newname)\nRenames file or directory named `oldname` to `newname`. If this function fails, it returns\nnil, plus a string describing the error and the error code.
+rep string.rep(s, n [, sep])\nReturns a string that is the concatenation of `n` copies of the string `s` separated by the\nstring `sep`. The default value for `sep` is the empty string (that is, no separator). Returns\nthe empty string if `n` is not positive.\n\n(Note that it is very easy to exhaust the memory of your machine with a single call to\nthis function.)
+replace bit32.replace(n, v, field [, width])\nReturns a copy of `n` with the bits `field` to `field + width - 1` replaced by the value\n`v`. See `bit32.extract` for details about `field` and `width`.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+require _G.require(modname)\nLoads the given module. The function starts by looking into the `package.loaded` table to\ndetermine whether `modname` is already loaded. If it is, then `require` returns the value\nstored at `package.loaded[modname]`. (The absence of a second result in this case signals\nthat this call did not have to load the module.) Otherwise, it tries to find a *loader*\nfor the module.\n\nTo find a loader, `require` is guided by the table `package.searchers`. Each item in this\ntable is a search function, that searches for the module in a particular way. By changing\nthis table, we can change how `require` looks for a module. The following explanation is\nbased on the default configuration for `package.searchers`.\n\nFirst `require` queries `package.preload[modname]`. If it has a value, this value (which must be\na function) is the loader. Otherwise `require` searches for a Lua loader using the path stored\nin `package.path`. If that also fails, it searches for a C loader using the path stored in\n`package.cpath`. If that also fails, it tries an *all-in-one* loader (see `package.searchers`).\n\nOnce a loader is found, `require` calls the loader with two arguments: `modname` and an\nextra value, a *loader data*, also returned by the searcher. The loader data can be any\nvalue useful to the module; for the default searchers, it indicates where the loader\nwas found. (For instance, if the loader came from a file, this extra value is the file\npath.) If the loader returns any non-nil value, `require` assigns the returned value to\n`package.loaded[modname]`. If the loader does not return a non-nil value and has not assigned\nany value to `package.loaded[modname]`, then `require` assigns true to this entry. In any\ncase, `require` returns the final value of `package.loaded[modname]`. Besides that value,\n`require` also returns as a second result the loader data returned by the searcher, which\nindicates how `require` found the module.\n\nIf there is any error loading or running the module, or if it cannot find any loader for\nthe module, then `require` raises an error.
+resume coroutine.resume(co [, val1, ···])\nStarts or continues the execution of coroutine `co`. The first time you resume a coroutine,\nit starts running its body. The values `val1`, ··· are passed as the arguments to the body\nfunction. If the coroutine has yielded, `resume` restarts it; the values `val1`, ··· are\npassed as the results from the yield.\n\nIf the coroutine runs without any errors, `resume` returns true plus any values passed to\n`yield` (when the coroutine yields) or any values returned by the body function (when the\ncoroutine terminates). If there is any error, `resume` returns false plus the error message.
reverse string.reverse(s)\nReturns a string that is the string `s` reversed.
-rmdir lfs.rmdir(dirname)\nRemoves an existing directory. The argument is the name of the directory.\n\nReturns true in case of success or nil, an error message and a\nsystem-dependent error code in case of error.
-rrotate bit32.rrotate(x, disp)\nReturns the number `x` rotated `disp` bits to the right. The number `disp`\nmay be any representable integer.\n\nFor any valid displacement, the following identity holds:\n\n assert(bit32.rrotate(x, disp) == bit32.rrotate(x, disp % 32))\n\nIn particular, negative displacements rotate to the left.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-rshift bit32.rshift(x, disp)\nReturns the number `x` shifted `disp` bits to the right. The number `disp`\nmay be any representable integer. Negative displacements shift to the left.\nIn any direction, vacant bits are filled with zeros. In particular,\ndisplacements with absolute values higher than 31 result in zero (all bits\nare shifted out).\n\nFor positive displacements, the following equality holds:\n\n assert(bit32.rshift(b, disp) == math.floor(b % 2^32 / 2^disp))\n\nThis shift operation is what is called logical shift.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-running coroutine.running()\nReturns the running coroutine plus a boolean, true when the running coroutine\nis the main one.
-searchers package.searchers (table)\nA table used by `require` to control how to find modules.\nEach entry in this table is a *searcher function*. When looking for a\nmodule, `require` calls each of these searchers in ascending order, with\nthe module name (the argument given to `require`) as its sole argument.\nIf the searcher finds the module, it returns another function, the module\n*loader*, plus an extra value, a *loader data*, that will be passed to that\nloader and returned as a second result by `require`. If it cannot find the\nmodule, it returns a string explaining why (or nil if it has nothing to\nsay).\nLua initializes this table with four functions.\nThe first searcher simply looks for a loader in the `package.preload`\ntable.\nThe second searcher looks for a loader as a Lua library, using the path\nstored at `package.path`. The search is done as described in function\n`package.searchpath`.\nThe third searcher looks for a loader as a C library, using the path given\nby the variable `package.cpath`. Again, the search is done as described in\nfunction `package.searchpath`. For instance, if the C path is the string\n "./?.so;./?.dll;/usr/local/?/init.so"\nthe searcher for module `foo` will try to open the files `./foo.so`,\n`./foo.dll`, and `/usr/local/foo/init.so`, in that order. Once it finds\na C library, this searcher first uses a dynamic link facility to link the\napplication with the library. Then it tries to find a C function inside the\nlibrary to be used as the loader. The name of this C function is the string\n"`luaopen_`" concatenated with a copy of the module name where each dot\nis replaced by an underscore. Moreover, if the module name has a hyphen,\nits suffix after (and including) the first hyphen is removed. For instance,\nif the module name is `a.b.c-v2.1 `, the function name will be\n`luaopen_a_b_c`. The fourth searcher tries an *all-in-one loader*. It\nsearches the C path for a library for the root name of the given module.\nFor instance, when requiring `a.b.c`, it will search for a C library for\n`a`. If found, it looks into it for an open function for the submodule; in\nour example, that would be `luaopen_a_b_c`. With this facility, a package\ncan pack several C submodules into one single library, with each submodule\nkeeping its original open function.\nAll searchers except the first one (preload) return as the extra value the\nfile path where the module was found, as returned by `package.searchpath`.\nThe first searcher always returns the string "`:preload:`".\nSearchers should raise no errors and have no side effects in Lua. (They may\nhave side effects in C, for instance by linking the application with a\nlibrary.)\n\nNew in Lua 5.2.
-searchpath package.searchpath(name, path [, sep [, rep]])\nSearches for the given `name` in the given `path`.\n\nA path is a string containing a sequence of _templates_ separated by\nsemicolons. For each template, the function replaces each interrogation mark\n(if any) in the template with a copy of `name` wherein all occurrences of\n`sep` (a dot, by default) were replaced by `rep` (the system's directory\nseparator, by default), and then tries to open the resulting file name.\nFor instance, if the path is the string\n "./?.lua;./?.lc;/usr/local/?/init.lua"\nthe search for the name `foo.a` will try to open the files `./foo/a.lua`,\n`./foo/a.lc`, and `/usr/local/foo/a/init.lua`, in that order.\nReturns the resulting name of the first file that it can open in read mode\n(after closing the file), or nil plus an error message if none succeeds.\n(This error message lists all file names it tried to open.)\n\nNew in Lua 5.2.
-seeall package.seeall(module)\nSets a metatable for `module` with its `__index` field referring to the\nglobal environment, so that this module inherits values from the global\nenvironment. To be used as an option to function `module`.\n\nDeprecated in Lua 5.2.
-seek file:seek([whence [, offset]])\nSets and gets the file position, measured from the beginning of the\nfile, to the position given by `offset` plus a base specified by the string\n`whence`, as follows:\n "set": base is position 0 (beginning of the file);\n "cur": base is current position;\n "end": base is end of file;\n\nIn case of success, function `seek` returns the final file position,\nmeasured in bytes from the beginning of the file. If `seek` fails, it returns\nnil, plus a string describing the error.\n\nThe default value for `whence` is `"cur"`, and for `offset` is 0. Therefore,\nthe call `file:seek()` returns the current file position, without changing\nit; the call `file:seek("set")` sets the position to the beginning of the\nfile (and returns 0); and the call `file:seek("end")` sets the position\nto the end of the file, and returns its size.
-select _G.select(index, ···)\nIf `index` is a number, returns all arguments after argument number\n`index`; a negative number indexes from the end (-1 is the last argument).\nOtherwise, `index` must be the string `"#"`, and `select` returns the total\nnumber of extra arguments it received.
-setfenv _G.setfenv(f, table)\nSets the environment to be used by the given function. `f` can be a Lua\nfunction or a number that specifies the function at that stack level: Level 1\nis the function calling `setfenv`. `setfenv` returns the given function. As a\nspecial case, when `f` is 0 `setfenv` changes the environment of the running\nthread. In this case, `setfenv` returns no values.\n\nDeprecated in Lua 5.2.
-setfenv debug.setfenv(object, table)\nSets the environment of the given `object` to the given `table`. Returns\n`object`.\n\nDeprecated in Lua 5.2.
-sethook debug.sethook([thread, ] hook, mask [, count])\nSets the given function as the debug hook. The string `mask` and the number\n`count` describe when the hook will be called. The string mask may have any\ncombination of the following characters, with the given meaning:\n "c": the hook is called every time Lua calls a function;\n "r": the hook is called every time Lua returns from a function;\n "l": the hook is called every time Lua enters a new line of code.\n\nMoreover, with a `count` different from zero, the hook is called also after\nevery `count` instructions.\n\nWhen called without arguments, `debug.sethook` turns off the hook.\n\nWhen the hook is called, its first parameter is a string describing\nthe event that has triggered its call: `"call"`, `"tail call"`, `"return"`,\n`"line"`, and `"count"`. For line events, the hook also gets the new line\nnumber as its second parameter. Inside a hook, you can call `getinfo` with\nlevel 2 to get more information about the running function. (Level 0 is the\n`getinfo` function, and level 1 is the hook function.)
-setlocal debug.setlocal([thread, ] level, local, value)\nThis function assigns the value `value` to the local variable with\nindex `local` of the function at level `level` of the stack. The function\nreturns nil if there is no local variable with the given index, and raises\nan error when called with a `level` out of range. (You can call `getinfo`\nto check whether the level is valid.) Otherwise, it returns the name of\nthe local variable.\n\nSee `debug.getlocal` for more information about variable indices and names.
-setlocale os.setlocale(locale [, category])\nSets the current locale of the program. `locale` is a system-dependent string\nspecifying a locale; `category` is an optional string describing which\ncategory to change: `"all"`, `"collate"`, `"ctype"`, `"monetary"`,\n`"numeric"`, or `"time"`; the default category is `"all"`. The function\nreturns the name of the new locale, or nil if the request cannot be honored.\n\nIf `locale` is the empty string, the current locale is set to an\nimplementation-defined native locale. If `locale` is the string "`C`",\nthe current locale is set to the standard C locale.\n\nWhen called with nil as the first argument, this function only returns\nthe name of the current locale for the given category.\n\nThis function may not be thread safe because of its reliance on C function\n`setlocale`.
-setmaxstack lpeg.setmaxstack(max)\nSets the maximum size for the backtrack stack used by LPeg to track calls and\nchoices. Most well-written patterns need little backtrack levels and\ntherefore you seldom need to change this maximum; but a few useful patterns\nmay need more space. Before changing this maximum you should try to rewrite\nyour pattern to avoid the need for extra space.
-setmetatable _G.setmetatable(table, metatable)\nSets the metatable for the given table. If `metatable` is nil, removes the\nmetatable of the given table. If the original metatable has a `__metatable`\nfield, raises an error.\n\nThis function returns `table`.\n\nTo change the metatable of other types from Lua code, you must use the debug\nlibrary (see §6.10).
-setmetatable debug.setmetatable(value, table)\nSets the metatable for the given `value` to the given `table` (which\ncan be nil).
-setmode lfs.setmode(file, mode)\nSets the writing mode for a file. The mode string can be either "binary" or\n"text". Returns true followed by the previous mode string for the file, or\nnil followed by an error string in case of errors.. On non-Windows platforms,\nwhere the two modes are identical, setting the mode has no effect, and the\nmode is always returned as binary.
-setupvalue debug.setupvalue(f, up, value)\nThis function assigns the value `value` to the upvalue with index `up`\nof the function `f`. The function returns nil if there is no upvalue with the\ngiven index. Otherwise, it returns the name of the upvalue.\n\nSee `debug.getupvalue` for more information about upvalues.
-setuservalue debug.setuservalue(udata, value, n)\nSets the given `value` as the `n`-th user value associated to the given\n`udata`. `udata` must be a full userdata.\n\nReturns `udata`, or nil if the userdata does not have that value.\n\nNew in Lua 5.2.
-setvbuf file:setvbuf(mode [, size])\nSets the buffering mode for a file. There are three available modes:\n "no": no buffering\n "full": full buffering\n "line": line buffering\n\nFor the last two cases, `size` is a hint for the size of the buffer, in\nbytes. The default is an appropriate size.\n\nThe specific behavior of each mode is non portable; check the underlying\nISO C function `setvbuf` in your platform for more details.
+rmdir lfs.rmdir(dirname)\nRemoves an existing directory. The argument is the name of the directory.\n\nReturns true in case of success or nil, an error message and a system-dependent error code\nin case of error.
+rrotate bit32.rrotate(x, disp)\nReturns the number `x` rotated `disp` bits to the right. The number `disp` may be any\nrepresentable integer.\n\nFor any valid displacement, the following identity holds:\n\n assert(bit32.rrotate(x, disp) == bit32.rrotate(x, disp % 32))\n\nIn particular, negative displacements rotate to the left.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+rshift bit32.rshift(x, disp)\nReturns the number `x` shifted `disp` bits to the right. The number `disp` may be any\nrepresentable integer. Negative displacements shift to the left. In any direction, vacant\nbits are filled with zeros. In particular, displacements with absolute values higher than\n31 result in zero (all bits are shifted out).\n\nFor positive displacements, the following equality holds:\n\n assert(bit32.rshift(b, disp) == math.floor(b % 2^32 / 2^disp))\n\nThis shift operation is what is called logical shift.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+running coroutine.running()\nReturns the running coroutine plus a boolean, true when the running coroutine is the main one.
+searchers package.searchers (table)\nA table used by `require` to control how to find modules.\n\nEach entry in this table is a *searcher function*. When looking for a module, `require`\ncalls each of these searchers in ascending order, with the module name (the argument given\nto `require`) as its sole argument. If the searcher finds the module, it returns another\nfunction, the module *loader*, plus an extra value, a *loader data*, that will be passed\nto that loader and returned as a second result by `require`. If it cannot find the module,\nit returns a string explaining why (or nil if it has nothing to say).\n\nLua initializes this table with four functions.\n\nThe first searcher simply looks for a loader in the `package.preload` table.\n\nThe second searcher looks for a loader as a Lua library, using the path stored at\n`package.path`. The search is done as described in function `package.searchpath`.\n\nThe third searcher looks for a loader as a C library, using the path given by the variable\n`package.cpath`. Again, the search is done as described in function `package.searchpath`. For\ninstance, if the C path is the string\n\n "./?.so;./?.dll;/usr/local/?/init.so"\n\nthe searcher for module `foo` will try to open the files `./foo.so`, `./foo.dll`, and\n`/usr/local/foo/init.so`, in that order. Once it finds a C library, this searcher first\nuses a dynamic link facility to link the application with the library. Then it tries to\nfind a C function inside the library to be used as the loader. The name of this C function\nis the string "`luaopen_`" concatenated with a copy of the module name where each dot\nis replaced by an underscore. Moreover, if the module name has a hyphen, its suffix after\n(and including) the first hyphen is removed. For instance, if the module name is `a.b.c-v2.1\n`, the function name will be `luaopen_a_b_c`.\n\nThe fourth searcher tries an *all-in-one loader*. It searches the C path for a library for\nthe root name of the given module. For instance, when requiring `a.b.c`, it will search for\na C library for `a`. If found, it looks into it for an open function for the submodule; in\nour example, that would be `luaopen_a_b_c`. With this facility, a package can pack several\nC submodules into one single library, with each submodule keeping its original open function.\n\nAll searchers except the first one (preload) return as the extra value the file path\nwhere the module was found, as returned by `package.searchpath`. The first searcher always\nreturns the string "`:preload:`".\n\nSearchers should raise no errors and have no side effects in Lua. (They may have side\neffects in C, for instance by linking the application with a library.)\n\nNew in Lua 5.2.
+searchpath package.searchpath(name, path [, sep [, rep]])\nSearches for the given `name` in the given `path`.\n\nA path is a string containing a sequence of _templates_ separated by semicolons. For each\ntemplate, the function replaces each interrogation mark (if any) in the template with a copy\nof `name` wherein all occurrences of `sep` (a dot, by default) were replaced by `rep` (the\nsystem's directory separator, by default), and then tries to open the resulting file name.\nFor instance, if the path is the string\n\n "./?.lua;./?.lc;/usr/local/?/init.lua"\n\nthe search for the name `foo.a` will try to open the files `./foo/a.lua`, `./foo/a.lc`, and\n`/usr/local/foo/a/init.lua`, in that order.\n\nReturns the resulting name of the first file that it can open in read mode (after closing\nthe file), or nil plus an error message if none succeeds. (This error message lists all file\nnames it tried to open.)\n\nNew in Lua 5.2.
+seeall package.seeall(module)\nSets a metatable for `module` with its `__index` field referring to the global environment,\nso that this module inherits values from the global environment. To be used as an option to\nfunction `module`.\n\nDeprecated in Lua 5.2.
+seek file:seek([whence [, offset]])\nSets and gets the file position, measured from the beginning of the file, to the position\ngiven by `offset` plus a base specified by the string `whence`, as follows:\n\n * "set": base is position 0 (beginning of the file);\n * "cur": base is current position;\n * "end": base is end of file;\n\nIn case of success, function `seek` returns the final file position, measured in bytes from\nthe beginning of the file. If `seek` fails, it returns nil, plus a string describing the error.\n\nThe default value for `whence` is `"cur"`, and for `offset` is 0. Therefore, the\ncall `file:seek()` returns the current file position, without changing it; the call\n`file:seek("set")` sets the position to the beginning of the file (and returns 0); and the\ncall `file:seek("end")` sets the position to the end of the file, and returns its size.
+select _G.select(index, ···)\nIf `index` is a number, returns all arguments after argument number `index`; a negative number\nindexes from the end (-1 is the last argument). Otherwise, `index` must be the string `"#"`,\nand `select` returns the total number of extra arguments it received.
+setfenv _G.setfenv(f, table)\nSets the environment to be used by the given function. `f` can be a Lua function or a\nnumber that specifies the function at that stack level: Level 1 is the function calling\n`setfenv`. `setfenv` returns the given function. As a special case, when `f` is 0 `setfenv`\nchanges the environment of the running thread. In this case, `setfenv` returns no values.\n\nDeprecated in Lua 5.2.
+setfenv debug.setfenv(object, table)\nSets the environment of the given `object` to the given `table`. Returns `object`.\n\nDeprecated in Lua 5.2.
+sethook debug.sethook([thread, ] hook, mask [, count])\nSets the given function as the debug hook. The string `mask` and the number `count` describe\nwhen the hook will be called. The string mask may have any combination of the following\ncharacters, with the given meaning:\n\n * "c": the hook is called every time Lua calls a function;\n * "r": the hook is called every time Lua returns from a function;\n * "l": the hook is called every time Lua enters a new line of code.\n\nMoreover, with a `count` different from zero, the hook is called also after every `count`\ninstructions.\n\nWhen called without arguments, `debug.sethook` turns off the hook.\n\nWhen the hook is called, its first parameter is a string describing the event that has\ntriggered its call: `"call"`, `"tail call"`, `"return"`, `"line"`, and `"count"`. For line\nevents, the hook also gets the new line number as its second parameter. Inside a hook, you\ncan call `getinfo` with level 2 to get more information about the running function. (Level\n0 is the `getinfo` function, and level 1 is the hook function.)
+setlocal debug.setlocal([thread, ] level, local, value)\nThis function assigns the value `value` to the local variable with index `local` of the\nfunction at level `level` of the stack. The function returns nil if there is no local variable\nwith the given index, and raises an error when called with a `level` out of range. (You can\ncall `getinfo` to check whether the level is valid.) Otherwise, it returns the name of the\nlocal variable.\n\nSee `debug.getlocal` for more information about variable indices and names.
+setlocale os.setlocale(locale [, category])\nSets the current locale of the program. `locale` is a system-dependent string specifying\na locale; `category` is an optional string describing which category to change: `"all"`,\n`"collate"`, `"ctype"`, `"monetary"`, `"numeric"`, or `"time"`; the default category is\n`"all"`. The function returns the name of the new locale, or nil if the request cannot\nbe honored.\n\nIf `locale` is the empty string, the current locale is set to an implementation-defined native\nlocale. If `locale` is the string "`C`", the current locale is set to the standard C locale.\n\nWhen called with nil as the first argument, this function only returns the name of the\ncurrent locale for the given category.\n\nThis function may not be thread safe because of its reliance on C function `setlocale`.
+setmaxstack lpeg.setmaxstack(max)\nSets the maximum size for the backtrack stack used by LPeg to track calls and choices. Most\nwell-written patterns need little backtrack levels and therefore you seldom need to change\nthis maximum; but a few useful patterns may need more space. Before changing this maximum\nyou should try to rewrite your pattern to avoid the need for extra space.
+setmetatable _G.setmetatable(table, metatable)\nSets the metatable for the given table. If `metatable` is nil, removes the metatable of the\ngiven table. If the original metatable has a `__metatable` field, raises an error.\n\nThis function returns `table`.\n\nTo change the metatable of other types from Lua code, you must use the debug library\n(see §6.10).
+setmetatable debug.setmetatable(value, table)\nSets the metatable for the given `value` to the given `table` (which can be nil).
+setmode lfs.setmode(file, mode)\nSets the writing mode for a file. The mode string can be either "binary" or "text". Returns\ntrue followed by the previous mode string for the file, or nil followed by an error string\nin case of errors. On non-Windows platforms, where the two modes are identical, setting\nthe mode has no effect, and the mode is always returned as binary.
+setupvalue debug.setupvalue(f, up, value)\nThis function assigns the value `value` to the upvalue with index `up` of the function\n`f`. The function returns nil if there is no upvalue with the given index. Otherwise, it\nreturns the name of the upvalue.\n\nSee `debug.getupvalue` for more information about upvalues.
+setuservalue debug.setuservalue(udata, value, n)\nSets the given `value` as the `n`-th user value associated to the given `udata`. `udata`\nmust be a full userdata.\n\nReturns `udata`, or nil if the userdata does not have that value.\n\nNew in Lua 5.2.
+setvbuf file:setvbuf(mode [, size])\nSets the buffering mode for a file. There are three available modes:\n\n * "no": no buffering\n * "full": full buffering\n * "line": line buffering\n\nFor the last two cases, `size` is a hint for the size of the buffer, in bytes. The default\nis an appropriate size.\n\nThe specific behavior of each mode is non portable; check the underlying ISO C function\n`setvbuf` in your platform for more details.
sin math.sin(x)\nReturns the sine of `x` (assumed to be in radians).
sinh math.sinh(x)\nReturns the hyperbolic sine of `x`.\n\nDeprecated in Lua 5.3.
-sort table.sort(list [, comp])\nSorts the list elements in a given order, *in-place*, from `list[1]` to\n`list[#list]`. If `comp` is given, then it must be a function that receives\ntwo list elements and returns true when the first element must come before\nthe second in the final order (so that, after the sort, `i < j` implies\n`not comp(list[j],list[i])` will be true after the sort). If `comp` is not\ngiven, then the standard Lua operator `<` is used instead.\n\nNote that the `comp` function must not define a string partial order over the\nelements in the list; that is, it must be asymmetric and transitive.\nOtherwise, no valid sort may be possible.\n\nThe sort algorithm is not stable; that is, elements not comparable by the\ngiven order (e.g., equal elements) may have their relative positions changed\nby the sort.
-sqrt math.sqrt(x)\nReturns the square root of `x`. (You can also use the expression `x^0.5`\nto compute this value.)
-status coroutine.status(co)\nReturns the status of the coroutine `co`, as a string: `"running"`, if\nthe coroutine is running (that is, it is the one that called `status`);\n`"suspended"`, if the coroutine is suspended in a call to `yield`, or if it\nhas not started running yet; `"normal"` if the coroutine is active but not\nrunning (that is, it has resumed another coroutine); and `"dead"` if the\ncoroutine has finished its body function, or if it has stopped with an error.
+sort table.sort(list [, comp])\nSorts the list elements in a given order, *in-place*, from `list[1]` to `list[#list]`. If\n`comp` is given, then it must be a function that receives two list elements and returns true\nwhen the first element must come before the second in the final order (so that, after the\nsort, `i < j` implies `not comp(list[j],list[i])` will be true after the sort). If `comp`\nis not given, then the standard Lua operator `<` is used instead.\n\nNote that the `comp` function must not define a string partial order over the elements in the\nlist; that is, it must be asymmetric and transitive. Otherwise, no valid sort may be possible.\n\nThe sort algorithm is not stable; that is, elements not comparable by the given order (e.g.,\nequal elements) may have their relative positions changed by the sort.
+sqrt math.sqrt(x)\nReturns the square root of `x`. (You can also use the expression `x^0.5` to compute this value.)
+status coroutine.status(co)\nReturns the status of the coroutine `co`, as a string: `"running"`, if the coroutine is\nrunning (that is, it is the one that called `status`); `"suspended"`, if the coroutine\nis suspended in a call to `yield`, or if it has not started running yet; `"normal"` if the\ncoroutine is active but not running (that is, it has resumed another coroutine); and `"dead"`\nif the coroutine has finished its body function, or if it has stopped with an error.
stderr io.stderr (file)\nStandard error.
stdin io.stdin (file)\nStandard in.
stdout io.stdout (file)\nStandard out.
string _G.string (module)\nLua string module.
-sub string.sub(s, i [, j])\nReturns the substring of `s` that starts at `i` and continues until\n`j`; `i` and `j` can be negative. If `j` is absent, then it is assumed to\nbe equal to -1 (which is the same as the string length). In particular,\nthe call `string.sub(s,1,j)` returns a prefix of `s` with length `j`, and\n`string.sub(s, -i)` returns a suffix of `s` with length `i`.\n\nIf, after the translation of negative indices, `i` is less than 1, it is\ncorrected to 1. If `j` is greater than the string length, it is corrected to\nthat length. If, after these corrections, `i` is greater than `j`, the\nfunction returns the empty string.
-symlinkattributes lfs.symlinkattributes(filepath [, aname])\nIdentical to lfs.attributes except that it obtains information about the link\nitself (not the file it refers to). It also adds a target field, containing\nthe file name that the symlink points to. On Windows this function does not\nyet support links, and is identical to lfs.attributes.
+sub string.sub(s, i [, j])\nReturns the substring of `s` that starts at `i` and continues until `j`; `i` and `j` can\nbe negative. If `j` is absent, then it is assumed to be equal to -1 (which is the same as\nthe string length). In particular, the call `string.sub(s,1,j)` returns a prefix of `s`\nwith length `j`, and `string.sub(s, -i)` returns a suffix of `s` with length `i`.\n\nIf, after the translation of negative indices, `i` is less than 1, it is corrected to 1. If `j`\nis greater than the string length, it is corrected to that length. If, after these corrections,\n`i` is greater than `j`, the function returns the empty string.
+symlinkattributes lfs.symlinkattributes(filepath [, aname])\nIdentical to lfs.attributes except that it obtains information about the link itself (not\nthe file it refers to). It also adds a target field, containing the file name that the\nsymlink points to. On Windows this function does not yet support links, and is identical\nto lfs.attributes.
table _G.table (module)\nLua table module.
tan math.tan(x)\nReturns the tangent of `x` (assumed to be in radians).
tanh math.tanh(x)\nReturns the hyperbolic tangent of `x`.\n\nDeprecated in Lua 5.3.
-time os.time([table])\nReturns the current time when called without arguments, or a time\nrepresenting the date and time specified by the given table. This table\nmust have fields `year`, `month`, and `day`, and may have fields `hour`\n(default is 12), `min` (default is 0), `sec` (default is 0), and `isdst`\n(default is nil). For a description of these fields, see the `os.date`\nfunction.\n\nWhen the function is called, the values in these fields do not need to be\ninside their valid ranges. For instance, if `sec` is -10, it means 10 seconds\nbefore the time specified by the other fields; if `hour` is 1000, it means\n1000 hours after the time specified by the other fields.\n\nThe returned value is a number, whose meaning depends on your system. In\nPOSIX, Windows, and some other systems, this number counts the number of\nseconds since some given start time (the "epoch"). In other systems, the\nmeaning is not specified, and the number returned by `time` can be used only\nas an argument to `os.date` and `os.difftime`.\n\nWhen called with a table, `os.time` also normalizes all the fields documented\nin the `os.date` function, so that they represent the same time as before the\ncall but with values inside their valid ranges.
-tmpfile io.tmpfile()\nIn case of success, returns a handle for a temporary file. This file is\nopened in update mode and it is automatically removed when the program ends.
-tmpname os.tmpname()\nReturns a string with a file name that can be used for a temporary\nfile. The file must be explicitly opened before its use and explicitly\nremoved when no longer needed.\n\nOn POSIX systems, this function also creates a file with that name, to avoid\nsecurity risks. (Someone else might create the file with wrong permissions in\nthe time between getting the name and creating the file.) You still have to\nopen the file to use it and to remove it (even if you do not use it).\n\nWhen possible, you may prefer to use `io.tmpfile`, which automatically\nremoves the file when the program ends.
-tointeger math.tointeger(x)\nIf the value `x` is convertible to an integer, returns that integer.\nOtherwise, returns nil.\n\nNew in Lua 5.3.
-tonumber _G.tonumber(e [, base])\nWhen called with no `base`, `tonumber` tries to convert its argument to a\nnumber. If the argument is already a number or a string convertible to a\nnumber, then `tonumber` returns this number; otherwise, it\nreturns nil.\n\nThe conversion of strings can result in integers or floats, according to the\nlexical conventions of Lua (see §3.1). The string may have leading and\ntrailing spaces and a sign.\n\nWhen called with `base`, then `e` must be a string to be interpreted as an\ninteger numeral in that base. The base may be any integer between 2 and 36,\ninclusive. In bases above 10, the letter '`A`' (in either upper or lower\ncase) represents 10, '`B`' represents 11, and so forth, with '`Z`'\nrepresenting 35. If the string `e` is not a valid numeral in the given base,\nthe function returns nil
-tostring _G.tostring(v)\nReceives a value of any type and converts it to a string in a human-readable\nformat. Floats always produce strings with some floating-point indication\n(either a decimal dot or an exponent).\n\nIf the metatable of `v` has a `__tostring` field, then `tostring` calls the\ncorresponding value with `v` as argument, and uses the result of the call as\nits result. Otherwise, if the metatable of `v` has a `__name` field with a\nstring value, `tostring` may use that string in its final result.\n\nFor complete control of how numbers are converted, use `string.format`.
-touch lfs.touch(filepath [, atime [, mtime]])\nSet access and modification times of a file. This function is a bind to utime\nfunction. The first argument is the filename, the second argument (atime) is\nthe access time, and the third argument (mtime) is the modification time.\nBoth times are provided in seconds (which should be generated with Lua\nstandard function os.time). If the modification time is omitted, the access\ntime provided is used; if both times are omitted, the current time is used.\n\nReturns true in case of success or nil, an error message and a\nsystem-dependent error code in case of error.
-traceback debug.traceback([thread, ] [message] [, level])\nIf `message` is present but is neither a string nor nil, this function\nreturns `message` without further processing. Otherwise, it returns a string\nwith a traceback of the call stack. The optional `message` string is appended\nat the beginning of the traceback. An optional `level` number tells at which\nlevel to start the traceback (default is 1, the function calling\n`traceback`).
-type _G.type(v)\nReturns the type of its only argument, coded as a string. The possible\nresults of this function are "\n`nil`" (a string, not the value nil), "`number`", "`string`", "`boolean`",\n"`table`", "`function`", "`thread`", and "`userdata`".
-type io.type(obj)\nChecks whether `obj` is a valid file handle. Returns the string `"file"`\nif `obj` is an open file handle, `"closed file"` if `obj` is a closed file\nhandle, or nil if `obj` is not a file handle.
-type lpeg.type(value)\nIf the given value is a pattern, returns the string "pattern". Otherwise\nreturns nil.
-type math.type(x)\nReturns "integer" if `x` is an integer, "float" if it is a float, or nil if\nx is not a number.\n\nNew in Lua 5.3.
-ult math.ult(m, n)\nReturns a boolean, true if integer `m` is below integer `n` when they are\ncompared as unsigned integers.\n\nNew in Lua 5.3.
-unlock lfs.unlock(filehandle[, start[, length]])\nUnlocks a file or a part of it. This function works on open files; the file\nhandle should be specified as the first argument. The optional arguments\nstart and length can be used to specify a starting point and its length; both\nshould be numbers.\n\nReturns true if the operation was successful; in case of error, it returns\nnil plus an error string.
-unpack _G.unpack(list [, i [, j]])\nReturns the elements from the given table. This function is equivalent to\nreturn list[i], list[i+1], ···, list[j] except that the above code can\nbe written only for a fixed number of elements. By default, `i` is 1 and\n`j` is the length of the list, as defined by the length operator\n(see §2.5.5).\n\nDeprecated in Lua 5.2.
-unpack string.unpack(fmt, s [, pos])\nReturns the values packed in string `s` (see `string.pack`) according to the\nformat string `fmt` (see §6.4.2). An optional `pos` marks where to start\nreading in `s` (default is 1). After the read values, this function also\nreturns the index of the first unread byte in `s`.\n\nNew in Lua 5.3.
+time os.time([table])\nReturns the current time when called without arguments, or a time representing the date and\ntime specified by the given table. This table must have fields `year`, `month`, and `day`,\nand may have fields `hour` (default is 12), `min` (default is 0), `sec` (default is 0), and\n`isdst` (default is nil). For a description of these fields, see the `os.date` function.\n\nWhen the function is called, the values in these fields do not need to be inside their\nvalid ranges. For instance, if `sec` is -10, it means 10 seconds before the time specified\nby the other fields; if `hour` is 1000, it means 1000 hours after the time specified by the\nother fields.\n\nThe returned value is a number, whose meaning depends on your system. In POSIX, Windows,\nand some other systems, this number counts the number of seconds since some given start time\n(the "epoch"). In other systems, the meaning is not specified, and the number returned by\n`time` can be used only as an argument to `os.date` and `os.difftime`.\n\nWhen called with a table, `os.time` also normalizes all the fields documented in the `os.date`\nfunction, so that they represent the same time as before the call but with values inside\ntheir valid ranges.
+tmpfile io.tmpfile()\nIn case of success, returns a handle for a temporary file. This file is opened in update\nmode and it is automatically removed when the program ends.
+tmpname os.tmpname()\nReturns a string with a file name that can be used for a temporary file. The file must be\nexplicitly opened before its use and explicitly removed when no longer needed.\n\nOn POSIX systems, this function also creates a file with that name, to avoid security\nrisks. (Someone else might create the file with wrong permissions in the time between getting\nthe name and creating the file.) You still have to open the file to use it and to remove it\n(even if you do not use it).\n\nWhen possible, you may prefer to use `io.tmpfile`, which automatically removes the file when\nthe program ends.
+tointeger math.tointeger(x)\nIf the value `x` is convertible to an integer, returns that integer. Otherwise, returns nil.\n\nNew in Lua 5.3.
+tonumber _G.tonumber(e [, base])\nWhen called with no `base`, `tonumber` tries to convert its argument to a number. If the\nargument is already a number or a string convertible to a number, then `tonumber` returns\nthis number; otherwise, it returns nil.\n\nThe conversion of strings can result in integers or floats, according to the lexical\nconventions of Lua (see §3.1). The string may have leading and trailing spaces and a sign.\n\nWhen called with `base`, then `e` must be a string to be interpreted as an integer numeral\nin that base. The base may be any integer between 2 and 36, inclusive. In bases above 10,\nthe letter '`A`' (in either upper or lower case) represents 10, '`B`' represents 11, and so\nforth, with '`Z`' representing 35. If the string `e` is not a valid numeral in the given base,\nthe function returns nil
+tostring _G.tostring(v)\nReceives a value of any type and converts it to a string in a human-readable format. Floats\nalways produce strings with some floating-point indication (either a decimal dot or an\nexponent).\n\nIf the metatable of `v` has a `__tostring` field, then `tostring` calls the corresponding\nvalue with `v` as argument, and uses the result of the call as its result. Otherwise, if the\nmetatable of `v` has a `__name` field with a string value, `tostring` may use that string\nin its final result.\n\nFor complete control of how numbers are converted, use `string.format`.
+touch lfs.touch(filepath [, atime [, mtime]])\nSet access and modification times of a file. This function is a bind to utime function. The\nfirst argument is the filename, the second argument (atime) is the access time, and the\nthird argument (mtime) is the modification time. Both times are provided in seconds (which\nshould be generated with Lua standard function os.time). If the modification time is omitted,\nthe access time provided is used; if both times are omitted, the current time is used.\n\nReturns true in case of success or nil, an error message and a system-dependent error code\nin case of error.
+traceback debug.traceback([thread, ] [message] [, level])\nIf `message` is present but is neither a string nor nil, this function returns `message`\nwithout further processing. Otherwise, it returns a string with a traceback of the call\nstack. The optional `message` string is appended at the beginning of the traceback. An optional\n`level` number tells at which level to start the traceback (default is 1, the function calling\n`traceback`).
+type _G.type(v)\nReturns the type of its only argument, coded as a string. The possible results of this\nfunction are " `nil`" (a string, not the value nil), "`number`", "`string`", "`boolean`",\n"`table`", "`function`", "`thread`", and "`userdata`".
+type io.type(obj)\nChecks whether `obj` is a valid file handle. Returns the string `"file"` if `obj` is an\nopen file handle, `"closed file"` if `obj` is a closed file handle, or nil if `obj` is not\na file handle.
+type lpeg.type(value)\nIf the given value is a pattern, returns the string "pattern". Otherwise returns nil.
+type math.type(x)\nReturns "integer" if `x` is an integer, "float" if it is a float, or nil if x is not a number.\n\nNew in Lua 5.3.
+ult math.ult(m, n)\nReturns a boolean, true if integer `m` is below integer `n` when they are compared as\nunsigned integers.\n\nNew in Lua 5.3.
+unlock lfs.unlock(filehandle[, start[, length]])\nUnlocks a file or a part of it. This function works on open files; the file handle should\nbe specified as the first argument. The optional arguments start and length can be used to\nspecify a starting point and its length; both should be numbers.\n\nReturns true if the operation was successful; in case of error, it returns nil plus an\nerror string.
+unpack _G.unpack(list [, i [, j]])\nReturns the elements from the given table. This function is equivalent to return list[i],\nlist[i+1], ···, list[j] except that the above code can be written only for a fixed number\nof elements. By default, `i` is 1 and `j` is the length of the list, as defined by the length\noperator (see §2.5.5).\n\nDeprecated in Lua 5.2.
+unpack string.unpack(fmt, s [, pos])\nReturns the values packed in string `s` (see `string.pack`) according to the format string\n`fmt` (see §6.4.2). An optional `pos` marks where to start reading in `s` (default is\n1). After the read values, this function also returns the index of the first unread byte in `s`.\n\nNew in Lua 5.3.
unpack table.unpack(list [, i [, j]])\nReturns the elements from the given list. This function is equivalent to\n\n return list[i], list[i+1], ···, list[j]\n\nBy default, `i` is 1 and `j` is `#list`.\n\nNew in Lua 5.2.
-upper string.upper(s)\nReceives a string and returns a copy of this string with all lowercase\nletters changed to uppercase. All other characters are left unchanged. The\ndefinition of what a lowercase letter is depends on the current locale.
-upvalueid debug.upvalueid(f, n)\nReturns a unique identifier (as a light userdata) for the upvalue numbered\n`n` from the given function.\n\nThese unique identifiers allow a program to check whether different closures\nshare upvalues. Lua closures that share an upvalue (that is, that access a\nsame external local variable) will return identical ids for those upvalue\nindices.\n\nNew in Lua 5.2.
-upvaluejoin debug.upvaluejoin(f1, n1, f2, n2)\nMake the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue\nof the Lua closure `f2`.\n\nNew in Lua 5.2.
+upper string.upper(s)\nReceives a string and returns a copy of this string with all lowercase letters changed to\nuppercase. All other characters are left unchanged. The definition of what a lowercase letter\nis depends on the current locale.
+upvalueid debug.upvalueid(f, n)\nReturns a unique identifier (as a light userdata) for the upvalue numbered `n` from the\ngiven function.\n\nThese unique identifiers allow a program to check whether different closures share upvalues. Lua\nclosures that share an upvalue (that is, that access a same external local variable) will\nreturn identical ids for those upvalue indices.\n\nNew in Lua 5.2.
+upvaluejoin debug.upvaluejoin(f1, n1, f2, n2)\nMake the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue of the Lua\nclosure `f2`.\n\nNew in Lua 5.2.
utf8 _G.utf8 (module)\nLua utf8 module.
version lpeg.version()\nReturns a string with the running version of LPeg.
-warn _G.warn(msg1, ···)\nEmits a warning with a message composed by the concatenation of all its\narguments (which should be strings).\n\nBy convention, a one-piece message starting with '`@`' is intended to be a\n*control message*, which is a message to the warning system itself. In\nparticular, the standard warning function in Lua recognizes the control\nmessages "`@off`", to stop the emission of warnings, and "`@on`", to\n(re)start the emission; it ignores unknown control messages.\n\nNew in Lua 5.4.
-wrap coroutine.wrap(f)\nCreates a new coroutine, with body `f`; `f` must be a Lua\nfunction. Returns a function that resumes the coroutine each time it is\ncalled. Any arguments passed to this function behave as the extra arguments\nto `resume`. The function returns the same values returned by `resume`,\nexcept the first boolean. In case of error, the function closes the coroutine\nand propagates the error.
-write file:write(···)\nWrites the value of each of its arguments to `file`. The arguments must be\nstrings or numbers.\n\nIn case of success, this function returns `file`. Otherwise it returns nil\nplus a string describing the error.
+warn _G.warn(msg1, ···)\nEmits a warning with a message composed by the concatenation of all its arguments (which\nshould be strings).\n\nBy convention, a one-piece message starting with '`@`' is intended to be a *control message*,\nwhich is a message to the warning system itself. In particular, the standard warning function in\nLua recognizes the control messages "`@off`", to stop the emission of warnings, and "`@on`",\nto (re)start the emission; it ignores unknown control messages.\n\nNew in Lua 5.4.
+wrap coroutine.wrap(f)\nCreates a new coroutine, with body `f`; `f` must be a Lua function. Returns a function that\nresumes the coroutine each time it is called. Any arguments passed to this function behave as\nthe extra arguments to `resume`. The function returns the same values returned by `resume`,\nexcept the first boolean. In case of error, the function closes the coroutine and propagates\nthe error.
+write file:write(···)\nWrites the value of each of its arguments to `file`. The arguments must be strings or numbers.\n\nIn case of success, this function returns `file`. Otherwise it returns nil plus a string\ndescribing the error.
write io.write(···)\nEquivalent to `io.output():write(···)`.
-xor bit32.xor(...)\nReturns the bitwise "exclusive or" of its operands.\n\nNew in Lua 5.2.\nDeprecated in Lua 5.3.
-xpcall _G.xpcall(f, msgh [, arg1, ···])\nThis function is similar to `pcall`, except that it sets a new message\nhandler `msgh`.
-yield coroutine.yield(···)\nSuspends the execution of the calling coroutine. Any arguments to `yield` are\npassed as extra results to `resume`. \ No newline at end of file
+xor bit32.xor(...)\nReturns the bitwise "exclusive or" of its operands.\n\nNew in Lua 5.2. Deprecated in Lua 5.3.
+xpcall _G.xpcall(f, msgh [, arg1, ···])\nThis function is similar to `pcall`, except that it sets a new message handler `msgh`.
+yield coroutine.yield(···)\nSuspends the execution of the calling coroutine. Any arguments to `yield` are passed as\nextra results to `resume`. \ No newline at end of file
diff --git a/modules/lua/init.lua b/modules/lua/init.lua
index d327266d..00508de3 100644
--- a/modules/lua/init.lua
+++ b/modules/lua/init.lua
@@ -13,27 +13,25 @@ module('_M.lua')]]
-- Autocompletion and documentation.
--- Returns a function that, when called from a Textadept Lua file, the Lua
--- command entry, or a special Lua buffer (e.g. a REPL), returns the given
--- Textadept tags or API file for use in autocompletion and documentation.
+-- Returns a function that, when called from a Textadept Lua file, the Lua command entry, or
+-- a special Lua buffer (e.g. a REPL), returns the given Textadept tags or API file for use in
+-- autocompletion and documentation.
-- @param filename Textadept tags or api file to return.
local function ta_api(filename)
local home = '^' .. _HOME:gsub('%p', '%%%0'):gsub('%%[/\\]', '[/\\]')
local userhome = '^' .. _USERHOME:gsub('%p', '%%%0'):gsub('%%[/\\]', '[/\\]')
return function()
- local buffer_filename = buffer.filename or ''
- return (buffer_filename:find(home) or buffer_filename:find(userhome) or
- buffer == ui.command_entry or buffer._type) and filename
+ local ta_file = (buffer.filename or ''):find(home) or (buffer.filename or ''):find(userhome)
+ return (ta_file or buffer == ui.command_entry or buffer._type) and filename
end
end
---
--- List of "fake" ctags files (or functions that return such files) to use for
--- autocompletion.
--- The kind 'm' is recognized as a module, 'f' as a function, 't' as a table and
--- 'F' as a module or table field.
--- The *modules/lua/tadoc.lua* script can generate *tags* and
--- [*api*](#textadept.editing.api_files) files for Lua modules via LuaDoc.
+-- List of "fake" ctags files (or functions that return such files) to use for autocompletion.
+-- The kind 'm' is recognized as a module, 'f' as a function, 't' as a table and 'F' as a module
+-- or table field.
+-- The *modules/lua/tadoc.lua* script can generate *tags* and [*api*](#textadept.editing.api_files)
+-- files for Lua modules via LuaDoc.
-- @class table
-- @name tags
M.tags = {
@@ -43,8 +41,8 @@ M.tags = {
---
-- Map of expression patterns to their types.
--- Used for type-hinting when showing autocompletions for variables.
--- Expressions are expected to match after the '=' sign of a statement.
+-- Used for type-hinting when showing autocompletions for variables. Expressions are expected
+-- to match after the '=' sign of a statement.
-- @class table
-- @name expr_types
-- @usage _M.lua.expr_types['^spawn%b()%s*$'] = 'proc'
@@ -59,8 +57,7 @@ textadept.editing.autocompleters.lua = function()
local list = {}
-- Retrieve the symbol behind the caret.
local line, pos = buffer:get_cur_line()
- local symbol, op, part = line:sub(1, pos - 1):match(
- '([%w_%.]-)([%.:]?)([%w_]*)$')
+ local symbol, op, part = line:sub(1, pos - 1):match('([%w_%.]-)([%.:]?)([%w_]*)$')
if symbol == '' and part == '' then return nil end -- nothing to complete
if symbol == '' and M.autocomplete_snippets then
local _, snippets = textadept.editing.autocompleters.snippet()
@@ -73,7 +70,10 @@ textadept.editing.autocompleters.lua = function()
local expr = buffer:get_line(i):match(assignment)
if not expr then goto continue end
for patt, type in pairs(M.expr_types) do
- if expr:find(patt) then symbol = type break end
+ if expr:find(patt) then
+ symbol = type
+ break
+ end
end
::continue::
end
diff --git a/modules/lua/lua.luadoc b/modules/lua/lua.luadoc
index 8dc89938..52d81aeb 100644
--- a/modules/lua/lua.luadoc
+++ b/modules/lua/lua.luadoc
@@ -3,438 +3,391 @@
-- @class table
-- @name _G
-- @field _G (table)
--- A global variable (not a function) that holds the global environment
--- (see §2.2). Lua itself does not use this variable; changing its value does
--- not affect any environment, nor vice versa.
+-- A global variable (not a function) that holds the global environment (see §2.2). Lua
+-- itself does not use this variable; changing its value does not affect any environment,
+-- nor vice versa.
-- @field _VERSION (string)
--- A global variable (not a function) that holds a string containing the
--- running Lua version. The current value of this variable is "`Lua 5.4`".
+-- A global variable (not a function) that holds a string containing the running Lua version. The
+-- current value of this variable is "`Lua 5.4`".
local _G
---
--- Raises an error if the value of its argument `v` is false (i.e., nil or
--- false); otherwise, returns all its arguments. In case of error, `message` is
--- the error object; when absent, it defaults to "assertion failed!".
+-- Raises an error if the value of its argument `v` is false (i.e., nil or false); otherwise,
+-- returns all its arguments. In case of error, `message` is the error object; when absent,
+-- it defaults to "assertion failed!".
function assert(v [, message]) end
---
--- This function is a generic interface to the garbage collector. It
--- performs different functions according to its first argument, `opt`:
--- "collect": performs a full garbage-collection cycle. This is the default
--- option.
+-- This function is a generic interface to the garbage collector. It performs different functions
+-- according to its first argument, `opt`:
+-- "collect": performs a full garbage-collection cycle. This is the default option.
-- "stop": stops automatic execution of the garbage collector.
-- "restart": restarts automatic execution of the garbage collector.
--- "count": returns the total memory in use by Lua in Kbytes. The value has a
--- fractional part, so that it multiplied by 1024 gives the exact
--- number of bytes in use by Lua.
--- "step": performs a garbage-collection step. The step "size" is controlled
--- by `arg`. With a zero value, the collector will perform one basic
--- (indivisible) step. For non-zero values, the collector will perform
--- as if that amount of memory (in Kbytes) had been allocated by Lua.
--- Returns true if the step finished a collection cycle.
--- "isrunning": returns a boolean that tells whether the collector is running
--- (i.e., not stopped).
--- "incremental": change the collector mode to incremental. This option can be
--- followed by three numbers: the garbage-collector pause, the
--- step multiplier, and the step size (see §2.5.1). A zero means to not
--- change that value.
--- "generational": change the collector mode to generational. This option can
--- be followed by two numbers: the garbage-collector minor
--- multiplier and the major multiplier (see §2.5.2). A zero
--- means to not change that value.
+-- "count": returns the total memory in use by Lua in Kbytes. The value has a fractional part,
+-- so that it multiplied by 1024 gives the exact number of bytes in use by Lua.
+-- "step": performs a garbage-collection step. The step "size" is controlled by `arg`. With a
+-- zero value, the collector will perform one basic (indivisible) step. For non-zero values,
+-- the collector will perform as if that amount of memory (in Kbytes) had been allocated
+-- by Lua. Returns true if the step finished a collection cycle.
+-- "isrunning": returns a boolean that tells whether the collector is running (i.e., not
+-- stopped).
+-- "incremental": change the collector mode to incremental. This option can be followed
+-- by three numbers: the garbage-collector pause, the step multiplier, and the step size
+-- (see §2.5.1). A zero means to not change that value.
+-- "generational": change the collector mode to generational. This option can be followed
+-- by two numbers: the garbage-collector minor multiplier and the major multiplier (see
+-- §2.5.2). A zero means to not change that value.
--
-- See §2.5 for more details about garbage collection and some of these options.
function collectgarbage([opt [, arg]]) end
---
--- Opens the named file and executes its content as a Lua chunk. When
--- called without arguments,
--- `dofile` executes the content of the standard input (`stdin`). Returns
--- all values returned by the chunk. In case of errors, `dofile` propagates
--- the error to its caller. (That is, `dofile` does not run in protected mode.)
+-- Opens the named file and executes its content as a Lua chunk. When called without arguments,
+-- `dofile` executes the content of the standard input (`stdin`). Returns all values returned
+-- by the chunk. In case of errors, `dofile` propagates the error to its caller. (That is,
+-- `dofile` does not run in protected mode.)
function dofile([filename]) end
---
--- Raises an error (see §2.3) with `message` as the error object. This function
--- never returns.
+-- Raises an error (see §2.3) with `message` as the error object. This function never returns.
--
--- Usually, `error` adds some information about the error position at the
--- beginning of the message, if the message is a string. The `level` argument
--- specifies how to get the error position. With level 1 (the default), the
--- error position is where the `error` function was called. Level 2 points the
--- error to where the function that called `error` was called; and so on.
--- Passing a level 0 avoids the addition of error position information to the
--- message.
+-- Usually, `error` adds some information about the error position at the beginning of the
+-- message, if the message is a string. The `level` argument specifies how to get the error
+-- position. With level 1 (the default), the error position is where the `error` function
+-- was called. Level 2 points the error to where the function that called `error` was called;
+-- and so on. Passing a level 0 avoids the addition of error position information to the message.
function error(message [, level]) end
---
--- Returns the current environment in use by the function. `f` can be a Lua
--- function or a number that specifies the function at that stack level:
--- Level 1 is the function calling `getfenv`. If the given function is not a
--- Lua function, or if `f` is 0, `getfenv` returns the global environment. The
--- default for `f` is 1.
+-- Returns the current environment in use by the function. `f` can be a Lua function or a
+-- number that specifies the function at that stack level: Level 1 is the function calling
+-- `getfenv`. If the given function is not a Lua function, or if `f` is 0, `getfenv` returns
+-- the global environment. The default for `f` is 1.
--
-- Deprecated in Lua 5.2.
function getfenv([f]) end
---
--- If `object` does not have a metatable, returns nil. Otherwise, if the
--- object's metatable has a `__metatable` field, returns the associated
--- value. Otherwise, returns the metatable of the given object.
+-- If `object` does not have a metatable, returns nil. Otherwise, if the object's metatable
+-- has a `__metatable` field, returns the associated value. Otherwise, returns the metatable
+-- of the given object.
function getmetatable(object) end
---
--- Returns three values (an iterator function, the table `t`, and 0) so that the
--- construction
+-- Returns three values (an iterator function, the table `t`, and 0) so that the construction
--
-- for i,v in ipairs(t) do *body* end
--
--- will iterate over the key-value pairs (`1,t[1]`), (`2,t[2]`), ···, up to the
--- first absent index.
+-- will iterate over the key-value pairs (`1,t[1]`), (`2,t[2]`), ···, up to the first
+-- absent index.
function ipairs(t) end
---
-- Loads a chunk.
--
--- If `chunk` is a string, the chunk is this string. If `chunk` is a function,
--- `load` calls it repeatedly to get the chunk pieces. Each call to `chunk` must
--- return a string that concatenates with previous results. A return of an empty
--- string, nil, or no value signals the end of the chunk.
---
--- If there are no syntactic errors, `load` returns the compiled chunk as a
--- function; otherwise, it returns nil plus the error message.
---
--- When you load a main chunk, the resulting function will always have exactly
--- one upvalue, the `_ENV` variable (see §2.2). However, when you load a binary
--- chunk created from a function (see `string.dump`), the resulting function can
--- have an arbitrary number of upvalues, and there is no guarantee that its
--- first upvalue will be the `_ENV` variable. (A non-main function may not even
--- have an `_ENV` upvalue.)
---
--- Regardless, if the resulting function has any upvalues, its first upvalue is
--- set to the value of `env`, if that parameter is given, or to the value of the
--- global environment. Other upvalues are initialized with nil. All upvalues are
--- fresh, that is, they are not shared with any other function.
---
--- `chunkname` is used as the name of the chunk for error messages and debug
--- information (see §4.7). When absent, it defaults to `chunk`, if `chunk` is a
--- string, or to "`=(load)`" otherwise.
---
--- The string `mode` controls whether the chunk can be text or binary (that is,
--- a precompiled chunk). It may be the string "`b`" (only binary chunks), "`t`"
--- (only text chunks), or "`bt`" (both binary and text). The default is "`bt`".
---
--- It is safe to load malformed binary chunks; `load` signals an appropriate
--- error. However, Lua does not check the consistency of the code inside binary
--- chunks; running maliciously crafted bytecode can crash the interpreter.
+-- If `chunk` is a string, the chunk is this string. If `chunk` is a function, `load` calls
+-- it repeatedly to get the chunk pieces. Each call to `chunk` must return a string that
+-- concatenates with previous results. A return of an empty string, nil, or no value signals
+-- the end of the chunk.
+--
+-- If there are no syntactic errors, `load` returns the compiled chunk as a function; otherwise,
+-- it returns nil plus the error message.
+--
+-- When you load a main chunk, the resulting function will always have exactly one upvalue, the
+-- `_ENV` variable (see §2.2). However, when you load a binary chunk created from a function
+-- (see `string.dump`), the resulting function can have an arbitrary number of upvalues,
+-- and there is no guarantee that its first upvalue will be the `_ENV` variable. (A non-main
+-- function may not even have an `_ENV` upvalue.)
+--
+-- Regardless, if the resulting function has any upvalues, its first upvalue is set to the
+-- value of `env`, if that parameter is given, or to the value of the global environment. Other
+-- upvalues are initialized with nil. All upvalues are fresh, that is, they are not shared with
+-- any other function.
+--
+-- `chunkname` is used as the name of the chunk for error messages and debug information (see
+-- §4.7). When absent, it defaults to `chunk`, if `chunk` is a string, or to "`=(load)`"
+-- otherwise.
+--
+-- The string `mode` controls whether the chunk can be text or binary (that is, a precompiled
+-- chunk). It may be the string "`b`" (only binary chunks), "`t`" (only text chunks), or "`bt`"
+-- (both binary and text). The default is "`bt`".
+--
+-- It is safe to load malformed binary chunks; `load` signals an appropriate error. However,
+-- Lua does not check the consistency of the code inside binary chunks; running maliciously
+-- crafted bytecode can crash the interpreter.
function load(chunk [, chunkname [, mode [, env]]]) end
---
--- Similar to `load`, but gets the chunk from file `filename` or from the
--- standard input, if no file name is given.
+-- Similar to `load`, but gets the chunk from file `filename` or from the standard input,
+-- if no file name is given.
function loadfile([filename [, mode [, env]]]) end
---
--- Similar to `load`, but gets the chunk from the given string. To load and
--- run a given string, use the idiom assert(loadstring(s))() When absent,
--- `chunkname` defaults to the given string.
+-- Similar to `load`, but gets the chunk from the given string. To load and run a given string,
+-- use the idiom assert(loadstring(s))() When absent, `chunkname` defaults to the given string.
--
-- Deprecated in Lua 5.2.
function loadstring(string [, chunkname])
---
--- Creates a module. If there is a table in `package.loaded[name]`, this table
--- is the module. Otherwise, if there is a global table `t` with the given name,
--- this table is the module. Otherwise creates a new table `t` and sets it as
--- the value of the global `name` and the value of `package.loaded[name]`. This
--- function also initializes `t._NAME` with the given name, `t._M` with the
--- module (`t` itself), and `t._PACKAGE` with the package name (the full module
--- name minus last component; see below). Finally, `module` sets `t` as the new
--- environment of the current function and the new value of
--- `package.loaded[name]`, so that `require` returns `t`. If `name` is a
--- compound name (that is, one with components separated by dots), `module`
--- creates (or reuses, if they already exist) tables for each component. For
--- instance, if `name` is `a.b.c`, then `module` stores the module table in
--- field `c` of field `b` of global `a`. This function can receive optional
--- *options* after the module name, where each option is a function to be
--- applied over the module.
+-- Creates a module. If there is a table in `package.loaded[name]`, this table is the
+-- module. Otherwise, if there is a global table `t` with the given name, this table is the
+-- module. Otherwise creates a new table `t` and sets it as the value of the global `name`
+-- and the value of `package.loaded[name]`. This function also initializes `t._NAME` with the
+-- given name, `t._M` with the module (`t` itself), and `t._PACKAGE` with the package name
+-- (the full module name minus last component; see below). Finally, `module` sets `t` as the
+-- new environment of the current function and the new value of `package.loaded[name]`, so that
+-- `require` returns `t`. If `name` is a compound name (that is, one with components separated
+-- by dots), `module` creates (or reuses, if they already exist) tables for each component. For
+-- instance, if `name` is `a.b.c`, then `module` stores the module table in field `c` of field
+-- `b` of global `a`. This function can receive optional *options* after the module name,
+-- where each option is a function to be applied over the module.
--
-- Deprecated in Lua 5.2.
function module(name [, ···]) end
---
--- Allows a program to traverse all fields of a table. Its first argument is
--- a table and its second argument is an index in this table. A call to `next`
--- returns the next index of the table and its associated value. When called
--- with nil as its second argument, `next` returns an initial index and its
--- associated value. When called with the last index, or with nil in an empty
--- table, `next` returns nil. If the second argument is absent, then it is
--- interpreted as nil. In particular, you can use `next(t)` to check whether a
--- table is empty.
+-- Allows a program to traverse all fields of a table. Its first argument is a table and its
+-- second argument is an index in this table. A call to `next` returns the next index of the
+-- table and its associated value. When called with nil as its second argument, `next` returns
+-- an initial index and its associated value. When called with the last index, or with nil in
+-- an empty table, `next` returns nil. If the second argument is absent, then it is interpreted
+-- as nil. In particular, you can use `next(t)` to check whether a table is empty.
--
--- The order in which the indices are enumerated is not specified, *even for
--- numeric indices*. (To traverse a table in numeric order, use a numerical
--- `for`.)
+-- The order in which the indices are enumerated is not specified, *even for numeric indices*. (To
+-- traverse a table in numeric order, use a numerical `for`.)
--
--- The behavior of `next` is undefined if, during the traversal, you assign any
--- value to a non-existent field in the table. You may however modify existing
--- fields. In particular, you may set existing fields to nil.
+-- The behavior of `next` is undefined if, during the traversal, you assign any value to a
+-- non-existent field in the table. You may however modify existing fields. In particular,
+-- you may set existing fields to nil.
function next(table [, index]) end
---
--- If `t` has a metamethod `__pairs`, calls it with `t` as argument and returns
--- the first three results from the call.
+-- If `t` has a metamethod `__pairs`, calls it with `t` as argument and returns the first three
+-- results from the call.
--
--- Otherwise, returns three values: the `next` function, the table `t`, and nil,
--- so that the construction
+-- Otherwise, returns three values: the `next` function, the table `t`, and nil, so that the
+-- construction
--
-- for k,v in pairs(t) do *body* end
--
-- will iterate over all key–value pairs of table `t`.
--
--- See function `next` for the caveats of modifying the table during its
--- traversal.
+-- See function `next` for the caveats of modifying the table during its traversal.
function pairs(t) end
---
--- Calls the function `f` with the given arguments in *protected mode*. This
--- means that any error inside `f` is not propagated; instead, `pcall` catches
--- the error and returns a status code. Its first result is the status code (a
--- boolean), which is true if the call succeeds without errors. In such case,
--- `pcall` also returns all results from the call, after this first result. In
--- case of any error, `pcall` returns false plus the error object. Note that
+-- Calls the function `f` with the given arguments in *protected mode*. This means that any
+-- error inside `f` is not propagated; instead, `pcall` catches the error and returns a status
+-- code. Its first result is the status code (a boolean), which is true if the call succeeds
+-- without errors. In such case, `pcall` also returns all results from the call, after this
+-- first result. In case of any error, `pcall` returns false plus the error object. Note that
-- errors caught by `pcall` do not call a message handler.
function pcall(f [, arg1, ···]) end
---
--- Receives any number of arguments and prints their values to `stdout`,
--- converting each argument to a string following the same rules of `tostring`.
+-- Receives any number of arguments and prints their values to `stdout`, converting each argument
+-- to a string following the same rules of `tostring`.
--
--- The function `print` is not intended for formatted output, but only as a
--- quick way to show a value, for instance for debugging. For complete control
--- over the output, use `string.format` and `io.write`.
+-- The function `print` is not intended for formatted output, but only as a quick way to show a
+-- value, for instance for debugging. For complete control over the output, use `string.format`
+-- and `io.write`.
function print(···) end
---
--- Checks whether `v1` is equal to `v2`, without invoking the `__eq`
--- metamethod. Returns a boolean.
+-- Checks whether `v1` is equal to `v2`, without invoking the `__eq` metamethod. Returns a boolean.
function rawequal(v1, v2) end
---
--- Gets the real value of `table[index]`, without using the `__index`
--- metavalue. `table` must be a table; `index` may be any value.
+-- Gets the real value of `table[index]`, without using the `__index` metavalue. `table` must
+-- be a table; `index` may be any value.
function rawget(table, index) end
---
--- Returns the length of the object `v`,
--- which must be a table or a string,
--- without invoking the `__len` metamethod.
--- Returns an integer.
+-- Returns the length of the object `v`, which must be a table or a string, without invoking the
+-- `__len` metamethod. Returns an integer.
--
-- New in Lua 5.2.
function rawlen(v) end
---
--- Sets the real value of `table[index]` to `value`, without using the
--- `__newindex` metavalue. `table` must be a table, `index` any value different
--- from nil and NaN, and `value` any Lua value.
+-- Sets the real value of `table[index]` to `value`, without using the `__newindex`
+-- metavalue. `table` must be a table, `index` any value different from nil and NaN, and `value`
+-- any Lua value.
--
-- This function returns `table`.
function rawset(table, index, value) end
---
--- Sets the environment to be used by the given function. `f` can be a Lua
--- function or a number that specifies the function at that stack level: Level 1
--- is the function calling `setfenv`. `setfenv` returns the given function. As a
--- special case, when `f` is 0 `setfenv` changes the environment of the running
--- thread. In this case, `setfenv` returns no values.
+-- Sets the environment to be used by the given function. `f` can be a Lua function or a
+-- number that specifies the function at that stack level: Level 1 is the function calling
+-- `setfenv`. `setfenv` returns the given function. As a special case, when `f` is 0 `setfenv`
+-- changes the environment of the running thread. In this case, `setfenv` returns no values.
--
-- Deprecated in Lua 5.2.
function setfenv(f, table) end
---
--- If `index` is a number, returns all arguments after argument number
--- `index`; a negative number indexes from the end (-1 is the last argument).
--- Otherwise, `index` must be the string `"#"`, and `select` returns the total
--- number of extra arguments it received.
+-- If `index` is a number, returns all arguments after argument number `index`; a negative number
+-- indexes from the end (-1 is the last argument). Otherwise, `index` must be the string `"#"`,
+-- and `select` returns the total number of extra arguments it received.
function select(index, ···) end
---
--- Sets the metatable for the given table. If `metatable` is nil, removes the
--- metatable of the given table. If the original metatable has a `__metatable`
--- field, raises an error.
+-- Sets the metatable for the given table. If `metatable` is nil, removes the metatable of the
+-- given table. If the original metatable has a `__metatable` field, raises an error.
--
-- This function returns `table`.
--
--- To change the metatable of other types from Lua code, you must use the debug
--- library (see §6.10).
+-- To change the metatable of other types from Lua code, you must use the debug library
+-- (see §6.10).
function setmetatable(table, metatable) end
---
--- When called with no `base`, `tonumber` tries to convert its argument to a
--- number. If the argument is already a number or a string convertible to a
--- number, then `tonumber` returns this number; otherwise, it
--- returns nil.
+-- When called with no `base`, `tonumber` tries to convert its argument to a number. If the
+-- argument is already a number or a string convertible to a number, then `tonumber` returns
+-- this number; otherwise, it returns nil.
--
--- The conversion of strings can result in integers or floats, according to the
--- lexical conventions of Lua (see §3.1). The string may have leading and
--- trailing spaces and a sign.
+-- The conversion of strings can result in integers or floats, according to the lexical
+-- conventions of Lua (see §3.1). The string may have leading and trailing spaces and a sign.
--
--- When called with `base`, then `e` must be a string to be interpreted as an
--- integer numeral in that base. The base may be any integer between 2 and 36,
--- inclusive. In bases above 10, the letter '`A`' (in either upper or lower
--- case) represents 10, '`B`' represents 11, and so forth, with '`Z`'
--- representing 35. If the string `e` is not a valid numeral in the given base,
+-- When called with `base`, then `e` must be a string to be interpreted as an integer numeral
+-- in that base. The base may be any integer between 2 and 36, inclusive. In bases above 10,
+-- the letter '`A`' (in either upper or lower case) represents 10, '`B`' represents 11, and so
+-- forth, with '`Z`' representing 35. If the string `e` is not a valid numeral in the given base,
-- the function returns nil
function tonumber(e [, base]) end
---
--- Receives a value of any type and converts it to a string in a human-readable
--- format. Floats always produce strings with some floating-point indication
--- (either a decimal dot or an exponent).
+-- Receives a value of any type and converts it to a string in a human-readable format. Floats
+-- always produce strings with some floating-point indication (either a decimal dot or an
+-- exponent).
--
--- If the metatable of `v` has a `__tostring` field, then `tostring` calls the
--- corresponding value with `v` as argument, and uses the result of the call as
--- its result. Otherwise, if the metatable of `v` has a `__name` field with a
--- string value, `tostring` may use that string in its final result.
+-- If the metatable of `v` has a `__tostring` field, then `tostring` calls the corresponding
+-- value with `v` as argument, and uses the result of the call as its result. Otherwise, if the
+-- metatable of `v` has a `__name` field with a string value, `tostring` may use that string
+-- in its final result.
--
-- For complete control of how numbers are converted, use `string.format`.
function tostring(v) end
---
--- Returns the type of its only argument, coded as a string. The possible
--- results of this function are "
--- `nil`" (a string, not the value nil), "`number`", "`string`", "`boolean`",
+-- Returns the type of its only argument, coded as a string. The possible results of this
+-- function are " `nil`" (a string, not the value nil), "`number`", "`string`", "`boolean`",
-- "`table`", "`function`", "`thread`", and "`userdata`".
function type(v) end
---
--- Returns the elements from the given table. This function is equivalent to
--- return list[i], list[i+1], ···, list[j] except that the above code can
--- be written only for a fixed number of elements. By default, `i` is 1 and
--- `j` is the length of the list, as defined by the length operator
--- (see §2.5.5).
+-- Returns the elements from the given table. This function is equivalent to return list[i],
+-- list[i+1], ···, list[j] except that the above code can be written only for a fixed number
+-- of elements. By default, `i` is 1 and `j` is the length of the list, as defined by the length
+-- operator (see §2.5.5).
--
-- Deprecated in Lua 5.2.
function unpack(list [, i [, j]]) end
---
--- Emits a warning with a message composed by the concatenation of all its
--- arguments (which should be strings).
+-- Emits a warning with a message composed by the concatenation of all its arguments (which
+-- should be strings).
--
--- By convention, a one-piece message starting with '`@`' is intended to be a
--- *control message*, which is a message to the warning system itself. In
--- particular, the standard warning function in Lua recognizes the control
--- messages "`@off`", to stop the emission of warnings, and "`@on`", to
--- (re)start the emission; it ignores unknown control messages.
+-- By convention, a one-piece message starting with '`@`' is intended to be a *control message*,
+-- which is a message to the warning system itself. In particular, the standard warning function in
+-- Lua recognizes the control messages "`@off`", to stop the emission of warnings, and "`@on`",
+-- to (re)start the emission; it ignores unknown control messages.
--
-- New in Lua 5.4.
function warn(msg1, ···) end
---
--- This function is similar to `pcall`, except that it sets a new message
--- handler `msgh`.
+-- This function is similar to `pcall`, except that it sets a new message handler `msgh`.
function xpcall(f, msgh [, arg1, ···]) end
---
--- Closes coroutine `co`, that is, closes all its pending to-be-closed variables
--- and puts the coroutine in a dead state. The given coroutine must be dead or
--- suspended. In case of error closing some variable, returns false plus the
--- error object; otherwise returns true.
+-- Closes coroutine `co`, that is, closes all its pending to-be-closed variables and puts the
+-- coroutine in a dead state. The given coroutine must be dead or suspended. In case of error
+-- closing some variable, returns false plus the error object; otherwise returns true.
function coroutine.close(co) end
---
--- Creates a new coroutine, with body `f`. `f` must be a Lua
--- function. Returns this new coroutine, an object with type `"thread"`.
+-- Creates a new coroutine, with body `f`. `f` must be a Lua function. Returns this new coroutine,
+-- an object with type `"thread"`.
function coroutine.create(f) end
---
--- Returns true when the coroutine `co` can yield. The default for `co` is the
--- running coroutine.
+-- Returns true when the coroutine `co` can yield. The default for `co` is the running coroutine.
--
--- A coroutine is yieldable if it is not the main thread and it is not inside a
--- non-yieldable C function.
+-- A coroutine is yieldable if it is not the main thread and it is not inside a non-yieldable
+-- C function.
--
-- New in Lua 5.3.
function coroutine.isyieldable([co]) end
---
--- Starts or continues the execution of coroutine `co`. The first time
--- you resume a coroutine, it starts running its body. The values `val1`,
--- ··· are passed as the arguments to the body function. If the coroutine
--- has yielded, `resume` restarts it; the values `val1`, ··· are passed
--- as the results from the yield.
+-- Starts or continues the execution of coroutine `co`. The first time you resume a coroutine,
+-- it starts running its body. The values `val1`, ··· are passed as the arguments to the body
+-- function. If the coroutine has yielded, `resume` restarts it; the values `val1`, ··· are
+-- passed as the results from the yield.
--
--- If the coroutine runs without any errors, `resume` returns true plus any
--- values passed to `yield` (when the coroutine yields) or any values returned
--- by the body function (when the coroutine terminates). If there is any error,
--- `resume` returns false plus the error message.
+-- If the coroutine runs without any errors, `resume` returns true plus any values passed to
+-- `yield` (when the coroutine yields) or any values returned by the body function (when the
+-- coroutine terminates). If there is any error, `resume` returns false plus the error message.
function coroutine.resume(co [, val1, ···]) end
---
--- Returns the running coroutine plus a boolean, true when the running coroutine
--- is the main one.
+-- Returns the running coroutine plus a boolean, true when the running coroutine is the main one.
function coroutine.running() end
---
--- Returns the status of the coroutine `co`, as a string: `"running"`, if
--- the coroutine is running (that is, it is the one that called `status`);
--- `"suspended"`, if the coroutine is suspended in a call to `yield`, or if it
--- has not started running yet; `"normal"` if the coroutine is active but not
--- running (that is, it has resumed another coroutine); and `"dead"` if the
--- coroutine has finished its body function, or if it has stopped with an error.
+-- Returns the status of the coroutine `co`, as a string: `"running"`, if the coroutine is
+-- running (that is, it is the one that called `status`); `"suspended"`, if the coroutine
+-- is suspended in a call to `yield`, or if it has not started running yet; `"normal"` if the
+-- coroutine is active but not running (that is, it has resumed another coroutine); and `"dead"`
+-- if the coroutine has finished its body function, or if it has stopped with an error.
function coroutine.status(co) end
---
--- Creates a new coroutine, with body `f`; `f` must be a Lua
--- function. Returns a function that resumes the coroutine each time it is
--- called. Any arguments passed to this function behave as the extra arguments
--- to `resume`. The function returns the same values returned by `resume`,
--- except the first boolean. In case of error, the function closes the coroutine
--- and propagates the error.
+-- Creates a new coroutine, with body `f`; `f` must be a Lua function. Returns a function that
+-- resumes the coroutine each time it is called. Any arguments passed to this function behave as
+-- the extra arguments to `resume`. The function returns the same values returned by `resume`,
+-- except the first boolean. In case of error, the function closes the coroutine and propagates
+-- the error.
function coroutine.wrap(f) end
---
--- Suspends the execution of the calling coroutine. Any arguments to `yield` are
--- passed as extra results to `resume`.
+-- Suspends the execution of the calling coroutine. Any arguments to `yield` are passed as
+-- extra results to `resume`.
function coroutine.yield(···) end
---
--- Loads the given module. The function starts by looking into the
--- `package.loaded` table to determine whether `modname` is already loaded. If
--- it is, then `require` returns the value stored at `package.loaded[modname]`.
--- (The absence of a second result in this case signals that this call did not
--- have to load the module.) Otherwise, it tries to find a *loader* for the
--- module.
---
--- To find a loader, `require` is guided by the table `package.searchers`. Each
--- item in this table is a search function, that searches for the module in a
--- particular way. By changing this table, we can change how `require` looks for
--- a module. The following explanation is based on the default configuration for
--- `package.searchers`.
---
--- First `require` queries `package.preload[modname]`. If it has a value,
--- this value (which must be a function) is the loader. Otherwise `require`
--- searches for a Lua loader using the path stored in `package.path`. If
--- that also fails, it searches for a C loader using the path stored in
--- `package.cpath`. If that also fails, it tries an *all-in-one* loader (see
--- `package.searchers`).
---
--- Once a loader is found, `require` calls the loader with two arguments:
--- `modname` and an extra value, a *loader data*, also returned by the searcher.
--- The loader data can be any value useful to the module; for the default
--- searchers, it indicates where the loader was found. (For instance, if the
--- loader came from a file, this extra value is the file path.) If the loader
--- returns any non-nil value, `require` assigns the returned value to
--- `package.loaded[modname]`. If the loader does not return a non-nil value and
--- has not assigned any value to `package.loaded[modname]`, then `require`
--- assigns true to this entry. In any case, `require` returns the final value of
--- `package.loaded[modname]`. Besides that value, `require` also returns as a
--- second result the loader data returned by the searcher, which indicates how
--- `require` found the module.
---
--- If there is any error loading or running the module, or if it cannot find
--- any loader for the module, then `require` raises an error.
+-- Loads the given module. The function starts by looking into the `package.loaded` table to
+-- determine whether `modname` is already loaded. If it is, then `require` returns the value
+-- stored at `package.loaded[modname]`. (The absence of a second result in this case signals
+-- that this call did not have to load the module.) Otherwise, it tries to find a *loader*
+-- for the module.
+--
+-- To find a loader, `require` is guided by the table `package.searchers`. Each item in this
+-- table is a search function, that searches for the module in a particular way. By changing
+-- this table, we can change how `require` looks for a module. The following explanation is
+-- based on the default configuration for `package.searchers`.
+--
+-- First `require` queries `package.preload[modname]`. If it has a value, this value (which must be
+-- a function) is the loader. Otherwise `require` searches for a Lua loader using the path stored
+-- in `package.path`. If that also fails, it searches for a C loader using the path stored in
+-- `package.cpath`. If that also fails, it tries an *all-in-one* loader (see `package.searchers`).
+--
+-- Once a loader is found, `require` calls the loader with two arguments: `modname` and an
+-- extra value, a *loader data*, also returned by the searcher. The loader data can be any
+-- value useful to the module; for the default searchers, it indicates where the loader
+-- was found. (For instance, if the loader came from a file, this extra value is the file
+-- path.) If the loader returns any non-nil value, `require` assigns the returned value to
+-- `package.loaded[modname]`. If the loader does not return a non-nil value and has not assigned
+-- any value to `package.loaded[modname]`, then `require` assigns true to this entry. In any
+-- case, `require` returns the final value of `package.loaded[modname]`. Besides that value,
+-- `require` also returns as a second result the loader data returned by the searcher, which
+-- indicates how `require` found the module.
+--
+-- If there is any error loading or running the module, or if it cannot find any loader for
+-- the module, then `require` raises an error.
function require(modname) end
---
@@ -442,89 +395,93 @@ function require(modname) end
-- @class table
-- @name package
-- @field config (string)
--- A string describing some compile-time configurations for packages. This
--- string is a sequence of lines:
--- The first line is the directory separator string. Default is '`\`' for
--- Windows and '`/`' for all other systems.
--- The second line is the character that separates templates in a path.
--- Default is '`;`'.
--- The third line is the string that marks the substitution points in a
--- template. Default is '`?`'.
--- The fourth line is a string that, in a path in Windows, is replaced by
--- the executable's directory. Default is '`!`'.
--- The fifth line is a mark to ignore all text after it when building the
--- `luaopen_` function name. Default is '`-`'.
+-- A string describing some compile-time configurations for packages. This string is a sequence
+-- of lines:
+--
+-- * The first line is the directory separator string. Default is '`\`' for Windows and
+-- '`/`' for all other systems.
+-- * The second line is the character that separates templates in a path. Default is '`;`'.
+-- * The third line is the string that marks the substitution points in a template. Default
+-- is '`?`'.
+-- * The fourth line is a string that, in a path in Windows, is replaced by the executable's
+-- directory. Default is '`!`'.
+-- * The fifth line is a mark to ignore all text after it when building the `luaopen_`
+-- function name. Default is '`-`'.
--
-- New in Lua 5.2.
-- @field cpath (string)
-- A string with the path used by `require` to search for a C loader.
--- Lua initializes the C path `package.cpath` in the same way it initializes
--- the Lua path `package.path`, using the environment variable `LUA_CPATH_5_4`
--- or the environment variable `LUA_CPATH` or a default path defined in
--- `luaconf.h`.
+--
+-- Lua initializes the C path `package.cpath` in the same way it initializes the Lua path
+-- `package.path`, using the environment variable `LUA_CPATH_5_4` or the environment variable
+-- `LUA_CPATH` or a default path defined in `luaconf.h`.
-- @field loaded (table)
--- A table used by `require` to control which modules are already loaded. When
--- you require a module `modname` and `package.loaded[modname]` is not false,
--- `require` simply returns the value stored there.
--- This variable is only a reference to the real table; assignments to this
--- variable do not change the table used by `require`.
+-- A table used by `require` to control which modules are already loaded. When you require
+-- a module `modname` and `package.loaded[modname]` is not false, `require` simply returns
+-- the value stored there.
+--
+-- This variable is only a reference to the real table; assignments to this variable do not
+-- change the table used by `require`.
-- @field loaders (table)
-- See `package.searchers`.
--
-- Deprecated in Lua 5.2.
-- @field path (string)
-- A string with the path used by `require` to search for a Lua loader.
--- At start-up, Lua initializes this variable with the value of the
--- environment variable `LUA_PATH_5_4` or the environment variable `LUA_PATH`
--- or with a default path defined in `luaconf.h`, if those environment
--- variables are not defined. A "`;;`" in the value of the environment
--- variable is replaced by the default path.
+--
+-- At start-up, Lua initializes this variable with the value of the environment variable
+-- `LUA_PATH_5_4` or the environment variable `LUA_PATH` or with a default path defined in
+-- `luaconf.h`, if those environment variables are not defined. A "`;;`" in the value of the
+-- environment variable is replaced by the default path.
-- @field preload (table)
-- A table to store loaders for specific modules (see `require`).
--- This variable is only a reference to the real table; assignments to this
--- variable do not change the table used by `require`.
+--
+-- This variable is only a reference to the real table; assignments to this variable do not
+-- change the table used by `require`.
-- @field searchers (table)
-- A table used by `require` to control how to find modules.
--- Each entry in this table is a *searcher function*. When looking for a
--- module, `require` calls each of these searchers in ascending order, with
--- the module name (the argument given to `require`) as its sole argument.
--- If the searcher finds the module, it returns another function, the module
--- *loader*, plus an extra value, a *loader data*, that will be passed to that
--- loader and returned as a second result by `require`. If it cannot find the
--- module, it returns a string explaining why (or nil if it has nothing to
--- say).
+--
+-- Each entry in this table is a *searcher function*. When looking for a module, `require`
+-- calls each of these searchers in ascending order, with the module name (the argument given
+-- to `require`) as its sole argument. If the searcher finds the module, it returns another
+-- function, the module *loader*, plus an extra value, a *loader data*, that will be passed
+-- to that loader and returned as a second result by `require`. If it cannot find the module,
+-- it returns a string explaining why (or nil if it has nothing to say).
+--
-- Lua initializes this table with four functions.
--- The first searcher simply looks for a loader in the `package.preload`
--- table.
--- The second searcher looks for a loader as a Lua library, using the path
--- stored at `package.path`. The search is done as described in function
--- `package.searchpath`.
--- The third searcher looks for a loader as a C library, using the path given
--- by the variable `package.cpath`. Again, the search is done as described in
--- function `package.searchpath`. For instance, if the C path is the string
+--
+-- The first searcher simply looks for a loader in the `package.preload` table.
+--
+-- The second searcher looks for a loader as a Lua library, using the path stored at
+-- `package.path`. The search is done as described in function `package.searchpath`.
+--
+-- The third searcher looks for a loader as a C library, using the path given by the variable
+-- `package.cpath`. Again, the search is done as described in function `package.searchpath`. For
+-- instance, if the C path is the string
+--
-- "./?.so;./?.dll;/usr/local/?/init.so"
--- the searcher for module `foo` will try to open the files `./foo.so`,
--- `./foo.dll`, and `/usr/local/foo/init.so`, in that order. Once it finds
--- a C library, this searcher first uses a dynamic link facility to link the
--- application with the library. Then it tries to find a C function inside the
--- library to be used as the loader. The name of this C function is the string
--- "`luaopen_`" concatenated with a copy of the module name where each dot
--- is replaced by an underscore. Moreover, if the module name has a hyphen,
--- its suffix after (and including) the first hyphen is removed. For instance,
--- if the module name is `a.b.c-v2.1 `, the function name will be
--- `luaopen_a_b_c`. The fourth searcher tries an *all-in-one loader*. It
--- searches the C path for a library for the root name of the given module.
--- For instance, when requiring `a.b.c`, it will search for a C library for
--- `a`. If found, it looks into it for an open function for the submodule; in
--- our example, that would be `luaopen_a_b_c`. With this facility, a package
--- can pack several C submodules into one single library, with each submodule
--- keeping its original open function.
--- All searchers except the first one (preload) return as the extra value the
--- file path where the module was found, as returned by `package.searchpath`.
--- The first searcher always returns the string "`:preload:`".
--- Searchers should raise no errors and have no side effects in Lua. (They may
--- have side effects in C, for instance by linking the application with a
--- library.)
+--
+-- the searcher for module `foo` will try to open the files `./foo.so`, `./foo.dll`, and
+-- `/usr/local/foo/init.so`, in that order. Once it finds a C library, this searcher first
+-- uses a dynamic link facility to link the application with the library. Then it tries to
+-- find a C function inside the library to be used as the loader. The name of this C function
+-- is the string "`luaopen_`" concatenated with a copy of the module name where each dot
+-- is replaced by an underscore. Moreover, if the module name has a hyphen, its suffix after
+-- (and including) the first hyphen is removed. For instance, if the module name is `a.b.c-v2.1
+-- `, the function name will be `luaopen_a_b_c`.
+--
+-- The fourth searcher tries an *all-in-one loader*. It searches the C path for a library for
+-- the root name of the given module. For instance, when requiring `a.b.c`, it will search for
+-- a C library for `a`. If found, it looks into it for an open function for the submodule; in
+-- our example, that would be `luaopen_a_b_c`. With this facility, a package can pack several
+-- C submodules into one single library, with each submodule keeping its original open function.
+--
+-- All searchers except the first one (preload) return as the extra value the file path
+-- where the module was found, as returned by `package.searchpath`. The first searcher always
+-- returns the string "`:preload:`".
+--
+-- Searchers should raise no errors and have no side effects in Lua. (They may have side
+-- effects in C, for instance by linking the application with a library.)
--
-- New in Lua 5.2.
local package
@@ -532,257 +489,226 @@ local package
---
-- Dynamically links the host program with the C library `libname`.
--
--- If `funcname` is "`*`", then it only links with the library, making the
--- symbols exported by the library available to other dynamically linked
--- libraries. Otherwise, it looks for a function `funcname` inside the library
--- and returns this function as a C function. So, `funcname` must follow the
--- `lua_CFunction` prototype (see `lua_CFunction`).
---
--- This is a low-level function. It completely bypasses the package and module
--- system. Unlike `require`, it does not perform any path searching and does
--- not automatically adds extensions. `libname` must be the complete file name
--- of the C library, including if necessary a path and an extension. `funcname`
--- must be the exact name exported by the C library (which may depend on the
--- C compiler and linker used).
---
--- This function is not supported by Standard C. As such, it is only available
--- on some platforms (Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix
--- systems that support the `dlfcn` standard).
---
--- This function is inherently insecure, as it allows Lua to call any function
--- in any readable dynamic library in the system. (Lua calls any function
--- assuming the function has a proper prototype and respects a proper protocol
--- (see lua_CFunction). Therefore, calling an arbitrary function in an arbitrary
--- dynamic library more often than not results in an access violation.)
+-- If `funcname` is "`*`", then it only links with the library, making the symbols exported
+-- by the library available to other dynamically linked libraries. Otherwise, it looks for
+-- a function `funcname` inside the library and returns this function as a C function. So,
+-- `funcname` must follow the `lua_CFunction` prototype (see `lua_CFunction`).
+--
+-- This is a low-level function. It completely bypasses the package and module system. Unlike
+-- `require`, it does not perform any path searching and does not automatically adds
+-- extensions. `libname` must be the complete file name of the C library, including if necessary
+-- a path and an extension. `funcname` must be the exact name exported by the C library (which
+-- may depend on the C compiler and linker used).
+--
+-- This function is not supported by Standard C. As such, it is only available on some platforms
+-- (Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix systems that support the `dlfcn`
+-- standard).
+--
+-- This function is inherently insecure, as it allows Lua to call any function in any readable
+-- dynamic library in the system. (Lua calls any function assuming the function has a proper
+-- prototype and respects a proper protocol (see lua_CFunction). Therefore, calling an arbitrary
+-- function in an arbitrary dynamic library more often than not results in an access violation.)
function package.loadlib(libname, funcname) end
---
-- Searches for the given `name` in the given `path`.
--
--- A path is a string containing a sequence of _templates_ separated by
--- semicolons. For each template, the function replaces each interrogation mark
--- (if any) in the template with a copy of `name` wherein all occurrences of
--- `sep` (a dot, by default) were replaced by `rep` (the system's directory
--- separator, by default), and then tries to open the resulting file name.
+-- A path is a string containing a sequence of _templates_ separated by semicolons. For each
+-- template, the function replaces each interrogation mark (if any) in the template with a copy
+-- of `name` wherein all occurrences of `sep` (a dot, by default) were replaced by `rep` (the
+-- system's directory separator, by default), and then tries to open the resulting file name.
-- For instance, if the path is the string
+--
-- "./?.lua;./?.lc;/usr/local/?/init.lua"
--- the search for the name `foo.a` will try to open the files `./foo/a.lua`,
--- `./foo/a.lc`, and `/usr/local/foo/a/init.lua`, in that order.
--- Returns the resulting name of the first file that it can open in read mode
--- (after closing the file), or nil plus an error message if none succeeds.
--- (This error message lists all file names it tried to open.)
+--
+-- the search for the name `foo.a` will try to open the files `./foo/a.lua`, `./foo/a.lc`, and
+-- `/usr/local/foo/a/init.lua`, in that order.
+--
+-- Returns the resulting name of the first file that it can open in read mode (after closing
+-- the file), or nil plus an error message if none succeeds. (This error message lists all file
+-- names it tried to open.)
--
-- New in Lua 5.2.
function package.searchpath(name, path [, sep [, rep]]) end
---
--- Sets a metatable for `module` with its `__index` field referring to the
--- global environment, so that this module inherits values from the global
--- environment. To be used as an option to function `module`.
+-- Sets a metatable for `module` with its `__index` field referring to the global environment,
+-- so that this module inherits values from the global environment. To be used as an option to
+-- function `module`.
--
-- Deprecated in Lua 5.2.
function package.seeall(module) end
---
--- Returns the internal numerical codes of the characters `s[i]`, `s[i+1]`,
--- ···, `s[j]`. The default value for `i` is 1; the default value for `j`
--- is `i`. These indices are corrected following the same rules of function
--- `string.sub`.
+-- Returns the internal numerical codes of the characters `s[i]`, `s[i+1]`, ···, `s[j]`. The
+-- default value for `i` is 1; the default value for `j` is `i`. These indices are corrected
+-- following the same rules of function `string.sub`.
--
-- Numerical codes are not necessarily portable across platforms.
function string.byte(s [, i [, j]]) end
---
--- Receives zero or more integers. Returns a string with length equal to
--- the number of arguments, in which each character has the internal numerical
--- code equal to its corresponding argument.
+-- Receives zero or more integers. Returns a string with length equal to the number of arguments,
+-- in which each character has the internal numerical code equal to its corresponding argument.
--
-- Numerical codes are not necessarily portable across platforms.
function string.char(···) end
---
--- Returns a string containing a binary representation (a _binary chunk_) of the
--- given function, so that a later `load` on this string returns a copy of the
--- function (but with new upvalues). If `strip` is a true value, the binary
--- representation is created without debug information about the function (local
--- variable names, lines, etc.).
+-- Returns a string containing a binary representation (a _binary chunk_) of the given function, so
+-- that a later `load` on this string returns a copy of the function (but with new upvalues). If
+-- `strip` is a true value, the binary representation is created without debug information
+-- about the function (local variable names, lines, etc.).
--
--- Functions with upvalues have only their number of upvalues saved. When
--- (re)loaded, those upvalues receive fresh instances. (See the `load` function
--- for details about how these upvalues are initialized. You can use the debug
--- library to serialize and reload the upvalues of a function in a way adequate
--- to your needs.)
+-- Functions with upvalues have only their number of upvalues saved. When (re)loaded, those
+-- upvalues receive fresh instances. (See the `load` function for details about how these
+-- upvalues are initialized. You can use the debug library to serialize and reload the upvalues
+-- of a function in a way adequate to your needs.)
function string.dump(function [, strip]) end
---
--- Looks for the first match of `pattern` (see §6.4.1) in the string `s`. If it
--- finds a match, then `find` returns the indices of `s` where this occurrence
--- starts and ends; otherwise, it returns nil. A third, optional numerical
--- argument `init` specifies where to start the search; its default value is 1
--- and can be negative. A value of true as a fourth, optional argument `plain`
--- turns off the pattern matching facilities, so the function does a plain
--- "find substring" operation, with no characters in `pattern` being considered
--- magic.
+-- Looks for the first match of `pattern` (see §6.4.1) in the string `s`. If it finds a match,
+-- then `find` returns the indices of `s` where this occurrence starts and ends; otherwise,
+-- it returns nil. A third, optional numerical argument `init` specifies where to start the
+-- search; its default value is 1 and can be negative. A value of true as a fourth, optional
+-- argument `plain` turns off the pattern matching facilities, so the function does a plain
+-- "find substring" operation, with no characters in `pattern` being considered magic.
--
--- If the pattern has captures, then in a successful match the captured values
--- are also returned, after the two indices.
+-- If the pattern has captures, then in a successful match the captured values are also returned,
+-- after the two indices.
function string.find(s, pattern [, init [, plain]]) end
---
--- Returns a formatted version of its variable number of arguments following the
--- description given in its first argument, which must be a string. The format
--- string follows the same rules as the ISO C function `sprintf`. The only
--- differences are that the conversion specifiers and modifiers `*`, `h`, `L`,
--- `l`, and `n` are not supported and that there is an extra specifier, `q`.
+-- Returns a formatted version of its variable number of arguments following the description
+-- given in its first argument, which must be a string. The format string follows the same rules
+-- as the ISO C function `sprintf`. The only differences are that the conversion specifiers and
+-- modifiers `*`, `h`, `L`, `l`, and `n` are not supported and that there is an extra specifier,
+-- `q`.
--
--- The specifier `q` formats booleans, nil, numbers, and strings in a way that
--- the result is a valid constant in Lua source code. Booleans and nil are
--- written in the obvious way (`true`, `false`, `nil`). Floats are written in
--- hexadecimal, to preserve full precision. A string is written between double
--- quotes, using escape sequences when necessary to ensure that it can safely be
--- read back by the Lua interpreter. For instance, the call
+-- The specifier `q` formats booleans, nil, numbers, and strings in a way that the result is a
+-- valid constant in Lua source code. Booleans and nil are written in the obvious way (`true`,
+-- `false`, `nil`). Floats are written in hexadecimal, to preserve full precision. A string is
+-- written between double quotes, using escape sequences when necessary to ensure that it can
+-- safely be read back by the Lua interpreter. For instance, the call
--
-- string.format('%q', 'a string with "quotes" and \n new line')
--
-- may produce the string:
--
--- "a string with \"quotes\" and \
--- new line"
+-- "a string with \"quotes\" and \ new line"
--
-- This specifier does not support modifiers (flags, width, length).
--
--- The conversion specifiers `A` and `a` (when available), `E`, `e`, `f`, `G`,
--- and `g` all expect a number as argument. The specifiers `c`, `d`, `i`, `o`,
--- `u`, `X`, and `x` expect an integer. When Lua is compiled with a C89
--- compiler, the specifiers `A` and `a` (hexadecimal floats) do not support
--- modifiers.
+-- The conversion specifiers `A` and `a` (when available), `E`, `e`, `f`, `G`, and `g` all
+-- expect a number as argument. The specifiers `c`, `d`, `i`, `o`, `u`, `X`, and `x` expect an
+-- integer. When Lua is compiled with a C89 compiler, the specifiers `A` and `a` (hexadecimal
+-- floats) do not support modifiers.
--
--- The specifier `s` expects a string; if its argument is not a string, it is
--- converted to one following the same rules of `tostring`. If the specifier has
--- any modifier, the corresponding string argument should not contain zeros.
+-- The specifier `s` expects a string; if its argument is not a string, it is converted to one
+-- following the same rules of `tostring`. If the specifier has any modifier, the corresponding
+-- string argument should not contain zeros.
--
--- The specifier `p` formats the pointer returned by `lua_topointer`. That gives
--- a unique string identifier for tables, userdata, threads, strings, and
--- functions. For other values (numbers, nil, booleans), this specifier results
--- in a string representing the pointer `NULL`.
+-- The specifier `p` formats the pointer returned by `lua_topointer`. That gives a unique string
+-- identifier for tables, userdata, threads, strings, and functions. For other values (numbers,
+-- nil, booleans), this specifier results in a string representing the pointer `NULL`.
function string.format(formatstring, ···) end
---
--- Returns an iterator function that, each time it is called, returns the
--- next captures from `pattern` (see §6.4.1) over the string `s`. If `pattern`
--- specifies no captures, then the whole match is produced in each call. A
--- third, optional argument `init` specifies where to start the search; its
--- default value is 1 and can be negative.
+-- Returns an iterator function that, each time it is called, returns the next captures from
+-- `pattern` (see §6.4.1) over the string `s`. If `pattern` specifies no captures, then the
+-- whole match is produced in each call. A third, optional argument `init` specifies where to
+-- start the search; its default value is 1 and can be negative.
--
--- As an example, the following loop will iterate over all the words from string
--- `s`, printing one per line:
+-- As an example, the following loop will iterate over all the words from string `s`, printing
+-- one per line:
--
--- s = "hello world from Lua"
--- for w in string.gmatch(s, "%a+") do
--- print(w)
--- end
+-- s = "hello world from Lua" for w in string.gmatch(s, "%a+") do
+-- print(w) end
--
--- The next example collects all pairs `key=value` from the given string into a
--- table:
+-- The next example collects all pairs `key=value` from the given string into a table:
--
--- t = {}
--- s = "from=world, to=Lua"
--- for k, v in string.gmatch(s, "(%w+)=(%w+)") do
--- t[k] = v
--- end
+-- t = {} s = "from=world, to=Lua" for k, v in string.gmatch(s, "(%w+)=(%w+)") do
+-- t[k] = v end
--
--- For this function, a caret '`^`' at the start of a pattern does not work as
--- an anchor, as this would prevent the iteration.
+-- For this function, a caret '`^`' at the start of a pattern does not work as an anchor,
+-- as this would prevent the iteration.
function string.gmatch(s, pattern [, init]) end
---
--- Returns a copy of `s` in which all (or the first `n`, if given)
--- occurrences of the `pattern` (see §6.4.1) have been replaced by a replacement
--- string specified by `repl`, which can be a string, a table, or a function.
--- `gsub` also returns, as its second value, the total number of matches that
--- occurred. The name `gsub` comes from "Global SUBstitution".
+-- Returns a copy of `s` in which all (or the first `n`, if given) occurrences of the `pattern`
+-- (see §6.4.1) have been replaced by a replacement string specified by `repl`, which can be
+-- a string, a table, or a function. `gsub` also returns, as its second value, the total number
+-- of matches that occurred. The name `gsub` comes from "Global SUBstitution".
--
--- If `repl` is a string, then its value is used for replacement. The character
--- `%` works as an escape character: any sequence in `repl` of the form `%d`,
--- with `d` between 1 and 9, stands for the value of the `d`-th captured
--- substring; the sequence `%0` stands for the whole match; the sequence `%%`
--- stands for a single `%`.
+-- If `repl` is a string, then its value is used for replacement. The character `%` works as an
+-- escape character: any sequence in `repl` of the form `%d`, with `d` between 1 and 9, stands
+-- for the value of the `d`-th captured substring; the sequence `%0` stands for the whole match;
+-- the sequence `%%` stands for a single `%`.
--
--- If `repl` is a table, then the table is queried for every match, using
--- the first capture as the key.
+-- If `repl` is a table, then the table is queried for every match, using the first capture as
+-- the key.
--
--- If `repl` is a function, then this function is called every time a match
--- occurs, with all captured substrings passed as arguments, in order.
+-- If `repl` is a function, then this function is called every time a match occurs, with all
+-- captured substrings passed as arguments, in order.
--
--- In any case, if the pattern specifies no captures, then it behaves as if the
--- whole pattern was inside a capture.
+-- In any case, if the pattern specifies no captures, then it behaves as if the whole pattern
+-- was inside a capture.
--
--- If the value returned by the table query or by the function call is a
--- string or a number, then it is used as the replacement string; otherwise,
--- if it is false or nil, then there is no replacement (that is, the original
--- match is kept in the string).
+-- If the value returned by the table query or by the function call is a string or a number,
+-- then it is used as the replacement string; otherwise, if it is false or nil, then there is
+-- no replacement (that is, the original match is kept in the string).
--
-- Here are some examples:
--
--- x = string.gsub("hello world", "(%w+)", "%1 %1")
--- --> x="hello hello world world"
--- x = string.gsub("hello world", "%w+", "%0 %0", 1)
--- --> x="hello hello world"
--- x = string.gsub("hello world from Lua", "(%w+)%s*(%w+)", "%2 %1")
--- --> x="world hello Lua from"
--- x = string.gsub("home = $HOME, user = $USER", "%$(%w+)", os.getenv)
--- --> x="home = /home/roberto, user = roberto"
+-- x = string.gsub("hello world", "(%w+)", "%1 %1") --> x="hello hello world world" x =
+-- string.gsub("hello world", "%w+", "%0 %0", 1) --> x="hello hello world" x = string.gsub("hello
+-- world from Lua", "(%w+)%s*(%w+)", "%2 %1") --> x="world hello Lua from" x = string.gsub("home
+-- = $HOME, user = $USER", "%$(%w+)", os.getenv) --> x="home = /home/roberto, user = roberto"
-- x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s)
--- return load(s)()
--- end)
--- --> x="4+5 = 9"
--- local t = {name="lua", version="5.4"}
--- x = string.gsub("$name-$version.tar.gz", "%$(%w+)", t)
--- --> x="lua-5.4.tar.gz"
+-- return load(s)() end)
+-- --> x="4+5 = 9" local t = {name="lua", version="5.4"} x = string.gsub("$name-$version.tar.gz",
+-- "%$(%w+)", t) --> x="lua-5.4.tar.gz"
function string.gsub(s, pattern, repl [, n]) end
---
--- Receives a string and returns its length. The empty string `""` has
--- length 0. Embedded zeros are counted, so `"a\000bc\000"` has length 5.
+-- Receives a string and returns its length. The empty string `""` has length 0. Embedded zeros
+-- are counted, so `"a\000bc\000"` has length 5.
function string.len(s) end
---
--- Receives a string and returns a copy of this string with all uppercase
--- letters changed to lowercase. All other characters are left unchanged. The
--- definition of what an uppercase letter is depends on the current locale.
+-- Receives a string and returns a copy of this string with all uppercase letters changed to
+-- lowercase. All other characters are left unchanged. The definition of what an uppercase
+-- letter is depends on the current locale.
function string.lower(s) end
---
--- Looks for the first *match* of the `pattern` (see §6.4.1) in the string `s`.
--- If it finds one, then `match` returns the captures from the pattern;
--- otherwise it returns nil. If `pattern` specifies no captures, then the whole
--- match is returned. A third, optional numerical argument `init` specifies
--- where to start the search; its default value is 1 and can be negative.
+-- Looks for the first *match* of the `pattern` (see §6.4.1) in the string `s`. If it finds one,
+-- then `match` returns the captures from the pattern; otherwise it returns nil. If `pattern`
+-- specifies no captures, then the whole match is returned. A third, optional numerical argument
+-- `init` specifies where to start the search; its default value is 1 and can be negative.
function string.match(s, pattern [, init]) end
---
--- Returns a binary string containing the values `v1`, `v2`, etc. serialized in
--- binary form (packed) according to the format string `fmt` (see §6.4.2).
+-- Returns a binary string containing the values `v1`, `v2`, etc. serialized in binary form
+-- (packed) according to the format string `fmt` (see §6.4.2).
--
-- New in Lua 5.3.
function string.pack(fmt, v1, v2, ···) end
---
--- Returns the size of a string resulting from `string.pack` with the given
--- format. The format string cannot have the variable-length options 's' or 'z'
--- (see §6.4.2).
+-- Returns the size of a string resulting from `string.pack` with the given format. The format
+-- string cannot have the variable-length options 's' or 'z' (see §6.4.2).
--
-- New in Lua 5.3.
function string.packsize(fmt) end
---
--- Returns a string that is the concatenation of `n` copies of the string `s`
--- separated by the string `sep`. The default value for `sep` is the empty
--- string (that is, no separator). Returns the empty string if `n` is not
--- positive.
+-- Returns a string that is the concatenation of `n` copies of the string `s` separated by the
+-- string `sep`. The default value for `sep` is the empty string (that is, no separator). Returns
+-- the empty string if `n` is not positive.
--
--- (Note that it is very easy to exhaust the memory of your machine with a
--- single call to this function.)
+-- (Note that it is very easy to exhaust the memory of your machine with a single call to
+-- this function.)
function string.rep(s, n [, sep]) end
---
@@ -790,31 +716,28 @@ function string.rep(s, n [, sep]) end
function string.reverse(s) end
---
--- Returns the substring of `s` that starts at `i` and continues until
--- `j`; `i` and `j` can be negative. If `j` is absent, then it is assumed to
--- be equal to -1 (which is the same as the string length). In particular,
--- the call `string.sub(s,1,j)` returns a prefix of `s` with length `j`, and
--- `string.sub(s, -i)` returns a suffix of `s` with length `i`.
+-- Returns the substring of `s` that starts at `i` and continues until `j`; `i` and `j` can
+-- be negative. If `j` is absent, then it is assumed to be equal to -1 (which is the same as
+-- the string length). In particular, the call `string.sub(s,1,j)` returns a prefix of `s`
+-- with length `j`, and `string.sub(s, -i)` returns a suffix of `s` with length `i`.
--
--- If, after the translation of negative indices, `i` is less than 1, it is
--- corrected to 1. If `j` is greater than the string length, it is corrected to
--- that length. If, after these corrections, `i` is greater than `j`, the
--- function returns the empty string.
+-- If, after the translation of negative indices, `i` is less than 1, it is corrected to 1. If `j`
+-- is greater than the string length, it is corrected to that length. If, after these corrections,
+-- `i` is greater than `j`, the function returns the empty string.
function string.sub(s, i [, j]) end
---
--- Returns the values packed in string `s` (see `string.pack`) according to the
--- format string `fmt` (see §6.4.2). An optional `pos` marks where to start
--- reading in `s` (default is 1). After the read values, this function also
--- returns the index of the first unread byte in `s`.
+-- Returns the values packed in string `s` (see `string.pack`) according to the format string
+-- `fmt` (see §6.4.2). An optional `pos` marks where to start reading in `s` (default is
+-- 1). After the read values, this function also returns the index of the first unread byte in `s`.
--
-- New in Lua 5.3.
function string.unpack(fmt, s [, pos]) end
---
--- Receives a string and returns a copy of this string with all lowercase
--- letters changed to uppercase. All other characters are left unchanged. The
--- definition of what a lowercase letter is depends on the current locale.
+-- Receives a string and returns a copy of this string with all lowercase letters changed to
+-- uppercase. All other characters are left unchanged. The definition of what a lowercase letter
+-- is depends on the current locale.
function string.upper(s) end
---
@@ -822,16 +745,14 @@ function string.upper(s) end
-- @class table
-- @name utf8
-- @field charpattern (string)
--- The pattern (a string, not a function) "[\0-\x7F\xC2-\xFD][\x80-\xBF]*"
--- (see §6.4.1), which matches exactly one UTF-8 byte sequence, assuming that
--- the subject is a valid UTF-8 string.
+-- The pattern (a string, not a function) "[\0-\x7F\xC2-\xFD][\x80-\xBF]*" (see §6.4.1), which
+-- matches exactly one UTF-8 byte sequence, assuming that the subject is a valid UTF-8 string.
--
-- New in Lua 5.3.
---
--- Receives zero or more integers, converts each one to its corresponding UTF-8
--- byte sequence and returns a string with the concatenation of all these
--- sequences.
+-- Receives zero or more integers, converts each one to its corresponding UTF-8 byte sequence
+-- and returns a string with the concatenation of all these sequences.
--
-- New in Lua 5.3.
function utf8.char(···) end
@@ -841,58 +762,52 @@ function utf8.char(···) end
--
-- for p, c in utf8.codes(s) do *body* end
--
--- will iterate over all UTF-8 characters in string `s`, with `p` being the
--- position (in bytes) and `c` the code point of each character. It raises an
--- error if it meets any invalid byte sequence.
+-- will iterate over all UTF-8 characters in string `s`, with `p` being the position (in bytes) and
+-- `c` the code point of each character. It raises an error if it meets any invalid byte sequence.
--
--- This function only accepts valid sequences (well formed and not overlong).
--- By default, it only accepts byte sequences that result in valid Unicode code
--- points, rejecting values greater than `10FFFF` and surrogates. The boolean
--- argument `lax` lifts these checks, so that all values up to `0x7FFFFFFF` are
--- accepted. (Not well formed and overlong sequences are still rejected.)
+-- This function only accepts valid sequences (well formed and not overlong). By default, it only
+-- accepts byte sequences that result in valid Unicode code points, rejecting values greater than
+-- `10FFFF` and surrogates. The boolean argument `lax` lifts these checks, so that all values
+-- up to `0x7FFFFFFF` are accepted. (Not well formed and overlong sequences are still rejected.)
--
-- New in Lua 5.3.
function utf8.codes(s [, lax]) end
---
--- Returns the codepoints (as integers) from all characters in `s` that start
--- between byte position `i` and `j` (both included). The default for `i` is 1
--- and for `j` is `i`. It raises an error if it meets any invalid byte sequence.
+-- Returns the codepoints (as integers) from all characters in `s` that start between byte
+-- position `i` and `j` (both included). The default for `i` is 1 and for `j` is `i`. It raises
+-- an error if it meets any invalid byte sequence.
--
--- This function only accepts valid sequences (well formed and not overlong).
--- By default, it only accepts byte sequences that result in valid Unicode code
--- points, rejecting values greater than `10FFFF` and surrogates. The boolean
--- argument `lax` lifts these checks, so that all values up to `0x7FFFFFFF` are
--- accepted. (Not well formed and overlong sequences are still rejected.)
+-- This function only accepts valid sequences (well formed and not overlong). By default, it only
+-- accepts byte sequences that result in valid Unicode code points, rejecting values greater than
+-- `10FFFF` and surrogates. The boolean argument `lax` lifts these checks, so that all values
+-- up to `0x7FFFFFFF` are accepted. (Not well formed and overlong sequences are still rejected.)
--
-- New in Lua 5.3.
function utf8.codepoint(s [, i [, j [, lax]]]) end
---
--- Returns the number of UTF-8 characters in string `s` that start between
--- positions `i` and `j` (both inclusive). The default for `i` is 1 and for `j`
--- is -1. If it finds any invalid byte sequence, returns nil plus the position
--- of the first invalid byte.
+-- Returns the number of UTF-8 characters in string `s` that start between positions `i` and `j`
+-- (both inclusive). The default for `i` is 1 and for `j` is -1. If it finds any invalid byte
+-- sequence, returns nil plus the position of the first invalid byte.
--
--- This function only accepts valid sequences (well formed and not overlong).
--- By default, it only accepts byte sequences that result in valid Unicode code
--- points, rejecting values greater than `10FFFF` and surrogates. The boolean
--- argument `lax` lifts these checks, so that all values up to `0x7FFFFFFF` are
--- accepted. (Not well formed and overlong sequences are still rejected.)
+-- This function only accepts valid sequences (well formed and not overlong). By default, it only
+-- accepts byte sequences that result in valid Unicode code points, rejecting values greater than
+-- `10FFFF` and surrogates. The boolean argument `lax` lifts these checks, so that all values
+-- up to `0x7FFFFFFF` are accepted. (Not well formed and overlong sequences are still rejected.)
--
-- New in Lua 5.3.
function utf8.len(s [, i [, j [, lax]]]) end
---
--- Returns the position (in bytes) where the encoding of the `n`-th character of
--- `s` (counting from position `i`) starts. A negative `n` gets characters
--- before position `i`. The default for `i` is 1 when `n` is non-negative and
--- `#s + 1` otherwise, so that `utf8.offset(s, -n)` gets the offset of the
--- `n`-th character from the end of the string. If the specified character is
--- neither in the subject nor right after its end, the function returns nil.
+-- Returns the position (in bytes) where the encoding of the `n`-th character of `s` (counting
+-- from position `i`) starts. A negative `n` gets characters before position `i`. The default
+-- for `i` is 1 when `n` is non-negative and `#s + 1` otherwise, so that `utf8.offset(s, -n)`
+-- gets the offset of the `n`-th character from the end of the string. If the specified character
+-- is neither in the subject nor right after its end, the function returns nil.
--
--- As a special case, when `n` is 0 the function returns the start of the
--- encoding of the character that contains the `i`-th byte of `s`.
+-- As a special case, when `n` is 0 the function returns the start of the encoding of the
+-- character that contains the `i`-th byte of `s`.
--
-- This function assumes that `s` is a valid UTF-8 string.
--
@@ -901,31 +816,29 @@ function utf8.offset(s, n [, i]) end
---
-- Given a list where all elements are strings or numbers, returns the string
--- `list[i]..sep..list[i+1] ··· sep..list[j]`. The default value for `sep` is
--- the empty string, the default for `i` is 1, and the default for `j` is
--- `#list`. If `i` is greater than `j`, returns the empty string.
+-- `list[i]..sep..list[i+1] ··· sep..list[j]`. The default value for `sep` is the empty
+-- string, the default for `i` is 1, and the default for `j` is `#list`. If `i` is greater than
+-- `j`, returns the empty string.
function table.concat(list [, sep [, i [, j]]]) end
---
--- Inserts element `value` at position `pos` in `list`, shifting up the elements
--- `list[pos], list[pos+1], ···, list[#list]`. The default value for `pos` is
--- `#list+1`, so that a call `table.insert(t,x)` inserts `x` at the end of the
--- list `t`.
+-- Inserts element `value` at position `pos` in `list`, shifting up the elements `list[pos],
+-- list[pos+1], ···, list[#list]`. The default value for `pos` is `#list+1`, so that a call
+-- `table.insert(t,x)` inserts `x` at the end of the list `t`.
function table.insert(list, [pos,] value) end
---
--- Returns the largest positive numerical index of the given table, or zero if
--- the table has no positive numerical indices. (To do its job this function
--- does a linear traversal of the whole table.)
+-- Returns the largest positive numerical index of the given table, or zero if the table has
+-- no positive numerical indices. (To do its job this function does a linear traversal of the
+-- whole table.)
--
-- Deprecated in Lua 5.2.
function table.maxn(table) end
---
--- Moves elements from the table `a1` to the table `a2`, performing the
--- equivalent to the following multiple assignment: `a2[t], ··· = a1[f], ···,
--- a1[e]`. The default for `a2` is `a1`. The destination range can overlap with
--- the source range. Index `f` must be positive.
+-- Moves elements from the table `a1` to the table `a2`, performing the equivalent to the
+-- following multiple assignment: `a2[t], ··· = a1[f], ···, a1[e]`. The default for `a2`
+-- is `a1`. The destination range can overlap with the source range. Index `f` must be positive.
--
-- Returns the destination table `a2`.
--
@@ -933,39 +846,35 @@ function table.maxn(table) end
function table.move(a1, f, e, t [,a2]) end
---
--- Returns a new table with all parameters stored into keys 1, 2, etc. and with
--- a field "`n`" with the total number of parameters. Note that the resulting
--- table may not be a sequence, if some arguments are nil.
+-- Returns a new table with all parameters stored into keys 1, 2, etc. and with a field "`n`"
+-- with the total number of parameters. Note that the resulting table may not be a sequence,
+-- if some arguments are nil.
--
-- New in Lua 5.2.
function table.pack(···) end
---
--- Removes from `list` the element at position `pos`, returning the value of the
--- removed element. When `pos` is an integer between 1 and `#list`, it shifts
--- down the elements `list[pos+1], list[pos+2], ···, list[#list]` and erases
--- element `list[#list]`; The index `pos` can also be 0 when `#list` is 0, or
--- `#list + 1`.
+-- Removes from `list` the element at position `pos`, returning the value of the removed
+-- element. When `pos` is an integer between 1 and `#list`, it shifts down the elements
+-- `list[pos+1], list[pos+2], ···, list[#list]` and erases element `list[#list]`; The index
+-- `pos` can also be 0 when `#list` is 0, or `#list + 1`.
--
--- The default value for `pos` is `#list`, so that a call `table.remove(l)`
--- removes the last element of the list `l`.
+-- The default value for `pos` is `#list`, so that a call `table.remove(l)` removes the last
+-- element of the list `l`.
function table.remove(list [, pos]) end
---
--- Sorts the list elements in a given order, *in-place*, from `list[1]` to
--- `list[#list]`. If `comp` is given, then it must be a function that receives
--- two list elements and returns true when the first element must come before
--- the second in the final order (so that, after the sort, `i < j` implies
--- `not comp(list[j],list[i])` will be true after the sort). If `comp` is not
--- given, then the standard Lua operator `<` is used instead.
+-- Sorts the list elements in a given order, *in-place*, from `list[1]` to `list[#list]`. If
+-- `comp` is given, then it must be a function that receives two list elements and returns true
+-- when the first element must come before the second in the final order (so that, after the
+-- sort, `i < j` implies `not comp(list[j],list[i])` will be true after the sort). If `comp`
+-- is not given, then the standard Lua operator `<` is used instead.
--
--- Note that the `comp` function must not define a string partial order over the
--- elements in the list; that is, it must be asymmetric and transitive.
--- Otherwise, no valid sort may be possible.
+-- Note that the `comp` function must not define a string partial order over the elements in the
+-- list; that is, it must be asymmetric and transitive. Otherwise, no valid sort may be possible.
--
--- The sort algorithm is not stable; that is, elements not comparable by the
--- given order (e.g., equal elements) may have their relative positions changed
--- by the sort.
+-- The sort algorithm is not stable; that is, elements not comparable by the given order (e.g.,
+-- equal elements) may have their relative positions changed by the sort.
function table.sort(list [, comp]) end
---
@@ -1009,18 +918,15 @@ function math.acos(x) end
function math.asin(x) end
---
--- Returns the arc tangent of `y/x` (in radians), but uses the signs
--- of both parameters to find the quadrant of the result. It also handles
--- correctly the case of `x` being zero.
+-- Returns the arc tangent of `y/x` (in radians), but uses the signs of both parameters to find
+-- the quadrant of the result. It also handles correctly the case of `x` being zero.
--
--- The default value for `x` is 1, so that the call `math.atan(y)` returns the
--- arc tangent of `y`.
+-- The default value for `x` is 1, so that the call `math.atan(y)` returns the arc tangent of `y`.
function math.atan(y [, x]) end
---
--- Returns the arc tangent of `y/x` (in radians), but uses the signs
--- of both parameters to find the quadrant of the result. (It also handles
--- correctly the case of `x` being zero.)
+-- Returns the arc tangent of `y/x` (in radians), but uses the signs of both parameters to find
+-- the quadrant of the result. (It also handles correctly the case of `x` being zero.)
--
-- Deprecated in Lua 5.3.
function math.atan2(y, x) end
@@ -1052,13 +958,13 @@ function math.exp(x) end
function math.floor(x) end
---
--- Returns the remainder of the division of `x` by `y` that rounds the
--- quotient towards zero. (integer/float)
+-- Returns the remainder of the division of `x` by `y` that rounds the quotient towards
+-- zero. (integer/float)
function math.fmod(x, y) end
---
--- Returns `m` and `e` such that 'x = m2^e', `e` is an integer and the
--- absolute value of `m` is in the range *[0.5, 1)* (or zero when `x` is zero).
+-- Returns `m` and `e` such that 'x = m2^e', `e` is an integer and the absolute value of `m`
+-- is in the range *[0.5, 1)* (or zero when `x` is zero).
--
-- Deprecated in Lua 5.3.
function math.frexp(x) end
@@ -1070,8 +976,8 @@ function math.frexp(x) end
function math.ldexp(m, e) end
---
--- Returns the logarithm of `x` in the given base. The default for `base` is 'e'
--- (so that the function returns the natural logarithm of `x`).
+-- Returns the logarithm of `x` in the given base. The default for `base` is 'e' (so that the
+-- function returns the natural logarithm of `x`).
function math.log(x [, base]) end
---
@@ -1081,23 +987,20 @@ function math.log(x [, base]) end
function math.log10(x) end
---
--- Returns the argument with the maximum value, according to the Lua operator
--- `<`.
+-- Returns the argument with the maximum value, according to the Lua operator `<`.
function math.max(x, ···) end
---
--- Returns the argument with the minimum value, according to the Lua operator
--- `<`.
+-- Returns the argument with the minimum value, according to the Lua operator `<`.
function math.min(x, ···) end
---
--- Returns the integral part of `x` and the fractional part of `x`. Its second
--- result is always a float.
+-- Returns the integral part of `x` and the fractional part of `x`. Its second result is always
+-- a float.
function math.modf(x) end
---
--- Returns *x^y*. (You can also use the expression `x^y` to compute this
--- value.)
+-- Returns *x^y*. (You can also use the expression `x^y` to compute this value.)
--
-- Deprecated in Lua 5.3.
function math.pow(x, y) end
@@ -1107,37 +1010,34 @@ function math.pow(x, y) end
function math.rad(x) end
---
--- When called without arguments, returns a pseudo-random float with uniform
--- distribution in the range [0,1). When called with two integers `m` and `n`,
--- `math.random` returns a pseudo-random integer with uniform distribution in
--- the range `[m, n]. The call `math.random(n)`, for a positive `n`, is
--- equivalent to `math.random(1,n)`. The call `math.random(0)` produces an
+-- When called without arguments, returns a pseudo-random float with uniform distribution in the
+-- range [0,1). When called with two integers `m` and `n`, `math.random` returns a pseudo-random
+-- integer with uniform distribution in the range `[m, n]. The call `math.random(n)`, for a
+-- positive `n`, is equivalent to `math.random(1,n)`. The call `math.random(0)` produces an
-- integer with all bits (pseudo)random.
--
--- This function uses the `xoshiro256**` algorithm to produce pseudo-random
--- 64-bit integers, which are the results of calls with argument 0. Other
--- results (ranges and floats) are unbiased extracted from these integers.
+-- This function uses the `xoshiro256**` algorithm to produce pseudo-random 64-bit integers,
+-- which are the results of calls with argument 0. Other results (ranges and floats) are unbiased
+-- extracted from these integers.
--
--- Lua initializes its pseudo-random generator with the equivalent of a call to
--- `math.randomseed` with no arguments, so that `math.random` should generate
--- different sequences of results each time the program runs.
+-- Lua initializes its pseudo-random generator with the equivalent of a call to `math.randomseed`
+-- with no arguments, so that `math.random` should generate different sequences of results each
+-- time the program runs.
function math.random([m [, n]]) end
---
--- When called with at least one argument, the integer parameters `x` and `y`
--- are joined into a 128-bit *seed* that is used to reinitialize the
--- pseudo-random generator; equal seeds produce equal sequences of numbers. The
--- default for `y` is zero.
+-- When called with at least one argument, the integer parameters `x` and `y` are joined into a
+-- 128-bit *seed* that is used to reinitialize the pseudo-random generator; equal seeds produce
+-- equal sequences of numbers. The default for `y` is zero.
--
--- When called with no arguments, Lua generates a seed with a weak attempt for
--- randomness.
+-- When called with no arguments, Lua generates a seed with a weak attempt for randomness.
--
--- This function returns the two seed components that were effectively used, so
--- that setting them again repeats the sequence.
+-- This function returns the two seed components that were effectively used, so that setting
+-- them again repeats the sequence.
--
--- To ensure a required level of randomness to the initial state (or contrarily,
--- to have a deterministic sequence, for instance when debugging a program), you
--- should call `math.randomseed` with explicit arguments.
+-- To ensure a required level of randomness to the initial state (or contrarily, to have
+-- a deterministic sequence, for instance when debugging a program), you should call
+-- `math.randomseed` with explicit arguments.
function math.randomseed([x [, y]]) end
---
@@ -1151,8 +1051,7 @@ function math.sin(x) end
function math.sinh(x) end
---
--- Returns the square root of `x`. (You can also use the expression `x^0.5`
--- to compute this value.)
+-- Returns the square root of `x`. (You can also use the expression `x^0.5` to compute this value.)
function math.sqrt(x) end
---
@@ -1166,101 +1065,88 @@ function math.tan(x) end
function math.tanh(x) end
---
--- If the value `x` is convertible to an integer, returns that integer.
--- Otherwise, returns nil.
+-- If the value `x` is convertible to an integer, returns that integer. Otherwise, returns nil.
--
-- New in Lua 5.3.
function math.tointeger(x) end
---
--- Returns "integer" if `x` is an integer, "float" if it is a float, or nil if
--- x is not a number.
+-- Returns "integer" if `x` is an integer, "float" if it is a float, or nil if x is not a number.
--
-- New in Lua 5.3.
function math.type(x) end
---
--- Returns a boolean, true if integer `m` is below integer `n` when they are
--- compared as unsigned integers.
+-- Returns a boolean, true if integer `m` is below integer `n` when they are compared as
+-- unsigned integers.
--
-- New in Lua 5.3.
function math.ult(m, n) end
---
--- Returns the number `x` shifted `disp` bits to the right. The number `disp`
--- may be any representable integer. Negative displacements shift to the left.
+-- Returns the number `x` shifted `disp` bits to the right. The number `disp` may be any
+-- representable integer. Negative displacements shift to the left.
--
--- This shift operation is what is called arithmetic shift. Vacant bits on the
--- left are filled with copies of the higher bit of `x`; vacant bits on the
--- right are filled with zeros. In particular, displacements with absolute
--- values higher than 31 result in zero or `0xFFFFFFFF` (all original bits are
--- shifted out).
+-- This shift operation is what is called arithmetic shift. Vacant bits on the left are filled
+-- with copies of the higher bit of `x`; vacant bits on the right are filled with zeros. In
+-- particular, displacements with absolute values higher than 31 result in zero or `0xFFFFFFFF`
+-- (all original bits are shifted out).
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.arshift(x, disp) end
---
-- Returns the bitwise "and" of its operands.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.band(...) end
---
--- Returns the bitwise negation of `x`. For any integer `x`, the following
--- identity holds:
+-- Returns the bitwise negation of `x`. For any integer `x`, the following identity holds:
--
-- assert(bit32.bnot(x) == (-1 - x) % 2^32)
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.bnot(x) end
---
-- Returns the bitwise "or" of its operands.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.bor(...) end
---
--- Returns a boolean signaling whether the bitwise "and" of its operands is
--- different from zero.
+-- Returns a boolean signaling whether the bitwise "and" of its operands is different from zero.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.btest(...) end
---
-- Returns the bitwise "exclusive or" of its operands.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.xor(...) end
---
--- Returns the unsigned number formed by the bits `field` to `field + width - 1`
--- from `n`. Bits are numbered from 0 (least significant) to 31 (most
--- significant). All accessed bits must be in the range [0, 31].
+-- Returns the unsigned number formed by the bits `field` to `field + width - 1` from `n`. Bits
+-- are numbered from 0 (least significant) to 31 (most significant). All accessed bits must be
+-- in the range [0, 31].
--
-- The default for `width` is 1.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.extract(n, field [, width]) end
---
--- Returns a copy of `n` with the bits `field` to `field + width - 1` replaced
--- by the value `v`. See `bit32.extract` for details about `field` and `width`.
+-- Returns a copy of `n` with the bits `field` to `field + width - 1` replaced by the value
+-- `v`. See `bit32.extract` for details about `field` and `width`.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.replace(n, v, field [, width]) end
---
--- Returns the number `x` rotated `disp` bits to the left. The number `disp` may
--- be any representable integer.
+-- Returns the number `x` rotated `disp` bits to the left. The number `disp` may be any
+-- representable integer.
--
-- For any valid displacement, the following identity holds:
--
@@ -1268,28 +1154,25 @@ function bit32.replace(n, v, field [, width]) end
--
-- In particular, negative displacements rotate to the right.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.lrotate(x, disp) end
---
--- Returns the number `x` shifted `disp` bits to the left. The number `disp` may
--- be any representable integer. Negative displacements shift to the right. In
--- any direction, vacant bits are filled with zeros. In particular,
--- displacements with absolute values higher than 31 result in zero (all bits
--- are shifted out).
+-- Returns the number `x` shifted `disp` bits to the left. The number `disp` may be any
+-- representable integer. Negative displacements shift to the right. In any direction, vacant
+-- bits are filled with zeros. In particular, displacements with absolute values higher than
+-- 31 result in zero (all bits are shifted out).
--
-- For positive displacements, the following equality holds:
--
-- assert(bit32.lshift(b, disp) == (b * 2^disp) % 2^32)
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.lshift(x, disp) end
---
--- Returns the number `x` rotated `disp` bits to the right. The number `disp`
--- may be any representable integer.
+-- Returns the number `x` rotated `disp` bits to the right. The number `disp` may be any
+-- representable integer.
--
-- For any valid displacement, the following identity holds:
--
@@ -1297,16 +1180,14 @@ function bit32.lshift(x, disp) end
--
-- In particular, negative displacements rotate to the left.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.rrotate(x, disp) end
---
--- Returns the number `x` shifted `disp` bits to the right. The number `disp`
--- may be any representable integer. Negative displacements shift to the left.
--- In any direction, vacant bits are filled with zeros. In particular,
--- displacements with absolute values higher than 31 result in zero (all bits
--- are shifted out).
+-- Returns the number `x` shifted `disp` bits to the right. The number `disp` may be any
+-- representable integer. Negative displacements shift to the left. In any direction, vacant
+-- bits are filled with zeros. In particular, displacements with absolute values higher than
+-- 31 result in zero (all bits are shifted out).
--
-- For positive displacements, the following equality holds:
--
@@ -1314,8 +1195,7 @@ function bit32.rrotate(x, disp) end
--
-- This shift operation is what is called logical shift.
--
--- New in Lua 5.2.
--- Deprecated in Lua 5.3.
+-- New in Lua 5.2. Deprecated in Lua 5.3.
function bit32.rshift(x, disp) end
---
@@ -1331,8 +1211,7 @@ function bit32.rshift(x, disp) end
local io
---
--- Equivalent to `file:close()`. Without a `file`, closes the default
--- output file.
+-- Equivalent to `file:close()`. Without a `file`, closes the default output file.
function io.close([file]) end
---
@@ -1340,47 +1219,44 @@ function io.close([file]) end
function io.flush() end
---
--- When called with a file name, it opens the named file (in text mode),
--- and sets its handle as the default input file. When called with a file
--- handle, it simply sets this file handle as the default input file. When
--- called without parameters, it returns the current default input file.
+-- When called with a file name, it opens the named file (in text mode), and sets its handle as
+-- the default input file. When called with a file handle, it simply sets this file handle as the
+-- default input file. When called without parameters, it returns the current default input file.
--
--- In case of errors this function raises the error, instead of returning an
--- error code.
+-- In case of errors this function raises the error, instead of returning an error code.
function io.input([file]) end
---
--- Opens the given file name in read mode and returns an iterator function that
--- works like `file:lines(···)` over the opened file. When the iterator function
--- fails to read any value, it automatically closes the file. Besides the
--- iterator function, `io.lines` returns three other values: two nil values as
--- placeholders, plus the created file handle. Therefore, when used in a generic
--- for loop, the file is closed also if the loop is interrupted by an error or a
--- `break`.
+-- Opens the given file name in read mode and returns an iterator function that works like
+-- `file:lines(···)` over the opened file. When the iterator function fails to read any value,
+-- it automatically closes the file. Besides the iterator function, `io.lines` returns three other
+-- values: two nil values as placeholders, plus the created file handle. Therefore, when used in
+-- a generic for loop, the file is closed also if the loop is interrupted by an error or a `break`.
--
--- The call `io.lines()` (with no file name) is equivalent to
--- `io.input():lines("l")`; that is, it iterates over the lines of the default
--- input file. In this case it does not close the file when the loop ends.
+-- The call `io.lines()` (with no file name) is equivalent to `io.input():lines("l")`; that is,
+-- it iterates over the lines of the default input file. In this case it does not close the
+-- file when the loop ends.
--
--- In case of errors opening the file, this function raises the error, instead
--- of returning an error code.
+-- In case of errors opening the file, this function raises the error, instead of returning an
+-- error code.
function io.lines([filename, ···]) end
---
--- This function opens a file, in the mode specified in the string `mode`. It
--- returns a new file handle, or, in case of errors, nil plus an error message.
+-- This function opens a file, in the mode specified in the string `mode`. It returns a new
+-- file handle, or, in case of errors, nil plus an error message.
--
-- The `mode` string can be any of the following:
--- "r": read mode (the default);
--- "w": write mode;
--- "a": append mode;
--- "r+": update mode, all previous data is preserved;
--- "w+": update mode, all previous data is erased;
--- "a+": append update mode, previous data is preserved, writing is only
--- allowed at the end of file.
---
--- The `mode` string can also have a '`b`' at the end, which is needed in
--- some systems to open the file in binary mode.
+--
+-- * "r": read mode (the default);
+-- * "w": write mode;
+-- * "a": append mode;
+-- * "r+": update mode, all previous data is preserved;
+-- * "w+": update mode, all previous data is erased;
+-- * "a+": append update mode, previous data is preserved, writing is only allowed at the
+-- end of file.
+--
+-- The `mode` string can also have a '`b`' at the end, which is needed in some systems to open
+-- the file in binary mode.
function io.open(filename [, mode]) end
---
@@ -1388,9 +1264,9 @@ function io.open(filename [, mode]) end
function io.output([file]) end
---
--- Starts the program `prog` in a separated process and returns a file handle
--- that you can use to read data from this program (if `mode` is `"r"`,
--- the default) or to write data to this program (if `mode` is `"w"`).
+-- Starts the program `prog` in a separated process and returns a file handle that you can use
+-- to read data from this program (if `mode` is `"r"`, the default) or to write data to this
+-- program (if `mode` is `"w"`).
--
-- This function is system dependent and is not available on all platforms.
function io.popen(prog [, mode]) end
@@ -1400,14 +1276,14 @@ function io.popen(prog [, mode]) end
function io.read(···) end
---
--- In case of success, returns a handle for a temporary file. This file is
--- opened in update mode and it is automatically removed when the program ends.
+-- In case of success, returns a handle for a temporary file. This file is opened in update
+-- mode and it is automatically removed when the program ends.
function io.tmpfile() end
---
--- Checks whether `obj` is a valid file handle. Returns the string `"file"`
--- if `obj` is an open file handle, `"closed file"` if `obj` is a closed file
--- handle, or nil if `obj` is not a file handle.
+-- Checks whether `obj` is a valid file handle. Returns the string `"file"` if `obj` is an
+-- open file handle, `"closed file"` if `obj` is a closed file handle, or nil if `obj` is not
+-- a file handle.
function io.type(obj) end
---
@@ -1415,12 +1291,11 @@ function io.type(obj) end
function io.write(···) end
---
--- Closes `file`. Note that files are automatically closed when their
--- handles are garbage collected, but that takes an unpredictable amount of
--- time to happen.
+-- Closes `file`. Note that files are automatically closed when their handles are garbage
+-- collected, but that takes an unpredictable amount of time to happen.
--
--- When closing a file handle created with `io.popen`, `file:close` returns the
--- same values returned by `os.execute`.
+-- When closing a file handle created with `io.popen`, `file:close` returns the same values
+-- returned by `os.execute`.
function file:close() end
---
@@ -1428,228 +1303,210 @@ function file:close() end
function file:flush() end
---
--- Returns an iterator function that, each time it is called, reads the file
--- according to the given formats. When no format is given, uses "l" as a
--- default. As an example, the construction
+-- Returns an iterator function that, each time it is called, reads the file according to the
+-- given formats. When no format is given, uses "l" as a default. As an example, the construction
--
-- for c in file:lines(1) do *body* end
--
--- will iterate over all characters of the file, starting at the current
--- position. Unlike `io.lines`, this function does not close the file when the
--- loop ends.
+-- will iterate over all characters of the file, starting at the current position. Unlike
+-- `io.lines`, this function does not close the file when the loop ends.
function file:lines(···) end
---
--- Reads the file `file`, according to the given formats, which specify
--- what to read. For each format, the function returns a string or a number
--- with the characters read, or nil if it cannot read data with the specified
--- format. (In this latter case, the function does not read subsequent formats.)
--- When called without arguments, it uses a default format that reads the next
--- line (see below).
+-- Reads the file `file`, according to the given formats, which specify what to read. For each
+-- format, the function returns a string or a number with the characters read, or nil if it
+-- cannot read data with the specified format. (In this latter case, the function does not read
+-- subsequent formats.) When called without arguments, it uses a default format that reads
+-- the next line (see below).
--
-- The available formats are
--- "n": reads a numeral and returns it as a float or an integer, following the
--- lexical conventions of Lua. (The numeral may have leading whitespaces
--- and a sign.) This format always reads the longest input sequence that
--- is a valid prefix for a number; if that prefix does not form a valid
--- number (e.g., an empty string, "0x", or "3.4e-") or it is too long
--- (more than 200 characters), it is discarded and the format returns
--- nil.
--- "a": reads the whole file, starting at the current position. On end of
--- file, it returns the empty string; this format never fails.
--- "l": reads the next line skipping the end of line, returning nil on
--- end of file. This is the default format.
--- "L": reads the next line keeping the end-of-line character (if present),
--- returning nil on end of file.
--- *number*: reads a string with up to this number of bytes, returning nil on
--- end of file. If *number* is zero, it reads nothing and returns an
--- empty string, or nil on end of file.
+--
+-- * "n": reads a numeral and returns it as a float or an integer, following the lexical
+-- conventions of Lua. (The numeral may have leading whitespaces and a sign.) This format
+-- always reads the longest input sequence that is a valid prefix for a number; if that
+-- prefix does not form a valid number (e.g., an empty string, "0x", or "3.4e-") or it is
+-- too long (more than 200 characters), it is discarded and the format returns nil.
+-- * "a": reads the whole file, starting at the current position. On end of file, it returns
+-- the empty string; this format never fails.
+-- * "l": reads the next line skipping the end of line, returning nil on end of file. This
+-- is the default format.
+-- * "L": reads the next line keeping the end-of-line character (if present), returning nil
+-- on end of file.
+-- * *number*: reads a string with up to this number of bytes, returning nil on end of file. If
+-- *number* is zero, it reads nothing and returns an empty string, or nil on end of file.
--
-- The formats "l" and "L" should be used only for text files.
function file:read(···) end
---
--- Sets and gets the file position, measured from the beginning of the
--- file, to the position given by `offset` plus a base specified by the string
--- `whence`, as follows:
--- "set": base is position 0 (beginning of the file);
--- "cur": base is current position;
--- "end": base is end of file;
+-- Sets and gets the file position, measured from the beginning of the file, to the position
+-- given by `offset` plus a base specified by the string `whence`, as follows:
--
--- In case of success, function `seek` returns the final file position,
--- measured in bytes from the beginning of the file. If `seek` fails, it returns
--- nil, plus a string describing the error.
+-- * "set": base is position 0 (beginning of the file);
+-- * "cur": base is current position;
+-- * "end": base is end of file;
--
--- The default value for `whence` is `"cur"`, and for `offset` is 0. Therefore,
--- the call `file:seek()` returns the current file position, without changing
--- it; the call `file:seek("set")` sets the position to the beginning of the
--- file (and returns 0); and the call `file:seek("end")` sets the position
--- to the end of the file, and returns its size.
+-- In case of success, function `seek` returns the final file position, measured in bytes from
+-- the beginning of the file. If `seek` fails, it returns nil, plus a string describing the error.
+--
+-- The default value for `whence` is `"cur"`, and for `offset` is 0. Therefore, the
+-- call `file:seek()` returns the current file position, without changing it; the call
+-- `file:seek("set")` sets the position to the beginning of the file (and returns 0); and the
+-- call `file:seek("end")` sets the position to the end of the file, and returns its size.
function file:seek([whence [, offset]]) end
---
-- Sets the buffering mode for a file. There are three available modes:
--- "no": no buffering
--- "full": full buffering
--- "line": line buffering
--
--- For the last two cases, `size` is a hint for the size of the buffer, in
--- bytes. The default is an appropriate size.
+-- * "no": no buffering
+-- * "full": full buffering
+-- * "line": line buffering
+--
+-- For the last two cases, `size` is a hint for the size of the buffer, in bytes. The default
+-- is an appropriate size.
--
--- The specific behavior of each mode is non portable; check the underlying
--- ISO C function `setvbuf` in your platform for more details.
+-- The specific behavior of each mode is non portable; check the underlying ISO C function
+-- `setvbuf` in your platform for more details.
function file:setvbuf(mode [, size]) end
---
--- Writes the value of each of its arguments to `file`. The arguments must be
--- strings or numbers.
+-- Writes the value of each of its arguments to `file`. The arguments must be strings or numbers.
--
--- In case of success, this function returns `file`. Otherwise it returns nil
--- plus a string describing the error.
+-- In case of success, this function returns `file`. Otherwise it returns nil plus a string
+-- describing the error.
function file:write(···) end
---
--- Returns an approximation of the amount in seconds of CPU time used by
--- the program, as returned by the underlying ISO C function `clock`.
+-- Returns an approximation of the amount in seconds of CPU time used by the program, as returned
+-- by the underlying ISO C function `clock`.
function os.clock() end
---
--- Returns a string or a table containing date and time, formatted according
--- to the given string `format`.
+-- Returns a string or a table containing date and time, formatted according to the given string
+-- `format`.
--
--- If the `time` argument is present, this is the time to be formatted
--- (see the `os.time` function for a description of this value). Otherwise,
--- `date` formats the current time.
+-- If the `time` argument is present, this is the time to be formatted (see the `os.time`
+-- function for a description of this value). Otherwise, `date` formats the current time.
--
--- If `format` starts with '`!`', then the date is formatted in Coordinated
--- Universal Time. After this optional character, if `format` is the string
--- "`*t`", then `date` returns a table with the following fields: `year`,
--- `month` (1-12), `day` (1-31), `hour` (0-23), `min` (0-59), `sec` (0-61, due
--- to leap seconds), `wday` (weekday, 1-7, Sunday is 1), `yday` (day of the
--- year, 1-366), and `isdst` (daylight saving flag, a boolean). This last field
--- may be absent if the information is not available.
+-- If `format` starts with '`!`', then the date is formatted in Coordinated Universal Time. After
+-- this optional character, if `format` is the string "`*t`", then `date` returns a table with
+-- the following fields: `year`, `month` (1-12), `day` (1-31), `hour` (0-23), `min` (0-59),
+-- `sec` (0-61, due to leap seconds), `wday` (weekday, 1-7, Sunday is 1), `yday` (day of the
+-- year, 1-366), and `isdst` (daylight saving flag, a boolean). This last field may be absent
+-- if the information is not available.
--
--- If `format` is not "`*t`", then `date` returns the date as a string,
--- formatted according to the same rules as the ISO C function `strftime`.
+-- If `format` is not "`*t`", then `date` returns the date as a string, formatted according to
+-- the same rules as the ISO C function `strftime`.
--
--- If `format` is absent, it defaults to "`%c`", which gives a human-readable
--- date and time representation using the current locale.
+-- If `format` is absent, it defaults to "`%c`", which gives a human-readable date and time
+-- representation using the current locale.
--
--- On non-POSIX systems, this function may be not thread safe because of its
--- reliance on C function `gmtime` and C function `localtime`.
+-- On non-POSIX systems, this function may be not thread safe because of its reliance on C
+-- function `gmtime` and C function `localtime`.
function os.date([format [, time]]) end
---
--- Returns the difference, in seconds, from time `t1` to time `t2` (where the
--- times are values returned by `os.time`). In POSIX, Windows, and some other
--- systems, this value is exactly `t2`*-*`t1`.
+-- Returns the difference, in seconds, from time `t1` to time `t2` (where the times are values
+-- returned by `os.time`). In POSIX, Windows, and some other systems, this value is exactly
+-- `t2`*-*`t1`.
function os.difftime(t2, t1) end
---
--- This function is equivalent to the ISO C function `system`. It passes
--- `command` to be executed by an operating system shell. Its first result is
--- `true` if the command terminated successfully, or `nil` otherwise. After this
--- first result the function returns a string plus a number, as follows:
--- "exit": the command terminated normally; the following number is the exit
--- status of the command.
--- "signal": the command was terminated by a signal; the following number is
--- the signal that terminated the command.
+-- This function is equivalent to the ISO C function `system`. It passes `command` to be
+-- executed by an operating system shell. Its first result is `true` if the command terminated
+-- successfully, or `nil` otherwise. After this first result the function returns a string plus
+-- a number, as follows:
--
--- When called without a `command`, `os.execute` returns a boolean that is true
--- if a shell is available.
+-- * "exit": the command terminated normally; the following number is the exit status of
+-- the command.
+-- * "signal": the command was terminated by a signal; the following number is the signal
+-- that terminated the command.
+--
+-- When called without a `command`, `os.execute` returns a boolean that is true if a shell
+-- is available.
function os.execute([command]) end
---
--- Calls the ISO C function `exit` to terminate the host program. If `code` is
--- `true`, the returned status is `EXIT_SUCCESS`; if `code` is `false`, the
--- returned status is `EXIT_FAILURE`; if `code` is a number, the returned status
--- is this number. The default value for `code` is `true`.
+-- Calls the ISO C function `exit` to terminate the host program. If `code` is `true`, the returned
+-- status is `EXIT_SUCCESS`; if `code` is `false`, the returned status is `EXIT_FAILURE`; if
+-- `code` is a number, the returned status is this number. The default value for `code` is `true`.
--
--- If the optional second argument `close` is true, closes the Lua state before
--- exiting.
+-- If the optional second argument `close` is true, closes the Lua state before exiting.
function os.exit([code [, close]]) end
---
--- Returns the value of the process environment variable `varname`, or
--- nil if the variable is not defined.
+-- Returns the value of the process environment variable `varname`, or nil if the variable is
+-- not defined.
function os.getenv(varname) end
---
--- Deletes the file (or empty directory, on POSIX systems) with the given name.
--- If this function fails, it returns nil, plus a string describing the error
--- and the error code.
+-- Deletes the file (or empty directory, on POSIX systems) with the given name. If this function
+-- fails, it returns nil, plus a string describing the error and the error code.
function os.remove(filename) end
---
--- Renames file or directory named `oldname` to `newname`. If this function
--- fails, it returns nil, plus a string describing the error and the error code.
+-- Renames file or directory named `oldname` to `newname`. If this function fails, it returns
+-- nil, plus a string describing the error and the error code.
function os.rename(oldname, newname) end
---
--- Sets the current locale of the program. `locale` is a system-dependent string
--- specifying a locale; `category` is an optional string describing which
--- category to change: `"all"`, `"collate"`, `"ctype"`, `"monetary"`,
--- `"numeric"`, or `"time"`; the default category is `"all"`. The function
--- returns the name of the new locale, or nil if the request cannot be honored.
+-- Sets the current locale of the program. `locale` is a system-dependent string specifying
+-- a locale; `category` is an optional string describing which category to change: `"all"`,
+-- `"collate"`, `"ctype"`, `"monetary"`, `"numeric"`, or `"time"`; the default category is
+-- `"all"`. The function returns the name of the new locale, or nil if the request cannot
+-- be honored.
--
--- If `locale` is the empty string, the current locale is set to an
--- implementation-defined native locale. If `locale` is the string "`C`",
--- the current locale is set to the standard C locale.
+-- If `locale` is the empty string, the current locale is set to an implementation-defined native
+-- locale. If `locale` is the string "`C`", the current locale is set to the standard C locale.
--
--- When called with nil as the first argument, this function only returns
--- the name of the current locale for the given category.
+-- When called with nil as the first argument, this function only returns the name of the
+-- current locale for the given category.
--
--- This function may not be thread safe because of its reliance on C function
--- `setlocale`.
+-- This function may not be thread safe because of its reliance on C function `setlocale`.
function os.setlocale(locale [, category]) end
---
--- Returns the current time when called without arguments, or a time
--- representing the date and time specified by the given table. This table
--- must have fields `year`, `month`, and `day`, and may have fields `hour`
--- (default is 12), `min` (default is 0), `sec` (default is 0), and `isdst`
--- (default is nil). For a description of these fields, see the `os.date`
--- function.
+-- Returns the current time when called without arguments, or a time representing the date and
+-- time specified by the given table. This table must have fields `year`, `month`, and `day`,
+-- and may have fields `hour` (default is 12), `min` (default is 0), `sec` (default is 0), and
+-- `isdst` (default is nil). For a description of these fields, see the `os.date` function.
--
--- When the function is called, the values in these fields do not need to be
--- inside their valid ranges. For instance, if `sec` is -10, it means 10 seconds
--- before the time specified by the other fields; if `hour` is 1000, it means
--- 1000 hours after the time specified by the other fields.
+-- When the function is called, the values in these fields do not need to be inside their
+-- valid ranges. For instance, if `sec` is -10, it means 10 seconds before the time specified
+-- by the other fields; if `hour` is 1000, it means 1000 hours after the time specified by the
+-- other fields.
--
--- The returned value is a number, whose meaning depends on your system. In
--- POSIX, Windows, and some other systems, this number counts the number of
--- seconds since some given start time (the "epoch"). In other systems, the
--- meaning is not specified, and the number returned by `time` can be used only
--- as an argument to `os.date` and `os.difftime`.
+-- The returned value is a number, whose meaning depends on your system. In POSIX, Windows,
+-- and some other systems, this number counts the number of seconds since some given start time
+-- (the "epoch"). In other systems, the meaning is not specified, and the number returned by
+-- `time` can be used only as an argument to `os.date` and `os.difftime`.
--
--- When called with a table, `os.time` also normalizes all the fields documented
--- in the `os.date` function, so that they represent the same time as before the
--- call but with values inside their valid ranges.
+-- When called with a table, `os.time` also normalizes all the fields documented in the `os.date`
+-- function, so that they represent the same time as before the call but with values inside
+-- their valid ranges.
function os.time([table]) end
---
--- Returns a string with a file name that can be used for a temporary
--- file. The file must be explicitly opened before its use and explicitly
--- removed when no longer needed.
+-- Returns a string with a file name that can be used for a temporary file. The file must be
+-- explicitly opened before its use and explicitly removed when no longer needed.
--
--- On POSIX systems, this function also creates a file with that name, to avoid
--- security risks. (Someone else might create the file with wrong permissions in
--- the time between getting the name and creating the file.) You still have to
--- open the file to use it and to remove it (even if you do not use it).
+-- On POSIX systems, this function also creates a file with that name, to avoid security
+-- risks. (Someone else might create the file with wrong permissions in the time between getting
+-- the name and creating the file.) You still have to open the file to use it and to remove it
+-- (even if you do not use it).
--
--- When possible, you may prefer to use `io.tmpfile`, which automatically
--- removes the file when the program ends.
+-- When possible, you may prefer to use `io.tmpfile`, which automatically removes the file when
+-- the program ends.
function os.tmpname() end
---
--- Enters an interactive mode with the user, running each string that
--- the user enters. Using simple commands and other debug facilities,
--- the user can inspect global and local variables, change their values,
--- evaluate expressions, and so on. A line containing only the word `cont`
+-- Enters an interactive mode with the user, running each string that the user enters. Using
+-- simple commands and other debug facilities, the user can inspect global and local variables,
+-- change their values, evaluate expressions, and so on. A line containing only the word `cont`
-- finishes this function, so that the caller continues its execution.
--
--- Note that commands for `debug.debug` are not lexically nested within any
--- function and so have no direct access to local variables.
+-- Note that commands for `debug.debug` are not lexically nested within any function and so
+-- have no direct access to local variables.
function debug.debug() end
---
@@ -1659,60 +1516,54 @@ function debug.debug() end
function debug.getfenv(o) end
---
--- Returns the current hook settings of the thread, as three values: the
--- current hook function, the current hook mask, and the current hook count,
--- as set by the `debug.sethook` function.
+-- Returns the current hook settings of the thread, as three values: the current hook function,
+-- the current hook mask, and the current hook count, as set by the `debug.sethook` function.
--
-- Returns nil if there is no active hook.
function debug.gethook([thread]) end
---
--- Returns a table with information about a function. You can give the
--- function directly or you can give a number as the value of `f`, which means
--- the function running at level `f` of the call stack of the given thread:
--- level 0 is the current function (`getinfo` itself); level 1 is the function
--- that called `getinfo` (except for tail calls, which do not count in the
--- stack); and so on. If `f` is a number greater than the number of active
--- functions, then `getinfo` returns nil.
---
--- The returned table can contain all the fields returned by `lua_getinfo`,
--- with the string `what` describing which fields to fill in. The default for
--- `what` is to get all information available, except the table of valid
--- lines. If present, the option '`f`' adds a field named `func` with
--- the function itself. If present, the option '`L`' adds a field named
--- `activelines` with the table of valid lines.
---
--- For instance, the expression `debug.getinfo(1,"n").name` returns a table
--- with a name for the current function, if a reasonable name can be found,
--- and the expression `debug.getinfo(print)` returns a table with all available
--- information about the `print` function.
+-- Returns a table with information about a function. You can give the function directly or
+-- you can give a number as the value of `f`, which means the function running at level `f`
+-- of the call stack of the given thread: level 0 is the current function (`getinfo` itself);
+-- level 1 is the function that called `getinfo` (except for tail calls, which do not count in
+-- the stack); and so on. If `f` is a number greater than the number of active functions, then
+-- `getinfo` returns nil.
+--
+-- The returned table can contain all the fields returned by `lua_getinfo`, with the string
+-- `what` describing which fields to fill in. The default for `what` is to get all information
+-- available, except the table of valid lines. If present, the option '`f`' adds a field named
+-- `func` with the function itself. If present, the option '`L`' adds a field named `activelines`
+-- with the table of valid lines.
+--
+-- For instance, the expression `debug.getinfo(1,"n").name` returns a table with a name for the
+-- current function, if a reasonable name can be found, and the expression `debug.getinfo(print)`
+-- returns a table with all available information about the `print` function.
function debug.getinfo([thread,] f [, what]) end
---
--- This function returns the name and the value of the local variable with index
--- `local` of the function at level `f` of the stack. This function accesses not
--- only explicit local variables, but also parameters and temporary values.
+-- This function returns the name and the value of the local variable with index `local` of the
+-- function at level `f` of the stack. This function accesses not only explicit local variables,
+-- but also parameters and temporary values.
--
--- The first parameter or local variable has index 1, and so on, following the
--- order that they are declared in the code, counting only the variables that
--- are active in the current scope of the function. Compile-time constants may
--- not appear in this listing, if they were optimized away by the compiler.
--- Negative indices refer to vararg parameters; -1 is the first vararg
--- parameter. The function returns nil if there is no variable with the given
--- index, and raises an error when called with a level out of range. (You can
--- call `debug.getinfo` to check whether the level is valid.)
+-- The first parameter or local variable has index 1, and so on, following the order that
+-- they are declared in the code, counting only the variables that are active in the current
+-- scope of the function. Compile-time constants may not appear in this listing, if they were
+-- optimized away by the compiler. Negative indices refer to vararg parameters; -1 is the first
+-- vararg parameter. The function returns nil if there is no variable with the given index,
+-- and raises an error when called with a level out of range. (You can call `debug.getinfo`
+-- to check whether the level is valid.)
--
--- Variable names starting with '(' (open parenthesis) represent variables with
--- no known names (internal variables such as loop control variables, and
--- variables from chunks saved without debug information).
+-- Variable names starting with '(' (open parenthesis) represent variables with no known names
+-- (internal variables such as loop control variables, and variables from chunks saved without
+-- debug information).
--
--- The parameter `f` may also be a function. In that case, `getlocal` returns
--- only the name of function parameters.
+-- The parameter `f` may also be a function. In that case, `getlocal` returns only the name of
+-- function parameters.
function debug.getlocal([thread,] f, local) end
---
--- Returns the metatable of the given `value` or nil if it does not have
--- a metatable.
+-- Returns the metatable of the given `value` or nil if it does not have a metatable.
function debug.getmetatable(value) end
---
@@ -1720,82 +1571,77 @@ function debug.getmetatable(value) end
function debug.getregistry() end
---
--- This function returns the name and the value of the upvalue with index
--- `up` of the function `f`. The function returns nil if there is no upvalue
--- with the given index.
+-- This function returns the name and the value of the upvalue with index `up` of the function
+-- `f`. The function returns nil if there is no upvalue with the given index.
--
--- (For Lua functions, upvalues are the external local variables that the
--- function uses, and that are consequently included in its closure.)
+-- (For Lua functions, upvalues are the external local variables that the function uses, and
+-- that are consequently included in its closure.)
--
--- For C functions, this function uses the empty string `""` as a name for all
--- upvalues.
+-- For C functions, this function uses the empty string `""` as a name for all upvalues.
--
--- Variable name '`?`' (interrogation mark) represents variables with no known
--- names (variables from chunks saved without debug information).
+-- Variable name '`?`' (interrogation mark) represents variables with no known names (variables
+-- from chunks saved without debug information).
function debug.getupvalue(f, up) end
---
--- Returns the `n`-th user value associated to the userdata `u` plus a boolean,
--- false, if the userdata does not have that value.
+-- Returns the `n`-th user value associated to the userdata `u` plus a boolean, false, if the
+-- userdata does not have that value.
--
-- New in Lua 5.2.
function debug.getuservalue(u, n) end
---
--- Sets the environment of the given `object` to the given `table`. Returns
--- `object`.
+-- Sets the environment of the given `object` to the given `table`. Returns `object`.
--
-- Deprecated in Lua 5.2.
function debug.setfenv(object, table) end
---
--- Sets the given function as the debug hook. The string `mask` and the number
--- `count` describe when the hook will be called. The string mask may have any
--- combination of the following characters, with the given meaning:
--- "c": the hook is called every time Lua calls a function;
--- "r": the hook is called every time Lua returns from a function;
--- "l": the hook is called every time Lua enters a new line of code.
+-- Sets the given function as the debug hook. The string `mask` and the number `count` describe
+-- when the hook will be called. The string mask may have any combination of the following
+-- characters, with the given meaning:
+--
+-- * "c": the hook is called every time Lua calls a function;
+-- * "r": the hook is called every time Lua returns from a function;
+-- * "l": the hook is called every time Lua enters a new line of code.
--
--- Moreover, with a `count` different from zero, the hook is called also after
--- every `count` instructions.
+-- Moreover, with a `count` different from zero, the hook is called also after every `count`
+-- instructions.
--
-- When called without arguments, `debug.sethook` turns off the hook.
--
--- When the hook is called, its first parameter is a string describing
--- the event that has triggered its call: `"call"`, `"tail call"`, `"return"`,
--- `"line"`, and `"count"`. For line events, the hook also gets the new line
--- number as its second parameter. Inside a hook, you can call `getinfo` with
--- level 2 to get more information about the running function. (Level 0 is the
--- `getinfo` function, and level 1 is the hook function.)
+-- When the hook is called, its first parameter is a string describing the event that has
+-- triggered its call: `"call"`, `"tail call"`, `"return"`, `"line"`, and `"count"`. For line
+-- events, the hook also gets the new line number as its second parameter. Inside a hook, you
+-- can call `getinfo` with level 2 to get more information about the running function. (Level
+-- 0 is the `getinfo` function, and level 1 is the hook function.)
function debug.sethook([thread,] hook, mask [, count]) end
---
--- This function assigns the value `value` to the local variable with
--- index `local` of the function at level `level` of the stack. The function
--- returns nil if there is no local variable with the given index, and raises
--- an error when called with a `level` out of range. (You can call `getinfo`
--- to check whether the level is valid.) Otherwise, it returns the name of
--- the local variable.
+-- This function assigns the value `value` to the local variable with index `local` of the
+-- function at level `level` of the stack. The function returns nil if there is no local variable
+-- with the given index, and raises an error when called with a `level` out of range. (You can
+-- call `getinfo` to check whether the level is valid.) Otherwise, it returns the name of the
+-- local variable.
--
-- See `debug.getlocal` for more information about variable indices and names.
function debug.setlocal([thread,] level, local, value) end
---
--- Sets the metatable for the given `value` to the given `table` (which
--- can be nil).
+-- Sets the metatable for the given `value` to the given `table` (which can be nil).
function debug.setmetatable(value, table) end
---
--- This function assigns the value `value` to the upvalue with index `up`
--- of the function `f`. The function returns nil if there is no upvalue with the
--- given index. Otherwise, it returns the name of the upvalue.
+-- This function assigns the value `value` to the upvalue with index `up` of the function
+-- `f`. The function returns nil if there is no upvalue with the given index. Otherwise, it
+-- returns the name of the upvalue.
--
-- See `debug.getupvalue` for more information about upvalues.
function debug.setupvalue(f, up, value) end
---
--- Sets the given `value` as the `n`-th user value associated to the given
--- `udata`. `udata` must be a full userdata.
+-- Sets the given `value` as the `n`-th user value associated to the given `udata`. `udata`
+-- must be a full userdata.
--
-- Returns `udata`, or nil if the userdata does not have that value.
--
@@ -1803,29 +1649,27 @@ function debug.setupvalue(f, up, value) end
function debug.setuservalue(udata, value, n) end
---
--- If `message` is present but is neither a string nor nil, this function
--- returns `message` without further processing. Otherwise, it returns a string
--- with a traceback of the call stack. The optional `message` string is appended
--- at the beginning of the traceback. An optional `level` number tells at which
--- level to start the traceback (default is 1, the function calling
+-- If `message` is present but is neither a string nor nil, this function returns `message`
+-- without further processing. Otherwise, it returns a string with a traceback of the call
+-- stack. The optional `message` string is appended at the beginning of the traceback. An optional
+-- `level` number tells at which level to start the traceback (default is 1, the function calling
-- `traceback`).
function debug.traceback([thread,] [message] [,level]) end
---
--- Returns a unique identifier (as a light userdata) for the upvalue numbered
--- `n` from the given function.
+-- Returns a unique identifier (as a light userdata) for the upvalue numbered `n` from the
+-- given function.
--
--- These unique identifiers allow a program to check whether different closures
--- share upvalues. Lua closures that share an upvalue (that is, that access a
--- same external local variable) will return identical ids for those upvalue
--- indices.
+-- These unique identifiers allow a program to check whether different closures share upvalues. Lua
+-- closures that share an upvalue (that is, that access a same external local variable) will
+-- return identical ids for those upvalue indices.
--
-- New in Lua 5.2.
function debug.upvalueid(f, n) end
---
--- Make the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue
--- of the Lua closure `f2`.
+-- Make the `n1`-th upvalue of the Lua closure `f1` refer to the `n2`-th upvalue of the Lua
+-- closure `f2`.
--
-- New in Lua 5.2.
function debug.upvaluejoin(f1, n1, f2, n2) end
@@ -1835,26 +1679,22 @@ function debug.upvaluejoin(f1, n1, f2, n2) end
-- LPeg.
---
--- The matching function. It attempts to match the given pattern against the
--- subject string. If the match succeeds, returns the index in the subject of
--- the first character after the match, or the captured values (if the pattern
--- captured any value).
+-- The matching function. It attempts to match the given pattern against the subject string. If
+-- the match succeeds, returns the index in the subject of the first character after the match,
+-- or the captured values (if the pattern captured any value).
--
--- An optional numeric argument `init` makes the match start at that position in
--- the subject string. As usual in Lua libraries, a negative value counts from
--- the end.
+-- An optional numeric argument `init` makes the match start at that position in the subject
+-- string. As usual in Lua libraries, a negative value counts from the end.
--
--- Unlike typical pattern-matching functions, match works only in anchored mode;
--- that is, it tries to match the pattern with a prefix of the given subject
--- string (at position `init`), not with an arbitrary substring of the subject.
--- So, if we want to find a pattern anywhere in a string, we must either write a
--- loop in Lua or write a pattern that matches anywhere. This second approach is
--- easy and quite efficient; see examples.
+-- Unlike typical pattern-matching functions, match works only in anchored mode; that is, it
+-- tries to match the pattern with a prefix of the given subject string (at position `init`),
+-- not with an arbitrary substring of the subject. So, if we want to find a pattern anywhere in
+-- a string, we must either write a loop in Lua or write a pattern that matches anywhere. This
+-- second approach is easy and quite efficient; see examples.
function lpeg.match(pattern, subject [, init]) end
---
--- If the given value is a pattern, returns the string "pattern". Otherwise
--- returns nil.
+-- If the given value is a pattern, returns the string "pattern". Otherwise returns nil.
function lpeg.type(value) end
---
@@ -1862,129 +1702,116 @@ function lpeg.type(value) end
function lpeg.version() end
---
--- Sets the maximum size for the backtrack stack used by LPeg to track calls and
--- choices. Most well-written patterns need little backtrack levels and
--- therefore you seldom need to change this maximum; but a few useful patterns
--- may need more space. Before changing this maximum you should try to rewrite
--- your pattern to avoid the need for extra space.
+-- Sets the maximum size for the backtrack stack used by LPeg to track calls and choices. Most
+-- well-written patterns need little backtrack levels and therefore you seldom need to change
+-- this maximum; but a few useful patterns may need more space. Before changing this maximum
+-- you should try to rewrite your pattern to avoid the need for extra space.
function lpeg.setmaxstack(max) end
---
--- Converts the given value into a proper pattern, according to the following
--- rules:
+-- Converts the given value into a proper pattern, according to the following rules:
+--
-- * If the argument is a pattern, it is returned unmodified.
--- * If the argument is a string, it is translated to a pattern that matches
--- the string literally.
--- * If the argument is a non-negative number n, the result is a pattern that
--- matches exactly n characters.
--- * If the argument is a negative number -n, the result is a pattern that
--- succeeds only if the input string has less than n characters left:
--- `lpeg.P(-n)` is equivalent to `-lpeg.P(n)` (see the unary minus
--- operation).
--- * If the argument is a boolean, the result is a pattern that always
--- succeeds or always fails (according to the boolean value), without
--- consuming any input.
--- * If the argument is a table, it is interpreted as a grammar (see
--- Grammars).
--- * If the argument is a function, returns a pattern equivalent to a
--- match-time capture over the empty string.
+-- * If the argument is a string, it is translated to a pattern that matches the string
+-- literally.
+-- * If the argument is a non-negative number n, the result is a pattern that matches exactly
+-- n characters.
+-- * If the argument is a negative number -n, the result is a pattern that succeeds only if the
+-- input string has less than n characters left: `lpeg.P(-n)` is equivalent to `-lpeg.P(n)`
+-- (see the unary minus operation).
+-- * If the argument is a boolean, the result is a pattern that always succeeds or always fails
+-- (according to the boolean value), without consuming any input.
+-- * If the argument is a table, it is interpreted as a grammar (see Grammars).
+-- * If the argument is a function, returns a pattern equivalent to a match-time capture over
+-- the empty string.
function lpeg.P(value) end
---
--- Returns a pattern that matches only if the input string at the current
--- position is preceded by `patt`. Pattern `patt` must match only strings with
--- some fixed length, and it cannot contain captures.
+-- Returns a pattern that matches only if the input string at the current position is preceded
+-- by `patt`. Pattern `patt` must match only strings with some fixed length, and it cannot
+-- contain captures.
--
--- Like the and predicate, this pattern never consumes any input, independently
--- of success or failure.
+-- Like the and predicate, this pattern never consumes any input, independently of success
+-- or failure.
function lpeg.B(patt) end
---
--- Returns a pattern that matches any single character belonging to one of the
--- given ranges. Each `range` is a string xy of length 2, representing all
--- characters with code between the codes of x and y (both inclusive).
+-- Returns a pattern that matches any single character belonging to one of the given ranges. Each
+-- `range` is a string xy of length 2, representing all characters with code between the codes
+-- of x and y (both inclusive).
--
--- As an example, the pattern `lpeg.R("09")` matches any digit, and
--- `lpeg.R("az", "AZ")` matches any ASCII letter.
+-- As an example, the pattern `lpeg.R("09")` matches any digit, and `lpeg.R("az", "AZ")`
+-- matches any ASCII letter.
function lpeg.R({range}) end
---
--- Returns a pattern that matches any single character that appears in the given
--- string. (The S stands for Set.)
+-- Returns a pattern that matches any single character that appears in the given string. (The
+-- S stands for Set.)
--
-- As an example, the pattern `lpeg.S("+-*/")` matches any arithmetic operator.
--
--- Note that, if `s` is a character (that is, a string of length 1), then
--- `lpeg.P(s)` is equivalent to `lpeg.S(s)` which is equivalent to
--- `lpeg.R(s..s)`. Note also that both `lpeg.S("")` and `lpeg.R()` are patterns
--- that always fail.
+-- Note that, if `s` is a character (that is, a string of length 1), then `lpeg.P(s)` is equivalent
+-- to `lpeg.S(s)` which is equivalent to `lpeg.R(s..s)`. Note also that both `lpeg.S("")` and
+-- `lpeg.R()` are patterns that always fail.
function lpeg.S(string) end
---
--- This operation creates a non-terminal (a variable) for a grammar. The created
--- non-terminal refers to the rule indexed by `v` in the enclosing grammar. (See
--- Grammars for details.)
+-- This operation creates a non-terminal (a variable) for a grammar. The created non-terminal
+-- refers to the rule indexed by `v` in the enclosing grammar. (See Grammars for details.)
function lpeg.V(v) end
---
--- Returns a table with patterns for matching some character classes according
--- to the current locale. The table has fields named `alnum`, `alpha`, `cntrl`,
--- `digit`, `graph`, `lower`, `print`, `punct`, `space`, `upper`, and `xdigit`,
--- each one containing a correspondent pattern. Each pattern matches any single
--- character that belongs to its class.
+-- Returns a table with patterns for matching some character classes according to the current
+-- locale. The table has fields named `alnum`, `alpha`, `cntrl`, `digit`, `graph`, `lower`,
+-- `print`, `punct`, `space`, `upper`, and `xdigit`, each one containing a correspondent
+-- pattern. Each pattern matches any single character that belongs to its class.
--
--- If called with an argument `table`, then it creates those fields inside the
--- given table and returns that table.
+-- If called with an argument `table`, then it creates those fields inside the given table and
+-- returns that table.
function lpeg.locale([table]) end
---
--- Creates a simple capture, which captures the substring of the subject that
--- matches `patt`. The captured value is a string. If `patt` has other captures,
--- their values are returned after this one.
+-- Creates a simple capture, which captures the substring of the subject that matches `patt`. The
+-- captured value is a string. If `patt` has other captures, their values are returned after
+-- this one.
function lpeg.C(patt) end
---
--- Creates an argument capture. This pattern matches the empty string and
--- produces the value given as the nth extra argument given in the call to
--- `lpeg.match`.
+-- Creates an argument capture. This pattern matches the empty string and produces the value
+-- given as the nth extra argument given in the call to `lpeg.match`.
function lpeg.Carg(n) end
---
--- Creates a back capture. This pattern matches the empty string and produces
--- the values produced by the most recent group capture named `name`.
+-- Creates a back capture. This pattern matches the empty string and produces the values produced
+-- by the most recent group capture named `name`.
--
--- Most recent means the last complete outermost group capture with the given
--- name. A Complete capture means that the entire pattern corresponding to the
--- capture has matched. An Outermost capture means that the capture is not
--- inside another complete capture.
+-- Most recent means the last complete outermost group capture with the given name. A Complete
+-- capture means that the entire pattern corresponding to the capture has matched. An Outermost
+-- capture means that the capture is not inside another complete capture.
--
--- In the same way that LPeg does not specify when it evaluates captures, it
--- does not specify whether it reuses values previously produced by the group or
--- re-evaluates them.
+-- In the same way that LPeg does not specify when it evaluates captures, it does not specify
+-- whether it reuses values previously produced by the group or re-evaluates them.
function lpeg.Cb(name) end
---
--- Creates a constant capture. This pattern matches the empty string and
--- produces all given values as its captured values.
+-- Creates a constant capture. This pattern matches the empty string and produces all given
+-- values as its captured values.
function lpeg.Cc([value, ...]) end
---
--- Creates a fold capture. If patt produces a list of captures C1 C2 ... Cn,
--- this capture will produce the value func(...func(func(C1, C2), C3)..., Cn),
--- that is, it will fold (or accumulate, or reduce) the captures from `patt`
--- using function `func`.
+-- Creates a fold capture. If patt produces a list of captures C1 C2 ... Cn, this capture will
+-- produce the value func(...func(func(C1, C2), C3)..., Cn), that is, it will fold (or accumulate,
+-- or reduce) the captures from `patt` using function `func`.
--
--- This capture assumes that `patt` should produce at least one capture with at
--- least one value (of any type), which becomes the initial value of an
--- accumulator. (If you need a specific initial value, you may prefix a constant
--- capture to `patt`.) For each subsequent capture, LPeg calls `func` with this
--- accumulator as the first argument and all values produced by the capture as
--- extra arguments; the first result from this call becomes the new value for
--- the accumulator. The final value of the accumulator becomes the captured
--- value.
+-- This capture assumes that `patt` should produce at least one capture with at least one value
+-- (of any type), which becomes the initial value of an accumulator. (If you need a specific
+-- initial value, you may prefix a constant capture to `patt`.) For each subsequent capture,
+-- LPeg calls `func` with this accumulator as the first argument and all values produced by
+-- the capture as extra arguments; the first result from this call becomes the new value for
+-- the accumulator. The final value of the accumulator becomes the captured value.
--
--- As an example, the following pattern matches a list of numbers separated by
--- commas and returns their addition:
+-- As an example, the following pattern matches a list of numbers separated by commas and
+-- returns their addition:
--
-- -- matches a numeral and captures its numerical value
-- number = lpeg.R"09"^1 / tonumber
@@ -1999,84 +1826,72 @@ function lpeg.Cc([value, ...]) end
function lpeg.Cf(patt, func) end
---
--- Creates a group capture. It groups all values returned by `patt` into a
--- single capture. The group may be anonymous (if no name is given) or named
--- with the given name.
+-- Creates a group capture. It groups all values returned by `patt` into a single capture. The
+-- group may be anonymous (if no name is given) or named with the given name.
--
--- An anonymous group serves to join values from several captures into a single
--- capture. A named group has a different behavior. In most situations, a named
--- group returns no values at all. Its values are only relevant for a following
--- back capture or when used inside a table capture.
+-- An anonymous group serves to join values from several captures into a single capture. A named
+-- group has a different behavior. In most situations, a named group returns no values at all. Its
+-- values are only relevant for a following back capture or when used inside a table capture.
function lpeg.Cg(patt [, name]) end
---
--- Creates a position capture. It matches the empty string and captures the
--- position in the subject where the match occurs. The captured value is a
--- number.
+-- Creates a position capture. It matches the empty string and captures the position in the
+-- subject where the match occurs. The captured value is a number.
function lpeg.Cp() end
---
--- Creates a substitution capture, which captures the substring of the subject
--- that matches `patt`, with substitutions. For any capture inside `patt` with a
--- value, the substring that matched the capture is replaced by the capture
--- value (which should be a string). The final captured value is the string
--- resulting from all replacements.
+-- Creates a substitution capture, which captures the substring of the subject that matches
+-- `patt`, with substitutions. For any capture inside `patt` with a value, the substring that
+-- matched the capture is replaced by the capture value (which should be a string). The final
+-- captured value is the string resulting from all replacements.
function lpeg.Cs(patt) end
---
--- Creates a table capture. This capture returns a table with all values from
--- all anonymous captures made by `patt` inside this table in successive integer
--- keys, starting at 1. Moreover, for each named capture group created by
--- `patt`, the first value of the group is put into the table with the group
--- name as its key. The captured value is only the table.
+-- Creates a table capture. This capture returns a table with all values from all anonymous
+-- captures made by `patt` inside this table in successive integer keys, starting at 1. Moreover,
+-- for each named capture group created by `patt`, the first value of the group is put into
+-- the table with the group name as its key. The captured value is only the table.
function lpeg.Ct(patt) end
---
--- Creates a match-time capture. Unlike all other captures, this one is
--- evaluated immediately when a match occurs (even if it is part of a larger
--- pattern that fails later). It forces the immediate evaluation of all its
--- nested captures and then calls `function`.
+-- Creates a match-time capture. Unlike all other captures, this one is evaluated immediately
+-- when a match occurs (even if it is part of a larger pattern that fails later). It forces
+-- the immediate evaluation of all its nested captures and then calls `function`.
--
--- The given function gets as arguments the entire subject, the current position
--- (after the match of `patt`), plus any capture values produced by `patt`.
+-- The given function gets as arguments the entire subject, the current position (after the
+-- match of `patt`), plus any capture values produced by `patt`.
--
--- The first value returned by `function` defines how the match happens. If the
--- call returns a number, the match succeeds and the returned number becomes the
--- new current position. (Assuming a subject s and current position i, the
--- returned number must be in the range [i, len(s) + 1].) If the call returns
--- true, the match succeeds without consuming any input. (So, to return true is
--- equivalent to return i.) If the call returns false, nil, or no value, the
--- match fails.
+-- The first value returned by `function` defines how the match happens. If the call returns a
+-- number, the match succeeds and the returned number becomes the new current position. (Assuming
+-- a subject s and current position i, the returned number must be in the range [i, len(s) +
+-- 1].) If the call returns true, the match succeeds without consuming any input. (So, to return
+-- true is equivalent to return i.) If the call returns false, nil, or no value, the match fails.
--
--- Any extra values returned by the function become the values produced by the
--- capture.
+-- Any extra values returned by the function become the values produced by the capture.
function lpeg.Cmt(patt, function) end
-- LuaFileSystem.
---
--- Returns a table with the file attributes corresponding to filepath (or nil
--- followed by an error message in case of error). If the second optional
--- argument is given and is a string, then only the value of the named attribute
--- is returned (this use is equivalent to lfs.attributes(filepath)[aname], but
--- the table is not created and only one attribute is retrieved from the O.S.).
--- If a table is passed as the second argument, it is filled with attributes and
--- returned instead of a new table. The attributes are described as follows;
--- attribute mode is a string, all the others are numbers, and the time related
--- attributes use the same time reference of os.time:
--- dev: on Unix systems, this represents the device that the inode resides on.
--- On Windows systems, represents the drive number of the disk containing
--- the file
--- ino: on Unix systems, this represents the inode number. On Windows systems
--- this has no meaning
--- mode: string representing the associated protection mode (the values could
--- be file, directory, link, socket, named pipe, char device, block
--- device or other)
+-- Returns a table with the file attributes corresponding to filepath (or nil followed by
+-- an error message in case of error). If the second optional argument is given and is a
+-- string, then only the value of the named attribute is returned (this use is equivalent to
+-- lfs.attributes(filepath)[aname], but the table is not created and only one attribute is
+-- retrieved from the O.S.). If a table is passed as the second argument, it is filled with
+-- attributes and returned instead of a new table. The attributes are described as follows;
+-- attribute mode is a string, all the others are numbers, and the time related attributes use
+-- the same time reference of os.time:
+--
+-- dev: on Unix systems, this represents the device that the inode resides on. On Windows
+-- systems, represents the drive number of the disk containing the file
+-- ino: on Unix systems, this represents the inode number. On Windows systems this has no meaning
+-- mode: string representing the associated protection mode (the values could be file,
+-- directory, link, socket, named pipe, char device, block device or other)
-- nlink: number of hard links to the file
-- uid: user-id of owner (Unix only, always 0 on Windows)
-- gid: group-id of owner (Unix only, always 0 on Windows)
--- rdev: on Unix systems, represents the device type, for special file inodes.
--- On Windows systems represents the same as dev
+-- rdev: on Unix systems, represents the device type, for special file inodes. On Windows
+-- systems represents the same as dev
-- access: time of last access
-- modification: time of last data modification
-- change: time of last file status change
@@ -2085,10 +1900,10 @@ function lpeg.Cmt(patt, function) end
-- blocks: block allocated for file; (Unix only)
-- blksize: optimal file system I/O blocksize; (Unix only)
--
--- This function uses stat internally thus if the given filepath is a symbolic
--- link, it is followed (if it points to another link the chain is followed
--- recursively) and the information is about the file it refers to. To obtain
--- information about the link itself, see function lfs.symlinkattributes.
+-- This function uses stat internally thus if the given filepath is a symbolic link, it is
+-- followed (if it points to another link the chain is followed recursively) and the information
+-- is about the file it refers to. To obtain information about the link itself, see function
+-- lfs.symlinkattributes.
function lfs.attributes(filepath [, aname | atable]) end
---
@@ -2098,93 +1913,86 @@ function lfs.attributes(filepath [, aname | atable]) end
function lfs.chdir(path) end
---
--- Creates a lockfile (called lockfile.lfs) in path if it does not exist and
--- returns the lock. If the lock already exists checks if it's stale, using the
--- second parameter (default for the second parameter is INT_MAX, which in
--- practice means the lock will never be stale. To free the the lock call
--- lock:free().
+-- Creates a lockfile (called lockfile.lfs) in path if it does not exist and returns the lock. If
+-- the lock already exists checks if it's stale, using the second parameter (default for the
+-- second parameter is INT_MAX, which in practice means the lock will never be stale. To free
+-- the the lock call lock:free().
--
--- In case of any errors it returns nil and the error message. In particular,
--- if the lock exists and is not stale it returns the "File exists" message.
+-- In case of any errors it returns nil and the error message. In particular, if the lock exists
+-- and is not stale it returns the "File exists" message.
function lfs.lock_dir(path, [seconds_stale]) end
---
--- Returns a string with the current working directory or nil plus an error
--- string.
+-- Returns a string with the current working directory or nil plus an error string.
function lfs.currentdir() end
---
--- Lua iterator over the entries of a given directory. Each time the iterator is
--- called with dir_obj it returns a directory entry's name as a string, or nil
--- if there are no more entries. You can also iterate by calling dir_obj:next(),
--- and explicitly close the directory before the iteration finished with
--- dir_obj:close(). Raises an error if path is not a directory.
+-- Lua iterator over the entries of a given directory. Each time the iterator is called
+-- with dir_obj it returns a directory entry's name as a string, or nil if there are no more
+-- entries. You can also iterate by calling dir_obj:next(), and explicitly close the directory
+-- before the iteration finished with dir_obj:close(). Raises an error if path is not a directory.
function lfs.dir(path) end
---
--- Locks a file or a part of it. This function works on open files; the file
--- handle should be specified as the first argument. The string mode could be
--- either r (for a read/shared lock) or w (for a write/exclusive lock). The
--- optional arguments start and length can be used to specify a starting point
--- and its length; both should be numbers.
+-- Locks a file or a part of it. This function works on open files; the file handle should be
+-- specified as the first argument. The string mode could be either r (for a read/shared lock)
+-- or w (for a write/exclusive lock). The optional arguments start and length can be used to
+-- specify a starting point and its length; both should be numbers.
--
--- Returns true if the operation was successful; in case of error, it returns
--- nil plus an error string.
+-- Returns true if the operation was successful; in case of error, it returns nil plus an
+-- error string.
function lfs.lock(filehandle, mode[, start[, length]]) end
---
--- Creates a link. The first argument is the object to link to and the second is
--- the name of the link. If the optional third argument is true, the link will
--- be a symbolic link (by default, a hard link is created).
+-- Creates a link. The first argument is the object to link to and the second is the name of the
+-- link. If the optional third argument is true, the link will be a symbolic link (by default,
+-- a hard link is created).
function lfs.link(old, new[, symlink]) end
---
-- Creates a new directory. The argument is the name of the new directory.
--
--- Returns true in case of success or nil, an error message and a
--- system-dependent error code in case of error.
+-- Returns true in case of success or nil, an error message and a system-dependent error code
+-- in case of error.
function lfs.mkdir(dirname) end
---
-- Removes an existing directory. The argument is the name of the directory.
--
--- Returns true in case of success or nil, an error message and a
--- system-dependent error code in case of error.
+-- Returns true in case of success or nil, an error message and a system-dependent error code
+-- in case of error.
function lfs.rmdir(dirname) end
---
--- Sets the writing mode for a file. The mode string can be either "binary" or
--- "text". Returns true followed by the previous mode string for the file, or
--- nil followed by an error string in case of errors.. On non-Windows platforms,
--- where the two modes are identical, setting the mode has no effect, and the
--- mode is always returned as binary.
+-- Sets the writing mode for a file. The mode string can be either "binary" or "text". Returns
+-- true followed by the previous mode string for the file, or nil followed by an error string
+-- in case of errors. On non-Windows platforms, where the two modes are identical, setting
+-- the mode has no effect, and the mode is always returned as binary.
function lfs.setmode(file, mode) end
---
--- Identical to lfs.attributes except that it obtains information about the link
--- itself (not the file it refers to). It also adds a target field, containing
--- the file name that the symlink points to. On Windows this function does not
--- yet support links, and is identical to lfs.attributes.
+-- Identical to lfs.attributes except that it obtains information about the link itself (not
+-- the file it refers to). It also adds a target field, containing the file name that the
+-- symlink points to. On Windows this function does not yet support links, and is identical
+-- to lfs.attributes.
function lfs.symlinkattributes(filepath [, aname]) end
---
--- Set access and modification times of a file. This function is a bind to utime
--- function. The first argument is the filename, the second argument (atime) is
--- the access time, and the third argument (mtime) is the modification time.
--- Both times are provided in seconds (which should be generated with Lua
--- standard function os.time). If the modification time is omitted, the access
--- time provided is used; if both times are omitted, the current time is used.
+-- Set access and modification times of a file. This function is a bind to utime function. The
+-- first argument is the filename, the second argument (atime) is the access time, and the
+-- third argument (mtime) is the modification time. Both times are provided in seconds (which
+-- should be generated with Lua standard function os.time). If the modification time is omitted,
+-- the access time provided is used; if both times are omitted, the current time is used.
--
--- Returns true in case of success or nil, an error message and a
--- system-dependent error code in case of error.
+-- Returns true in case of success or nil, an error message and a system-dependent error code
+-- in case of error.
function lfs.touch(filepath [, atime [, mtime]]) end
---
--- Unlocks a file or a part of it. This function works on open files; the file
--- handle should be specified as the first argument. The optional arguments
--- start and length can be used to specify a starting point and its length; both
--- should be numbers.
+-- Unlocks a file or a part of it. This function works on open files; the file handle should
+-- be specified as the first argument. The optional arguments start and length can be used to
+-- specify a starting point and its length; both should be numbers.
--
--- Returns true if the operation was successful; in case of error, it returns
--- nil plus an error string.
+-- Returns true if the operation was successful; in case of error, it returns nil plus an
+-- error string.
function lfs.unlock(filehandle[, start[, length]]) end
diff --git a/modules/lua/ta_api b/modules/lua/ta_api
index 4d1736b0..de1896ee 100644
--- a/modules/lua/ta_api
+++ b/modules/lua/ta_api
@@ -8,17 +8,17 @@ ANNOTATION_STANDARD view.ANNOTATION_STANDARD (number, Read-only)\n
APPLEEVENT_ODOC events.APPLEEVENT_ODOC (string)\nEmitted when macOS tells Textadept to open a file.\nArguments:\n\n* _`uri`_: The UTF-8-encoded URI to open.
ARG_NONE events.ARG_NONE (string)\nEmitted when no command line arguments are passed to Textadept on startup.
AUTO_C_CANCELED events.AUTO_C_CANCELED (string)\nEmitted when canceling an autocompletion or user list.
-AUTO_C_CHAR_DELETED events.AUTO_C_CHAR_DELETED (string)\nEmitted after deleting a character while an autocompletion or user list is\nactive.
-AUTO_C_COMPLETED events.AUTO_C_COMPLETED (string)\nEmitted after inserting an item from an autocompletion list into the\nbuffer.\nArguments:\n\n* _`text`_: The selection's text.\n* _`position`_: The autocompleted word's beginning position.
-AUTO_C_SELECTION events.AUTO_C_SELECTION (string)\nEmitted after selecting an item from an autocompletion list, but before\ninserting that item into the buffer.\nAutomatic insertion can be canceled by calling\n`buffer:auto_c_cancel()` before returning from the event handler.\nArguments:\n\n* _`text`_: The selection's text.\n* _`position`_: The autocompleted word's beginning position.
-AUTO_C_SELECTION_CHANGE events.AUTO_C_SELECTION_CHANGE (string)\nEmitted as items are highlighted in an autocompletion or user list.\nArguments:\n\n* _`id`_: Either the *id* from `buffer.user_list_show()` or `0` for an\n autocompletion list.\n* _`text`_: The current selection's text.\n* _`position`_: The position the list was displayed at.
+AUTO_C_CHAR_DELETED events.AUTO_C_CHAR_DELETED (string)\nEmitted after deleting a character while an autocompletion or user list is active.
+AUTO_C_COMPLETED events.AUTO_C_COMPLETED (string)\nEmitted after inserting an item from an autocompletion list into the buffer.\nArguments:\n\n* _`text`_: The selection's text.\n* _`position`_: The autocompleted word's beginning position.
+AUTO_C_SELECTION events.AUTO_C_SELECTION (string)\nEmitted after selecting an item from an autocompletion list, but before inserting that\nitem into the buffer.\nAutomatic insertion can be canceled by calling `buffer:auto_c_cancel()` before returning\nfrom the event handler.\nArguments:\n\n* _`text`_: The selection's text.\n* _`position`_: The autocompleted word's beginning position.
+AUTO_C_SELECTION_CHANGE events.AUTO_C_SELECTION_CHANGE (string)\nEmitted as items are highlighted in an autocompletion or user list.\nArguments:\n\n* _`id`_: Either the *id* from `buffer.user_list_show()` or `0` for an autocompletion list.\n* _`text`_: The current selection's text.\n* _`position`_: The position the list was displayed at.
BSD _G.BSD (bool)\nWhether or not Textadept is running on BSD.
BUFFER_AFTER_SWITCH events.BUFFER_AFTER_SWITCH (string)\nEmitted right after switching to another buffer.\nThe buffer being switched to is `buffer`.\nEmitted by `view.goto_buffer()`.
BUFFER_BEFORE_SWITCH events.BUFFER_BEFORE_SWITCH (string)\nEmitted right before switching to another buffer.\nThe buffer being switched from is `buffer`.\nEmitted by `view.goto_buffer()`.
BUFFER_DELETED events.BUFFER_DELETED (string)\nEmitted after deleting a buffer.\nEmitted by `buffer.delete()`.
BUFFER_NEW events.BUFFER_NEW (string)\nEmitted after creating a new buffer.\nThe new buffer is `buffer`.\nEmitted on startup and by `buffer.new()`.
-BUILD_OUTPUT events.BUILD_OUTPUT (string)\nEmitted when executing a project's build shell command.\nBy default, output is printed to the message buffer. In order to override\nthis behavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `output`: A line of string output from the command.
-CALL_TIP_CLICK events.CALL_TIP_CLICK (string)\nEmitted when clicking on a calltip.\nArguments:\n\n* _`position`_: `1` if the up arrow was clicked, 2 if the down arrow was\n clicked, and 0 otherwise.
+BUILD_OUTPUT events.BUILD_OUTPUT (string)\nEmitted when executing a project's build shell command.\nBy default, output is printed to the message buffer. In order to override this behavior,\nconnect to the event with an index of `1` and return `true`.\nArguments:\n\n* `output`: A line of string output from the command.
+CALL_TIP_CLICK events.CALL_TIP_CLICK (string)\nEmitted when clicking on a calltip.\nArguments:\n\n* _`position`_: `1` if the up arrow was clicked, 2 if the down arrow was clicked, and\n 0 otherwise.
CARETSTICKY_OFF buffer.CARETSTICKY_OFF (number, Read-only)\n
CARETSTICKY_ON buffer.CARETSTICKY_ON (number, Read-only)\n
CARETSTICKY_WHITESPACE buffer.CARETSTICKY_WHITESPACE (number, Read-only)\n
@@ -41,18 +41,18 @@ CLASS textadept.editing.XPM_IMAGES.CLASS (table)\nThe image number for classes.
CLEAR keys.CLEAR (string)\nThe key that clears the current key chain.\nIt cannot be part of a key chain.\nThe default value is `'esc'` for the `Esc` key.
COMMAND_TEXT_CHANGED events.COMMAND_TEXT_CHANGED (string)\nEmitted when the text in the command entry changes.\n`ui.command_entry:get_text()` returns the current text.
COMMENT lexer.COMMENT (string)\nThe token name for comment tokens.
-COMPILE_OUTPUT events.COMPILE_OUTPUT (string)\nEmitted when executing a language's compile shell command.\nBy default, compiler output is printed to the message buffer. In order to\noverride this behavior, connect to the event with an index of `1` and\nreturn `true`.\nArguments:\n\n* `output`: A line of string output from the command.\n* `ext_or_lexer`: The file extension or lexer name associated with the\n executed compile command.
+COMPILE_OUTPUT events.COMPILE_OUTPUT (string)\nEmitted when executing a language's compile shell command.\nBy default, compiler output is printed to the message buffer. In order to override this\nbehavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `output`: A line of string output from the command.\n* `ext_or_lexer`: The file extension or lexer name associated with the executed compile\n command.
CONSTANT lexer.CONSTANT (string)\nThe token name for constant tokens.
-CSI events.CSI (string)\nEmitted when the terminal version receives an unrecognized CSI sequence.\nArguments:\n\n* _`cmd`_: The 24-bit CSI command value. The lowest byte contains the\n command byte. The second lowest byte contains the leading byte, if any\n (e.g. '?'). The third lowest byte contains the intermediate byte, if any\n (e.g. '$').\n* _`args`_: Table of numeric arguments of the CSI sequence.
+CSI events.CSI (string)\nEmitted when the terminal version receives an unrecognized CSI sequence.\nArguments:\n\n* _`cmd`_: The 24-bit CSI command value. The lowest byte contains the command byte. The\n second lowest byte contains the leading byte, if any (e.g. '?'). The third lowest byte\n contains the intermediate byte, if any (e.g. '$').\n* _`args`_: Table of numeric arguments of the CSI sequence.
CURSES _G.CURSES (bool)\nWhether or not Textadept is running in a terminal.\nCurses feature incompatibilities are listed in the Appendix.
CURSORARROW view.CURSORARROW (number, Read-only)\n
CURSORNORMAL view.CURSORNORMAL (number, Read-only)\n
CURSORREVERSEARROW view.CURSORREVERSEARROW (number, Read-only)\n
CURSORWAIT view.CURSORWAIT (number, Read-only)\n
DEFAULT lexer.DEFAULT (string)\nThe token name for default tokens.
-DOUBLE_CLICK events.DOUBLE_CLICK (string)\nEmitted after double-clicking the mouse button.\nArguments:\n\n* _`position`_: The position double-clicked.\n* _`line`_: The line number of the position double-clicked.\n* _`modifiers`_: A bit-mask of any modifier keys held down:\n `view.MOD_CTRL`, `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.\n On macOS, the Command modifier key is reported as `view.MOD_CTRL` and\n Ctrl is `view.MOD_META`.\n Note: If you set `view.rectangular_selection_modifier` to\n `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"\n and "Alt" due to a Scintilla limitation with GTK.
-DWELL_END events.DWELL_END (string)\nEmitted after `DWELL_START` when the user moves the mouse, presses a key,\nor scrolls the view.\nArguments:\n\n* _`position`_: The position closest to *x* and *y*.\n* _`x`_: The x-coordinate of the mouse in the view.\n* _`y`_: The y-coordinate of the mouse in the view.
-DWELL_START events.DWELL_START (string)\nEmitted when the mouse is stationary for `view.mouse_dwell_time`\nmilliseconds.\nArguments:\n\n* _`position`_: The position closest to *x* and *y*.\n* _`x`_: The x-coordinate of the mouse in the view.\n* _`y`_: The y-coordinate of the mouse in the view.
+DOUBLE_CLICK events.DOUBLE_CLICK (string)\nEmitted after double-clicking the mouse button.\nArguments:\n\n* _`position`_: The position double-clicked.\n* _`line`_: The line number of the position double-clicked.\n* _`modifiers`_: A bit-mask of any modifier keys held down: `view.MOD_CTRL`,\n `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`. On macOS, the Command modifier\n key is reported as `view.MOD_CTRL` and Ctrl is `view.MOD_META`. Note: If you set\n `view.rectangular_selection_modifier` to `view.MOD_CTRL`, the "Control" modifier is\n reported as *both* "Control" and "Alt" due to a Scintilla limitation with GTK.
+DWELL_END events.DWELL_END (string)\nEmitted after `DWELL_START` when the user moves the mouse, presses a key, or scrolls the view.\nArguments:\n\n* _`position`_: The position closest to *x* and *y*.\n* _`x`_: The x-coordinate of the mouse in the view.\n* _`y`_: The y-coordinate of the mouse in the view.
+DWELL_START events.DWELL_START (string)\nEmitted when the mouse is stationary for `view.mouse_dwell_time` milliseconds.\nArguments:\n\n* _`position`_: The position closest to *x* and *y*.\n* _`x`_: The x-coordinate of the mouse in the view.\n* _`y`_: The y-coordinate of the mouse in the view.
EDGE_BACKGROUND view.EDGE_BACKGROUND (number, Read-only)\n
EDGE_LINE view.EDGE_LINE (number, Read-only)\n
EDGE_MULTILINE view.EDGE_MULTILINE (number, Read-only)\n
@@ -63,19 +63,19 @@ EOL_LF buffer.EOL_LF (number, Read-only)\n
ERROR events.ERROR (string)\nEmitted when an error occurs.\nArguments:\n\n* _`text`_: The error message text.
ERROR lexer.ERROR (string)\nThe token name for error tokens.
FILE_AFTER_RELOAD events.FILE_AFTER_RELOAD (string)\nEmitted after reloading the current file.\nEmitted by `buffer:reload()`.
-FILE_AFTER_SAVE events.FILE_AFTER_SAVE (string)\nEmitted right after saving a file to disk.\nEmitted by `buffer:save()` and `buffer:save_as()`.\nArguments:\n\n* _`filename`_: The filename of the file being saved.\n* _`saved_as`_: Whether or not the file was saved under a different\n filename.
+FILE_AFTER_SAVE events.FILE_AFTER_SAVE (string)\nEmitted right after saving a file to disk.\nEmitted by `buffer:save()` and `buffer:save_as()`.\nArguments:\n\n* _`filename`_: The filename of the file being saved.\n* _`saved_as`_: Whether or not the file was saved under a different filename.
FILE_BEFORE_RELOAD events.FILE_BEFORE_RELOAD (string)\nEmitted before reloading the current file.\nEmitted by `buffer:reload()`.
FILE_BEFORE_SAVE events.FILE_BEFORE_SAVE (string)\nEmitted right before saving a file to disk.\nEmitted by `buffer:save()`.\nArguments:\n\n* _`filename`_: The filename of the file being saved.
-FILE_CHANGED events.FILE_CHANGED (string)\nEmitted when Textadept detects that an open file was modified externally.\nWhen connecting to this event, connect with an index of 1 in order to\noverride the default prompt to reload the file.\nArguments:\n\n* _`filename`_: The filename externally modified.
+FILE_CHANGED events.FILE_CHANGED (string)\nEmitted when Textadept detects that an open file was modified externally.\nWhen connecting to this event, connect with an index of 1 in order to override the default\nprompt to reload the file.\nArguments:\n\n* _`filename`_: The filename externally modified.
FILE_OPENED events.FILE_OPENED (string)\nEmitted after opening a file in a new buffer.\nEmitted by `io.open_file()`.\nArguments:\n\n* _`filename`_: The opened file's filename.
FIND events.FIND (string)\nEmitted to find text via the Find & Replace Pane.\nArguments:\n\n* _`text`_: The text to search for.\n* _`next`_: Whether or not to search forward.
FIND_MATCHCASE buffer.FIND_MATCHCASE (number, Read-only)\n
FIND_REGEXP buffer.FIND_REGEXP (number, Read-only)\n
-FIND_RESULT_FOUND events.FIND_RESULT_FOUND (string)\nEmitted when a result is found. It is selected and has been scrolled into\nview.\nArguments:\n\n* _`find_text`_: The text originally searched for.
-FIND_TEXT_CHANGED events.FIND_TEXT_CHANGED (string)\nEmitted when the text in the "Find" field of the Find & Replace Pane\nchanges.\n`ui.find.find_entry_text` contains the current text.
+FIND_RESULT_FOUND events.FIND_RESULT_FOUND (string)\nEmitted when a result is found. It is selected and has been scrolled into view.\nArguments:\n\n* _`find_text`_: The text originally searched for.
+FIND_TEXT_CHANGED events.FIND_TEXT_CHANGED (string)\nEmitted when the text in the "Find" field of the Find & Replace Pane changes.\n`ui.find.find_entry_text` contains the current text.
FIND_WHOLEWORD buffer.FIND_WHOLEWORD (number, Read-only)\n
FIND_WORDSTART buffer.FIND_WORDSTART (number, Read-only)\n
-FIND_WRAPPED events.FIND_WRAPPED (string)\nEmitted when a text search wraps (passes through the beginning of the\nbuffer), either from bottom to top (when searching for a next occurrence),\nor from top to bottom (when searching for a previous occurrence).\nThis is useful for implementing a more visual or audible notice when a\nsearch wraps in addition to the statusbar message.
+FIND_WRAPPED events.FIND_WRAPPED (string)\nEmitted when a text search wraps (passes through the beginning of the buffer), either\nfrom bottom to top (when searching for a next occurrence), or from top to bottom (when\nsearching for a previous occurrence).\nThis is useful for implementing a more visual or audible notice when a search wraps in\naddition to the statusbar message.
FOCUS events.FOCUS (string)\nEmitted when Textadept receives focus.\nThis event is never emitted when Textadept is running in the terminal.
FOLDACTION_CONTRACT view.FOLDACTION_CONTRACT (number, Read-only)\n
FOLDACTION_EXPAND view.FOLDACTION_EXPAND (number, Read-only)\n
@@ -98,9 +98,9 @@ FOLD_BLANK lexer.FOLD_BLANK (number)\nFlag indicating that the line is blank.
FOLD_HEADER lexer.FOLD_HEADER (number)\nFlag indicating the line is fold point.
FUNCTION lexer.FUNCTION (string)\nThe token name for function tokens.
IDENTIFIER lexer.IDENTIFIER (string)\nThe token name for identifier tokens.
-INDICATOR_CLICK events.INDICATOR_CLICK (string)\nEmitted when clicking the mouse on text that has an indicator present.\nArguments:\n\n* _`position`_: The clicked text's position.\n* _`modifiers`_: A bit-mask of any modifier keys held down:\n `view.MOD_CTRL`, `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.\n On macOS, the Command modifier key is reported as `view.MOD_CTRL` and\n Ctrl is `view.MOD_META`.\n Note: If you set `view.rectangular_selection_modifier` to\n `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"\n and "Alt" due to a Scintilla limitation with GTK.
+INDICATOR_CLICK events.INDICATOR_CLICK (string)\nEmitted when clicking the mouse on text that has an indicator present.\nArguments:\n\n* _`position`_: The clicked text's position.\n* _`modifiers`_: A bit-mask of any modifier keys held down: `view.MOD_CTRL`,\n `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`. On macOS, the Command modifier\n key is reported as `view.MOD_CTRL` and Ctrl is `view.MOD_META`. Note: If you set\n `view.rectangular_selection_modifier` to `view.MOD_CTRL`, the "Control" modifier is\n reported as *both* "Control" and "Alt" due to a Scintilla limitation with GTK.
INDICATOR_MAX buffer.INDICATOR_MAX (number, Read-only)\n
-INDICATOR_RELEASE events.INDICATOR_RELEASE (string)\nEmitted when releasing the mouse after clicking on text that has an\nindicator present.\nArguments:\n\n* _`position`_: The clicked text's position.
+INDICATOR_RELEASE events.INDICATOR_RELEASE (string)\nEmitted when releasing the mouse after clicking on text that has an indicator present.\nArguments:\n\n* _`position`_: The clicked text's position.
INDIC_BOX view.INDIC_BOX (number, Read-only)\n
INDIC_BRACEMATCH textadept.editing.INDIC_BRACEMATCH (number)\nThe matching brace highlight indicator number.
INDIC_COMPOSITIONTHICK view.INDIC_COMPOSITIONTHICK (number, Read-only)\n
@@ -133,15 +133,15 @@ IV_LOOKFORWARD view.IV_LOOKFORWARD (number, Read-only)\n
IV_NONE view.IV_NONE (number, Read-only)\n
IV_REAL view.IV_REAL (number, Read-only)\n
KEYPRESS events.KEYPRESS (string)\nEmitted when pressing a key.\nIf any handler returns `true`, the key is not inserted into the buffer.\nArguments:\n\n* _`code`_: The numeric key code.\n* _`shift`_: The "Shift" modifier key is held down.\n* _`ctrl`_: The "Control" modifier key is held down.\n* _`alt`_: The "Alt"/"Option" modifier key is held down.\n* _`cmd`_: The "Command" modifier key on macOS is held down.\n* _`caps_lock`_: The "Caps Lock" modifier is on.
-KEYSYMS keys.KEYSYMS (table)\nLookup table for string representations of key codes higher than 255.\nKey codes can be identified by temporarily uncommenting the `print()`\nstatements in *core/keys.lua*.\nRecognized codes are: esc, \b, \t, \\n, down, up, left, right, home, end,\npgup, pgdn, del, ins, and f1-f12.\nThe GUI version also recognizes: kpenter, kphome, kpend, kpleft, kpup,\nkpright, kpdown, kppgup, kppgdn, kpmul, kpadd, kpsub, kpdiv, kpdec, and\nkp0-kp9.
+KEYSYMS keys.KEYSYMS (table)\nLookup table for string representations of key codes higher than 255.\nKey codes can be identified by temporarily uncommenting the `print()` statements in\n*core/keys.lua*.\nRecognized codes are: esc, \b, \t, \\n, down, up, left, right, home, end, pgup, pgdn, del,\nins, and f1-f12.\nThe GUI version also recognizes: kpenter, kphome, kpend, kpleft, kpup, kpright, kpdown,\nkppgup, kppgdn, kpmul, kpadd, kpsub, kpdiv, kpdec, and kp0-kp9.
KEYWORD lexer.KEYWORD (string)\nThe token name for keyword tokens.
LABEL lexer.LABEL (string)\nThe token name for label tokens.
-LEXER_LOADED events.LEXER_LOADED (string)\nEmitted after loading a language lexer.\nThis is useful for overriding a language module's key bindings or other\nproperties since the module is not loaded when Textadept starts.\nArguments:\n\n* _`name`_: The language lexer's name.
+LEXER_LOADED events.LEXER_LOADED (string)\nEmitted after loading a language lexer.\nThis is useful for overriding a language module's key bindings or other properties since\nthe module is not loaded when Textadept starts.\nArguments:\n\n* _`name`_: The language lexer's name.
LINUX _G.LINUX (bool)\nWhether or not Textadept is running on Linux.
MARGINOPTION_NONE view.MARGINOPTION_NONE (number, Read-only)\n
MARGINOPTION_SUBLINESELECT view.MARGINOPTION_SUBLINESELECT (number, Read-only)\n
MARGIN_BACK view.MARGIN_BACK (number, Read-only)\n
-MARGIN_CLICK events.MARGIN_CLICK (string)\nEmitted when clicking the mouse inside a sensitive margin.\nArguments:\n\n* _`margin`_: The margin number clicked.\n* _`position`_: The beginning position of the clicked margin's line.\n* _`modifiers`_: A bit-mask of any modifier keys held down:\n `view.MOD_CTRL`, `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.\n On macOS, the Command modifier key is reported as `view.MOD_CTRL` and\n Ctrl is `view.MOD_META`.\n Note: If you set `view.rectangular_selection_modifier` to\n `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"\n and "Alt" due to a Scintilla limitation with GTK.
+MARGIN_CLICK events.MARGIN_CLICK (string)\nEmitted when clicking the mouse inside a sensitive margin.\nArguments:\n\n* _`margin`_: The margin number clicked.\n* _`position`_: The beginning position of the clicked margin's line.\n* _`modifiers`_: A bit-mask of any modifier keys held down: `view.MOD_CTRL`,\n `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`. On macOS, the Command modifier\n key is reported as `view.MOD_CTRL` and Ctrl is `view.MOD_META`. Note: If you set\n `view.rectangular_selection_modifier` to `view.MOD_CTRL`, the "Control" modifier is\n reported as *both* "Control" and "Alt" due to a Scintilla limitation with GTK.
MARGIN_COLOR view.MARGIN_COLOR (number, Read-only)\n
MARGIN_FORE view.MARGIN_FORE (number, Read-only)\n
MARGIN_NUMBER view.MARGIN_NUMBER (number, Read-only)\n
@@ -194,14 +194,14 @@ MARK_VERTICALBOOKMARK view.MARK_VERTICALBOOKMARK (number, Read-only)\n
MARK_VLINE view.MARK_VLINE (number, Read-only)\n
MARK_WARNING textadept.run.MARK_WARNING (number)\nThe run or compile warning marker number.
MASK_FOLDERS view.MASK_FOLDERS (number, Read-only)\n
-MENU_CLICKED events.MENU_CLICKED (string)\nEmitted after selecting a menu item.\nArguments:\n\n* _`menu_id`_: The numeric ID of the menu item, which was defined in\n `ui.menu()`.
+MENU_CLICKED events.MENU_CLICKED (string)\nEmitted after selecting a menu item.\nArguments:\n\n* _`menu_id`_: The numeric ID of the menu item, which was defined in `ui.menu()`.
METHOD textadept.editing.XPM_IMAGES.METHOD (table)\nThe image number for methods.
MOD_ALT view.MOD_ALT (number, Read-only)\n
MOD_CTRL view.MOD_CTRL (number, Read-only)\n
MOD_META view.MOD_META (number, Read-only)\n
MOD_SHIFT view.MOD_SHIFT (number, Read-only)\n
MOD_SUPER view.MOD_SUPER (number, Read-only)\n
-MOUSE events.MOUSE (string)\nEmitted by the terminal version for an unhandled mouse event.\nA handler should return `true` if it handled the event. Otherwise Textadept\nwill try again. (This side effect for a `false` or `nil` return is useful\nfor sending the original mouse event to a different view that a handler\nhas switched to.)\nArguments:\n\n* _`event`_: The mouse event: `view.MOUSE_PRESS`, `view.MOUSE_DRAG`, or\n `view.MOUSE_RELEASE`.\n* _`button`_: The mouse button number.\n* _`y`_: The y-coordinate of the mouse event, starting from 1.\n* _`x`_: The x-coordinate of the mouse event, starting from 1.\n* _`shift`_: The "Shift" modifier key is held down.\n* _`ctrl`_: The "Control" modifier key is held down.\n* _`alt`_: The "Alt"/"Option" modifier key is held down.
+MOUSE events.MOUSE (string)\nEmitted by the terminal version for an unhandled mouse event.\nA handler should return `true` if it handled the event. Otherwise Textadept will try again.\n(This side effect for a `false` or `nil` return is useful for sending the original mouse\nevent to a different view that a handler has switched to.)\nArguments:\n\n* _`event`_: The mouse event: `view.MOUSE_PRESS`, `view.MOUSE_DRAG`, or `view.MOUSE_RELEASE`.\n* _`button`_: The mouse button number.\n* _`y`_: The y-coordinate of the mouse event, starting from 1.\n* _`x`_: The x-coordinate of the mouse event, starting from 1.\n* _`shift`_: The "Shift" modifier key is held down.\n* _`ctrl`_: The "Control" modifier key is held down.\n* _`alt`_: The "Alt"/"Option" modifier key is held down.
MOUSE_DRAG view.MOUSE_DRAG (number, Read-only)\n
MOUSE_PRESS view.MOUSE_PRESS (number, Read-only)\n
MOUSE_RELEASE view.MOUSE_RELEASE (number, Read-only)\n
@@ -217,22 +217,22 @@ ORDER_PERFORMSORT buffer.ORDER_PERFORMSORT (number, Read-only)\n
ORDER_PRESORTED buffer.ORDER_PRESORTED (number, Read-only)\n
OSX _G.OSX (bool)\nWhether or not Textadept is running on macOS as a GUI application.
PREPROCESSOR lexer.PREPROCESSOR (string)\nThe token name for preprocessor tokens.
-QUIT events.QUIT (string)\nEmitted when quitting Textadept.\nWhen connecting to this event, connect with an index of 1 if the handler\nneeds to run before Textadept closes all open buffers. If a handler returns\n`true`, Textadept does not quit. It is not recommended to return `false`\nfrom a quit handler, as that may interfere with Textadept's normal shutdown\nprocedure.\nEmitted by `quit()`.
+QUIT events.QUIT (string)\nEmitted when quitting Textadept.\nWhen connecting to this event, connect with an index of 1 if the handler needs to run\nbefore Textadept closes all open buffers. If a handler returns `true`, Textadept does not\nquit. It is not recommended to return `false` from a quit handler, as that may interfere\nwith Textadept's normal shutdown procedure.\nEmitted by `quit()`.
REGEX lexer.REGEX (string)\nThe token name for regex tokens.
REPLACE events.REPLACE (string)\nEmitted to replace selected (found) text.\nArguments:\n\n* _`text`_: The replacement text.
REPLACE_ALL events.REPLACE_ALL (string)\nEmitted to replace all occurrences of found text.\nArguments:\n\n* _`find_text`_: The text to search for.\n* _`repl_text`_: The replacement text.
-RESET_AFTER events.RESET_AFTER (string)\nEmitted after resetting Textadept's Lua state.\nEmitted by `reset()`.\nArguments:\n\n* _`persist`_: Table of data persisted by `events.RESET_BEFORE`. All\n handlers will have access to this same table.
-RESET_BEFORE events.RESET_BEFORE (string)\nEmitted before resetting Textadept's Lua state.\nEmitted by `reset()`.\nArguments:\n\n* _`persist`_: Table to store persistent data in for use by\n `events.RESET_AFTER`. All handlers will have access to this same table.
+RESET_AFTER events.RESET_AFTER (string)\nEmitted after resetting Textadept's Lua state.\nEmitted by `reset()`.\nArguments:\n\n* _`persist`_: Table of data persisted by `events.RESET_BEFORE`. All handlers will have\n access to this same table.
+RESET_BEFORE events.RESET_BEFORE (string)\nEmitted before resetting Textadept's Lua state.\nEmitted by `reset()`.\nArguments:\n\n* _`persist`_: Table to store persistent data in for use by `events.RESET_AFTER`. All\n handlers will have access to this same table.
RESUME events.RESUME (string)\nEmitted when resuming Textadept from a suspended state.\nThis event is only emitted by the terminal version.
-RUN_OUTPUT events.RUN_OUTPUT (string)\nEmitted when executing a language's run shell command.\nBy default, output is printed to the message buffer. In order to override\nthis behavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `output`: A line of string output from the command.\n* `ext_or_lexer`: The file extension or lexer name associated with the\n executed run command.
+RUN_OUTPUT events.RUN_OUTPUT (string)\nEmitted when executing a language's run shell command.\nBy default, output is printed to the message buffer. In order to override this behavior,\nconnect to the event with an index of `1` and return `true`.\nArguments:\n\n* `output`: A line of string output from the command.\n* `ext_or_lexer`: The file extension or lexer name associated with the executed run command.
SAVE_POINT_LEFT events.SAVE_POINT_LEFT (string)\nEmitted after leaving a save point.
SAVE_POINT_REACHED events.SAVE_POINT_REACHED (string)\nEmitted after reaching a save point.
SEL_LINES buffer.SEL_LINES (number, Read-only)\n
SEL_RECTANGLE buffer.SEL_RECTANGLE (number, Read-only)\n
SEL_STREAM buffer.SEL_STREAM (number, Read-only)\n
SEL_THIN buffer.SEL_THIN (number, Read-only)\n
-SESSION_LOAD events.SESSION_LOAD (string)\nEmitted when loading a session.\nArguments:\n\n* `session`: Table of session data to load. All handlers will have access\n to this same table.
-SESSION_SAVE events.SESSION_SAVE (string)\nEmitted when saving a session.\nArguments:\n\n* `session`: Table of session data to save. All handlers will have access\n to this same table, and Textadept's default handler reserves the use of\n some keys.\n Note that functions, userdata, and circular table values cannot be saved.\n The latter case is not recognized at all, so beware.
+SESSION_LOAD events.SESSION_LOAD (string)\nEmitted when loading a session.\nArguments:\n\n* `session`: Table of session data to load. All handlers will have access to this same table.
+SESSION_SAVE events.SESSION_SAVE (string)\nEmitted when saving a session.\nArguments:\n\n* `session`: Table of session data to save. All handlers will have access to this same\n table, and Textadept's default handler reserves the use of some keys.\n Note that functions, userdata, and circular table values cannot be saved. The latter\n case is not recognized at all, so beware.
SHOW_ALL_TABS ui.SHOW_ALL_TABS (number)\n
SIGNAL textadept.editing.XPM_IMAGES.SIGNAL (table)\nThe image number for signals.
SLOT textadept.editing.XPM_IMAGES.SLOT (table)\nThe image number for slots.
@@ -247,11 +247,11 @@ STYLE_FOLDDISPLAYTEXT view.STYLE_FOLDDISPLAYTEXT (number, Read-only)\n
STYLE_INDENTGUIDE view.STYLE_INDENTGUIDE (number, Read-only)\n
STYLE_LINENUMBER view.STYLE_LINENUMBER (number, Read-only)\n
STYLE_MAX view.STYLE_MAX (number, Read-only)\n
-SUSPEND events.SUSPEND (string)\nEmitted when suspending Textadept. If any handler returns `true`, Textadept\ndoes not suspend.\nThis event is only emitted by the terminal version.
-TAB_CLICKED events.TAB_CLICKED (string)\nEmitted when the user clicks on a buffer tab.\nWhen connecting to this event, connect with an index of 1 if the handler\nneeds to run before Textadept switches between buffers.\nNote that Textadept always displays a context menu on right-click.\nArguments:\n\n* _`index`_: The numeric index of the clicked tab.\n* _`button`_: The mouse button number that was clicked, either `1` (left\n button), `2` (middle button), `3` (right button), `4` (wheel up), or `5`\n (wheel down).\n* _`shift`_: The "Shift" modifier key is held down.\n* _`ctrl`_: The "Control" modifier key is held down.\n* _`alt`_: The "Alt"/"Option" modifier key is held down.\n* _`cmd`_: The "Command" modifier key on macOS is held down.
+SUSPEND events.SUSPEND (string)\nEmitted when suspending Textadept. If any handler returns `true`, Textadept does not suspend.\nThis event is only emitted by the terminal version.
+TAB_CLICKED events.TAB_CLICKED (string)\nEmitted when the user clicks on a buffer tab.\nWhen connecting to this event, connect with an index of 1 if the handler needs to run\nbefore Textadept switches between buffers.\nNote that Textadept always displays a context menu on right-click.\nArguments:\n\n* _`index`_: The numeric index of the clicked tab.\n* _`button`_: The mouse button number that was clicked, either `1` (left button), `2`\n (middle button), `3` (right button), `4` (wheel up), or `5` (wheel down).\n* _`shift`_: The "Shift" modifier key is held down.\n* _`ctrl`_: The "Control" modifier key is held down.\n* _`alt`_: The "Alt"/"Option" modifier key is held down.\n* _`cmd`_: The "Command" modifier key on macOS is held down.
TD_LONGARROW view.TD_LONGARROW (number, Read-only)\n
TD_STRIKEOUT view.TD_STRIKEOUT (number, Read-only)\n
-TEST_OUTPUT events.TEST_OUTPUT (string)\nEmitted when executing a project's shell command for running tests.\nBy default, output is printed to the message buffer. In order to override\nthis behavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `output`: A line of string output from the command.
+TEST_OUTPUT events.TEST_OUTPUT (string)\nEmitted when executing a project's shell command for running tests.\nBy default, output is printed to the message buffer. In order to override this behavior,\nconnect to the event with an index of `1` and return `true`.\nArguments:\n\n* `output`: A line of string output from the command.
TIME_FOREVER view.TIME_FOREVER (number, Read-only)\n
TYPE lexer.TYPE (string)\nThe token name for type tokens.
TYPEDEF textadept.editing.XPM_IMAGES.TYPEDEF (table)\nThe image number for type definitions.
@@ -296,227 +296,227 @@ WS_VISIBLEALWAYS view.WS_VISIBLEALWAYS (number, Read-only)\n
WS_VISIBLEONLYININDENT view.WS_VISIBLEONLYININDENT (number, Read-only)\n
XPM_IMAGES textadept.editing.XPM_IMAGES (table)\nMap of image names to registered image numbers.
ZOOM events.ZOOM (string)\nEmitted after changing `view.zoom`.\nEmitted by `view.zoom_in()` and `view.zoom_out()`.
-_BUFFERS _G._BUFFERS (table)\nTable of all open buffers in Textadept.\nNumeric keys have buffer values and buffer keys have their associated numeric\nkeys.\n@see _G.buffer
+_BUFFERS _G._BUFFERS (table)\nTable of all open buffers in Textadept.\nNumeric keys have buffer values and buffer keys have their associated numeric keys.\n@see _G.buffer
_CHARSET _G._CHARSET (string)\nThe filesystem's character encoding.\nThis is used when working with files.
_G _G._G (module)\nExtends Lua's _G table to provide extra functions and fields for Textadept.
_HOME _G._HOME (string)\nThe path to Textadept's home, or installation, directory.
-_L _G._L (module)\nMap of all messages used by Textadept to their localized form.\nIf the table does not contain the localized version of a given message, it\nreturns a string that starts with "No Localization:" via a metamethod.\nNote: the terminal version ignores any "_" mnemonics the GUI version would\nuse.
-_M _G._M (module)\nA table of loaded Textadept language modules.\n\nLanguage modules are a special kind of module that Textadept automatically\nloads when editing source code in a particular programming language. The only\nthing "special" about them is they are named after a lexer. Otherwise they\nare plain Lua modules. The *~/.textadept/modules/* directory houses language\nmodules (along with other modules).\n\nA language module is designed to provide extra functionality for a single\nprogramming language. Some examples of what language modules can do:\n\n * Specify block comment syntax for lines of code\n * Define compile and run commands for source files\n * Set language-specific editor properties like indentation rules\n * Specify code autocompletion routines\n * Declare snippets\n * Define commands and key bindings for them\n * Add to the top-level menu or right-click editor context menu\n\nExamples of these features are described in the sections below.
+_L _G._L (module)\nMap of all messages used by Textadept to their localized form.\nIf the table does not contain the localized version of a given message, it returns a string\nthat starts with "No Localization:" via a metamethod.\nNote: the terminal version ignores any "_" mnemonics the GUI version would use.
+_M _G._M (module)\nA table of loaded Textadept language modules.\n\nLanguage modules are a special kind of module that Textadept automatically loads when editing\nsource code in a particular programming language. The only thing "special" about them is they\nare named after a lexer. Otherwise they are plain Lua modules. The *~/.textadept/modules/*\ndirectory houses language modules (along with other modules).\n\nA language module is designed to provide extra functionality for a single programming\nlanguage. Some examples of what language modules can do:\n\n * Specify block comment syntax for lines of code\n * Define compile and run commands for source files\n * Set language-specific editor properties like indentation rules\n * Specify code autocompletion routines\n * Declare snippets\n * Define commands and key bindings for them\n * Add to the top-level menu or right-click editor context menu\n\nExamples of these features are described in the sections below.
_RELEASE _G._RELEASE (string)\nThe Textadept release version string.
-_SCINTILLA _G._SCINTILLA (module)\nScintilla constants, functions, and properties.\nDo not modify anything in this module. Doing so will have unpredictable\nconsequences.
-_USERHOME _G._USERHOME (string)\nThe path to the user's *~/.textadept/* directory, where all preferences and\nuser-data is stored.\nOn Windows machines *~/* is the value of the "USERHOME" environment\nvariable (typically *C:\Users\username\\* or\n*C:\Documents and Settings\username\\*). On Linux, BSD, and macOS\nmachines *~/* is the value of "$HOME" (typically */home/username/* and\n*/Users/username/* respectively).
-_VIEWS _G._VIEWS (table)\nTable of all views in Textadept.\nNumeric keys have view values and view keys have their associated numeric\nkeys.\n@see _G.view
-_print ui._print(buffer_type, ...)\nPrints the given string messages to the buffer of string type *buffer_type*.\nOpens a new buffer for printing messages to if necessary. If the message\nbuffer is already open in a view, the message is printed to that view.\nOtherwise the view is split (unless `ui.tabs` is `true`) and the message\nbuffer is displayed before being printed to.\n@param buffer_type String type of message buffer.\n@param ... Message strings.\n@usage ui._print(_L['[Message Buffer]'], message)
-abspath lfs.abspath(filename, prefix)\nReturns the absolute path to string *filename*.\n*prefix* or `lfs.currentdir()` is prepended to a relative filename. The\nreturned path is not guaranteed to exist.\n@param filename The relative or absolute path to a file.\n@param prefix Optional prefix path prepended to a relative filename.\n@return string absolute path
+_SCINTILLA _G._SCINTILLA (module)\nScintilla constants, functions, and properties.\nDo not modify anything in this module. Doing so will have unpredictable consequences.
+_USERHOME _G._USERHOME (string)\nThe path to the user's *~/.textadept/* directory, where all preferences and user-data\nis stored.\nOn Windows machines *~/* is the value of the "USERHOME" environment variable (typically\n*C:\Users\username\\* or *C:\Documents and Settings\username\\*). On Linux, BSD, and macOS\nmachines *~/* is the value of "$HOME" (typically */home/username/* and */Users/username/*\nrespectively).
+_VIEWS _G._VIEWS (table)\nTable of all views in Textadept.\nNumeric keys have view values and view keys have their associated numeric keys.\n@see _G.view
+_print ui._print(buffer_type, ...)\nPrints the given string messages to the buffer of string type *buffer_type*.\nOpens a new buffer for printing messages to if necessary. If the message buffer is already\nopen in a view, the message is printed to that view. Otherwise the view is split (unless\n`ui.tabs` is `true`) and the message buffer is displayed before being printed to.\n@param buffer_type String type of message buffer.\n@param ... Message strings.\n@usage ui._print(_L['[Message Buffer]'], message)
+abspath lfs.abspath(filename, prefix)\nReturns the absolute path to string *filename*.\n*prefix* or `lfs.currentdir()` is prepended to a relative filename. The returned path is\nnot guaranteed to exist.\n@param filename The relative or absolute path to a file.\n@param prefix Optional prefix path prepended to a relative filename.\n@return string absolute path
active ui.command_entry.active (boolean)\nWhether or not the command entry is active.
active ui.find.active (boolean)\nWhether or not the Find & Replace pane is active.
-add_fold_point lexer.add_fold_point(lexer, token_name, start_symbol, end_symbol)\nAdds to lexer *lexer* a fold point whose beginning and end tokens are string\n*token_name* tokens with string content *start_symbol* and *end_symbol*,\nrespectively.\nIn the event that *start_symbol* may or may not be a fold point depending on\ncontext, and that additional processing is required, *end_symbol* may be a\nfunction that ultimately returns `1` (indicating a beginning fold point),\n`-1` (indicating an ending fold point), or `0` (indicating no fold point).\nThat function is passed the following arguments:\n\n * `text`: The text being processed for fold points.\n * `pos`: The position in *text* of the beginning of the line currently\n being processed.\n * `line`: The text of the line currently being processed.\n * `s`: The position of *start_symbol* in *line*.\n * `symbol`: *start_symbol* itself.\n@param lexer The lexer to add a fold point to.\n@param token_name The token name of text that indicates a fold point.\n@param start_symbol The text that indicates the beginning of a fold point.\n@param end_symbol Either the text that indicates the end of a fold point, or\n a function that returns whether or not *start_symbol* is a beginning fold\n point (1), an ending fold point (-1), or not a fold point at all (0).\n@usage lex:add_fold_point(lexer.OPERATOR, '{', '}')\n@usage lex:add_fold_point(lexer.KEYWORD, 'if', 'end')\n@usage lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('#'))\n@usage lex:add_fold_point('custom', function(text, pos, line, s, symbol)\n ... end)
-add_rule lexer.add_rule(lexer, id, rule)\nAdds pattern *rule* identified by string *id* to the ordered list of rules\nfor lexer *lexer*.\n@param lexer The lexer to add the given rule to.\n@param id The id associated with this rule. It does not have to be the same\n as the name passed to `token()`.\n@param rule The LPeg pattern of the rule.\n@see modify_rule
-add_selection buffer.add_selection(buffer, end_pos, start_pos)\nSelects the range of text between positions *start_pos* to *end_pos* as the\nmain selection, retaining all other selections as additional selections.\nSince an empty selection (i.e. the current position) still counts as a\nselection, use `buffer.set_selection()` first when setting a list of\nselections.\n@param buffer A buffer.\n@param end_pos The caret position of the range of text to select in *buffer*.\n@param start_pos The anchor position of the range of text to select in\n *buffer*.\n@see set_selection
-add_style lexer.add_style(lexer, token_name, style)\nAssociates string *token_name* in lexer *lexer* with style table *style*.\n*style* may have the following fields:\n\n* `font`: String font name.\n* `size`: Integer font size.\n* `bold`: Whether or not the font face is bold. The default value is `false`.\n* `weight`: Integer weight or boldness of a font, between 1 and 999.\n* `italics`: Whether or not the font face is italic. The default value is\n `false`.\n* `underlined`: Whether or not the font face is underlined. The default value\n is `false`.\n* `fore`: Font face foreground color in `0xBBGGRR` or `"#RRGGBB"` format.\n* `back`: Font face background color in `0xBBGGRR` or `"#RRGGBB"` format.\n* `eolfilled`: Whether or not the background color extends to the end of the\n line. The default value is `false`.\n* `case`: Font case, `'u'` for upper, `'l'` for lower, and `'m'` for normal,\n mixed case. The default value is `'m'`.\n* `visible`: Whether or not the text is visible. The default value is `true`.\n* `changeable`: Whether the text is changeable instead of read-only. The\n default value is `true`.\n\nField values may also contain "$(property.name)" expansions for properties\ndefined in Scintilla, theme files, etc.\n@param lexer The lexer to add a style to.\n@param token_name The name of the token to associated with the style.\n@param style A style string for Scintilla.\n@usage lex:add_style('longstring', lexer.styles.string)\n@usage lex:add_style('deprecated_func', lexer.styles['function'] ..\n {italics = true}\n@usage lex:add_style('visible_ws', lexer.styles.whitespace ..\n {back = lexer.colors.grey}
-add_text buffer.add_text(buffer, text)\nAdds string *text* to the buffer at the caret position and moves the caret to\nthe end of the added text without scrolling it into view.\n@param buffer A buffer.\n@param text The text to add.
+add_fold_point lexer.add_fold_point(lexer, token_name, start_symbol, end_symbol)\nAdds to lexer *lexer* a fold point whose beginning and end tokens are string *token_name*\ntokens with string content *start_symbol* and *end_symbol*, respectively.\nIn the event that *start_symbol* may or may not be a fold point depending on context, and that\nadditional processing is required, *end_symbol* may be a function that ultimately returns\n`1` (indicating a beginning fold point), `-1` (indicating an ending fold point), or `0`\n(indicating no fold point). That function is passed the following arguments:\n\n * `text`: The text being processed for fold points.\n * `pos`: The position in *text* of the beginning of the line currently being processed.\n * `line`: The text of the line currently being processed.\n * `s`: The position of *start_symbol* in *line*.\n * `symbol`: *start_symbol* itself.\n@param lexer The lexer to add a fold point to.\n@param token_name The token name of text that indicates a fold point.\n@param start_symbol The text that indicates the beginning of a fold point.\n@param end_symbol Either the text that indicates the end of a fold point, or a function that\n returns whether or not *start_symbol* is a beginning fold point (1), an ending fold point\n (-1), or not a fold point at all (0).\n@usage lex:add_fold_point(lexer.OPERATOR, '{', '}')\n@usage lex:add_fold_point(lexer.KEYWORD, 'if', 'end')\n@usage lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('#'))\n@usage lex:add_fold_point('custom', function(text, pos, line, s, symbol) ... end)
+add_rule lexer.add_rule(lexer, id, rule)\nAdds pattern *rule* identified by string *id* to the ordered list of rules for lexer *lexer*.\n@param lexer The lexer to add the given rule to.\n@param id The id associated with this rule. It does not have to be the same as the name\n passed to `token()`.\n@param rule The LPeg pattern of the rule.\n@see modify_rule
+add_selection buffer.add_selection(buffer, end_pos, start_pos)\nSelects the range of text between positions *start_pos* to *end_pos* as the main selection,\nretaining all other selections as additional selections.\nSince an empty selection (i.e. the current position) still counts as a selection, use\n`buffer.set_selection()` first when setting a list of selections.\n@param buffer A buffer.\n@param end_pos The caret position of the range of text to select in *buffer*.\n@param start_pos The anchor position of the range of text to select in *buffer*.\n@see set_selection
+add_style lexer.add_style(lexer, token_name, style)\nAssociates string *token_name* in lexer *lexer* with style table *style*.\n*style* may have the following fields:\n\n* `font`: String font name.\n* `size`: Integer font size.\n* `bold`: Whether or not the font face is bold. The default value is `false`.\n* `weight`: Integer weight or boldness of a font, between 1 and 999.\n* `italics`: Whether or not the font face is italic. The default value is `false`.\n* `underlined`: Whether or not the font face is underlined. The default value is `false`.\n* `fore`: Font face foreground color in `0xBBGGRR` or `"#RRGGBB"` format.\n* `back`: Font face background color in `0xBBGGRR` or `"#RRGGBB"` format.\n* `eolfilled`: Whether or not the background color extends to the end of the line. The\n default value is `false`.\n* `case`: Font case, `'u'` for upper, `'l'` for lower, and `'m'` for normal, mixed case. The\n default value is `'m'`.\n* `visible`: Whether or not the text is visible. The default value is `true`.\n* `changeable`: Whether the text is changeable instead of read-only. The default value is\n `true`.\n\nField values may also contain "$(property.name)" expansions for properties defined in Scintilla,\ntheme files, etc.\n@param lexer The lexer to add a style to.\n@param token_name The name of the token to associated with the style.\n@param style A style string for Scintilla.\n@usage lex:add_style('longstring', lexer.styles.string)\n@usage lex:add_style('deprecated_func', lexer.styles['function'] .. {italics = true}\n@usage lex:add_style('visible_ws', lexer.styles.whitespace .. {back = lexer.colors.grey}
+add_text buffer.add_text(buffer, text)\nAdds string *text* to the buffer at the caret position and moves the caret to the end of\nthe added text without scrolling it into view.\n@param buffer A buffer.\n@param text The text to add.
additional_caret_fore view.additional_caret_fore (number)\nThe foreground color, in "0xBBGGRR" format, of additional carets.
additional_carets_blink view.additional_carets_blink (bool)\nAllow additional carets to blink.\nThe default value is `true`.
additional_carets_visible view.additional_carets_visible (bool)\nDisplay additional carets.\nThe default value is `true`.
-additional_sel_alpha view.additional_sel_alpha (number)\nThe alpha value, ranging from `0` (transparent) to `255` (opaque), of\nadditional selections.\nThe default value is `view.ALPHA_NOALPHA`, for no alpha.
+additional_sel_alpha view.additional_sel_alpha (number)\nThe alpha value, ranging from `0` (transparent) to `255` (opaque), of additional selections.\nThe default value is `view.ALPHA_NOALPHA`, for no alpha.
additional_sel_back view.additional_sel_back (number, Write-only)\nThe background color, in "0xBBGGRR" format, of additional selections.\nThis field has no effect when calling `view:set_sel_back(false, ...)`.
additional_sel_fore view.additional_sel_fore (number, Write-only)\nThe foreground color, in "0xBBGGRR" format, of additional selections.\nThis field has no effect when calling `view:set_sel_fore(false, ...)`.
additional_selection_typing buffer.additional_selection_typing (bool)\nType into multiple selections.\nThe default value is `false`.
all_lines_visible view.all_lines_visible (bool, Read-only)\nWhether or not all lines are visible.
-alnum lexer.alnum (pattern)\nA pattern that matches any alphanumeric character ('A'-'Z', 'a'-'z',\n '0'-'9').
+alnum lexer.alnum (pattern)\nA pattern that matches any alphanumeric character ('A'-'Z', 'a'-'z', '0'-'9').
alpha lexer.alpha (pattern)\nA pattern that matches any alphabetic character ('A'-'Z', 'a'-'z').
anchor buffer.anchor (number)\nThe anchor's position.
annotation_clear_all buffer.annotation_clear_all(buffer)\nClears annotations from all lines.\n@param buffer A buffer.
annotation_lines buffer.annotation_lines (table, Read-only)\nTable of the number of annotation text lines per line number.
-annotation_style buffer.annotation_style (table)\nTable of style numbers for annotation text per line number.\nOnly some style attributes are active in annotations: font,\nsize/size_fractional, bold/weight, italics, fore, back, and character_set.
+annotation_style buffer.annotation_style (table)\nTable of style numbers for annotation text per line number.\nOnly some style attributes are active in annotations: font, size/size_fractional, bold/weight,\nitalics, fore, back, and character_set.
annotation_text buffer.annotation_text (table)\nTable of annotation text per line number.
-annotation_visible view.annotation_visible (number)\nThe annotation visibility mode.\n\n* `view.ANNOTATION_HIDDEN`\n Annotations are invisible.\n* `view.ANNOTATION_STANDARD`\n Draw annotations left-justified with no decoration.\n* `view.ANNOTATION_BOXED`\n Indent annotations to match the annotated text and outline them with a\n box.\n* `view.ANNOTATION_INDENTED`\n Indent non-decorated annotations to match the annotated text.\n\nThe default value is `view.ANNOTATION_HIDDEN`.
+annotation_visible view.annotation_visible (number)\nThe annotation visibility mode.\n\n* `view.ANNOTATION_HIDDEN`\n Annotations are invisible.\n* `view.ANNOTATION_STANDARD`\n Draw annotations left-justified with no decoration.\n* `view.ANNOTATION_BOXED`\n Indent annotations to match the annotated text and outline them with a box.\n* `view.ANNOTATION_INDENTED`\n Indent non-decorated annotations to match the annotated text.\n\nThe default value is `view.ANNOTATION_HIDDEN`.
ansi_c _M.ansi_c (module)\nThe ansi_c module.\nIt provides utilities for editing C code.
any lexer.any (pattern)\nA pattern that matches any single character.
-api_files textadept.editing.api_files (table)\nMap of lexer names to API documentation file tables.\nFile tables contain API file paths or functions that return such paths.\nEach line in an API file consists of a symbol name (not a fully qualified\nsymbol name), a space character, and that symbol's documentation. "\\n"\nrepresents a newline character.\n@see show_documentation
-append_history ui.command_entry.append_history(f, text)\nAppends string *text* to the history for command entry mode *f* or the\ncurrent or most recent mode.\nThis should only be called if `ui.command_entry.run()` is called with a keys\ntable that has a custom binding for the Enter key ('\\n').\nOtherwise, history is automatically appended as needed.\n@param f Optional command entry mode to append history to. This is a function\n passed to `ui.command_entry_run()`. If omitted, uses the current or most\n recent mode.\n@param text String text to append to history.
-append_text buffer.append_text(buffer, text)\nAppends string *text* to the end of the buffer without modifying any existing\nselections or scrolling the text into view.\n@param buffer A buffer.\n@param text The text to append.
+api_files textadept.editing.api_files (table)\nMap of lexer names to API documentation file tables.\nFile tables contain API file paths or functions that return such paths. Each line in an\nAPI file consists of a symbol name (not a fully qualified symbol name), a space character,\nand that symbol's documentation. "\\n" represents a newline character.\n@see show_documentation
+append_history ui.command_entry.append_history(f, text)\nAppends string *text* to the history for command entry mode *f* or the current or most\nrecent mode.\nThis should only be called if `ui.command_entry.run()` is called with a keys table that has a\ncustom binding for the Enter key ('\\n'). Otherwise, history is automatically appended as needed.\n@param f Optional command entry mode to append history to. This is a function passed to\n `ui.command_entry_run()`. If omitted, uses the current or most recent mode.\n@param text String text to append to history.
+append_text buffer.append_text(buffer, text)\nAppends string *text* to the end of the buffer without modifying any existing selections or\nscrolling the text into view.\n@param buffer A buffer.\n@param text The text to append.
arg _G.arg (table)\nTable of command line parameters passed to Textadept.\n@see args
args _G.args (module)\nProcesses command line arguments for Textadept.
ascii lexer.ascii (pattern)\nA pattern that matches any ASCII character (codes 0 to 127).
assert _G.assert (module)\nExtends `_G` with formatted assertions and function argument type checks.
-assert _G.assert(v, message, ...)\nAsserts that value *v* is not `false` or `nil` and returns *v*, or calls\n`error()` with *message* as the error message, defaulting to "assertion\nfailed!". If *message* is a format string, the remaining arguments are passed\nto `string.format()` and the resulting string becomes the error message.\n@param v Value to assert.\n@param message Optional error message to show on error. The default value is\n "assertion failed!".\n@param ... If *message* is a format string, these arguments are passed to\n `string.format()`.
-assert_type _G.assert_type(v, expected_type, narg)\nAsserts that value *v* has type string *expected_type* and returns *v*, or\ncalls `error()` with an error message that implicates function argument\nnumber *narg*.\nThis is intended to be used with API function arguments so users receive more\nhelpful error messages.\n@param v Value to assert the type of.\n@param expected_type String type to assert. It may be a non-letter-delimited\n list of type options.\n@param narg The positional argument number *v* is associated with. This is\n not required to be a number.\n@usage assert_type(filename, 'string/nil', 1)\n@usage assert_type(option.setting, 'number', 'setting') -- implicates key
+assert _G.assert(v, message, ...)\nAsserts that value *v* is not `false` or `nil` and returns *v*, or calls `error()` with\n*message* as the error message, defaulting to "assertion failed!".\nIf *message* is a format string, the remaining arguments are passed to `string.format()`\nand the resulting string becomes the error message.\n@param v Value to assert.\n@param message Optional error message to show on error. The default value is "assertion failed!".\n@param ... If *message* is a format string, these arguments are passed to `string.format()`.
+assert_type _G.assert_type(v, expected_type, narg)\nAsserts that value *v* has type string *expected_type* and returns *v*, or calls `error()`\nwith an error message that implicates function argument number *narg*.\nThis is intended to be used with API function arguments so users receive more helpful error\nmessages.\n@param v Value to assert the type of.\n@param expected_type String type to assert. It may be a non-letter-delimited list of type\n options.\n@param narg The positional argument number *v* is associated with. This is not required to\n be a number.\n@usage assert_type(filename, 'string/nil', 1)\n@usage assert_type(option.setting, 'number', 'setting') -- implicates key
auto_c_active buffer.auto_c_active(buffer)\nReturns whether or not an autocompletion or user list is visible.\n@param buffer A buffer.\n@return bool
-auto_c_auto_hide buffer.auto_c_auto_hide (bool)\nAutomatically cancel an autocompletion or user list when no entries match\ntyped text.\nThe default value is `true`.
+auto_c_auto_hide buffer.auto_c_auto_hide (bool)\nAutomatically cancel an autocompletion or user list when no entries match typed text.\nThe default value is `true`.
auto_c_cancel buffer.auto_c_cancel(buffer)\nCancels the displayed autocompletion or user list.\n@param buffer A buffer.
-auto_c_cancel_at_start buffer.auto_c_cancel_at_start (bool)\nCancel an autocompletion list when backspacing to a position before where\nautocompletion started (instead of before the word being completed).\nThis option has no effect for a user list.\nThe default value is `true`.
+auto_c_cancel_at_start buffer.auto_c_cancel_at_start (bool)\nCancel an autocompletion list when backspacing to a position before where autocompletion\nstarted (instead of before the word being completed).\nThis option has no effect for a user list.\nThe default value is `true`.
auto_c_case_insensitive_behavior buffer.auto_c_case_insensitive_behavior (number)\nThe behavior mode for a case insensitive autocompletion or user list when\n`buffer.auto_c_ignore_case` is `true`.\n\n* `buffer.CASEINSENSITIVEBEHAVIOR_RESPECTCASE`\n Prefer to select case-sensitive matches.\n* `buffer.CASEINSENSITIVEBEHAVIOR_IGNORECASE`\n No preference.\n\nThe default value is `buffer.CASEINSENSITIVEBEHAVIOR_RESPECTCASE`.
auto_c_choose_single buffer.auto_c_choose_single (bool)\nAutomatically choose the item in a single-item autocompletion list.\nThis option has no effect for a user list.\nThe default value is `false`.
auto_c_complete buffer.auto_c_complete(buffer)\nCompletes the current word with the one selected in an autocompletion list.\n@param buffer A buffer.
auto_c_current buffer.auto_c_current (number, Read-only)\nThe index of the currently selected item in an autocompletion or user list.
auto_c_current_text buffer.auto_c_current_text (string, Read-only)\nThe text of the currently selected item in an autocompletion or user list.
auto_c_drop_rest_of_word buffer.auto_c_drop_rest_of_word (bool)\nDelete any word characters immediately to the right of autocompleted text.\nThe default value is `false`.
-auto_c_fill_ups buffer.auto_c_fill_ups (string, Write-only)\nThe set of characters that choose the currently selected item in an\nautocompletion or user list when the user types one of them.\nThe default value is `''`.
+auto_c_fill_ups buffer.auto_c_fill_ups (string, Write-only)\nThe set of characters that choose the currently selected item in an autocompletion or user\nlist when the user types one of them.\nThe default value is `''`.
auto_c_ignore_case buffer.auto_c_ignore_case (bool)\nIgnore case when searching an autocompletion or user list for matches.\nThe default value is `false`.
-auto_c_max_height view.auto_c_max_height (number)\nThe maximum number of items per page to show in autocompletion and user\nlists. The default value is `5`.
-auto_c_max_width view.auto_c_max_width (number)\nThe maximum number of characters per item to show in autocompletion and\nuser lists.\nThe default value is `0`, which automatically sizes the width to fit the\nlongest item.
+auto_c_max_height view.auto_c_max_height (number)\nThe maximum number of items per page to show in autocompletion and user lists.\nThe default value is `5`.
+auto_c_max_width view.auto_c_max_width (number)\nThe maximum number of characters per item to show in autocompletion and user lists.\nThe default value is `0`, which automatically sizes the width to fit the longest item.
auto_c_multi buffer.auto_c_multi (number)\nThe multiple selection autocomplete mode.\n\n* `buffer.MULTIAUTOC_ONCE`\n Autocomplete into only the main selection.\n* `buffer.MULTIAUTOC_EACH`\n Autocomplete into all selections.\n\nThe default value is `buffer.MULTIAUTOC_ONCE`.
-auto_c_order buffer.auto_c_order (number)\nThe order setting for autocompletion and user lists.\n\n* `buffer.ORDER_PRESORTED`\n Lists passed to `buffer.auto_c_show()` are in sorted, alphabetical\n order.\n* `buffer.ORDER_PERFORMSORT`\n Sort autocompletion lists passed to `buffer.auto_c_show()`.\n* `buffer.ORDER_CUSTOM`\n Lists passed to `buffer.auto_c_show()` are already in a custom order.\n\nThe default value is `buffer.ORDER_PRESORTED`.
-auto_c_pos_start buffer.auto_c_pos_start(buffer)\nReturns the position where autocompletion started or where a user list was\nshown.\n@param buffer A buffer.\n@return number
-auto_c_select buffer.auto_c_select(buffer, prefix)\nSelects the first item that starts with string *prefix* in an autocompletion\nor user list, using the case sensitivity setting `buffer.auto_c_ignore_case`.\n@param buffer A buffer.\n@param prefix The item in the list to select.
-auto_c_separator buffer.auto_c_separator (number)\nThe byte value of the character that separates autocompletion and user list\nlist items.\nThe default value is `32` (' ').
-auto_c_show buffer.auto_c_show(buffer, len_entered, items)\nDisplays an autocompletion list constructed from string *items* (whose items\nare delimited by `buffer.auto_c_separator` characters) using *len_entered*\nnumber of characters behind the caret as the prefix of the word to be\nautocompleted.\nThe sorted order of *items* (`buffer.auto_c_order`) must have already been\ndefined.\n@param buffer A buffer.\n@param len_entered The number of characters before the caret used to provide\n the context.\n@param items The sorted string of words to show, separated by\n `buffer.auto_c_separator` characters (initially spaces).\n@see auto_c_separator\n@see auto_c_order
-auto_c_stops buffer.auto_c_stops(buffer, chars)\nAllows the user to type any character in string set *chars* in order to\ncancel an autocompletion or user list.\nThe default set is empty.\n@param buffer A buffer.\n@param chars The string of characters that cancel autocompletion. This string\n is empty by default.
-auto_c_type_separator buffer.auto_c_type_separator (number)\nThe character byte that separates autocompletion and user list items and\ntheir image types.\nAutocompletion and user list items can display both an image and text.\nRegister images and their types using `view.register_image()` or\n`view.register_rgba_image()` before appending image types to list\nitems after type separator characters.\nThe default value is 63 ('?').
-auto_enclose textadept.editing.auto_enclose (bool)\nWhether or not to auto-enclose selected text when typing a punctuation\ncharacter, taking `textadept.editing.auto_pairs` into account.\nThe default value is `false`.
+auto_c_order buffer.auto_c_order (number)\nThe order setting for autocompletion and user lists.\n\n* `buffer.ORDER_PRESORTED`\n Lists passed to `buffer.auto_c_show()` are in sorted, alphabetical order.\n* `buffer.ORDER_PERFORMSORT`\n Sort autocompletion lists passed to `buffer.auto_c_show()`.\n* `buffer.ORDER_CUSTOM`\n Lists passed to `buffer.auto_c_show()` are already in a custom order.\n\nThe default value is `buffer.ORDER_PRESORTED`.
+auto_c_pos_start buffer.auto_c_pos_start(buffer)\nReturns the position where autocompletion started or where a user list was shown.\n@param buffer A buffer.\n@return number
+auto_c_select buffer.auto_c_select(buffer, prefix)\nSelects the first item that starts with string *prefix* in an autocompletion or user list,\nusing the case sensitivity setting `buffer.auto_c_ignore_case`.\n@param buffer A buffer.\n@param prefix The item in the list to select.
+auto_c_separator buffer.auto_c_separator (number)\nThe byte value of the character that separates autocompletion and user list list items.\nThe default value is `32` (' ').
+auto_c_show buffer.auto_c_show(buffer, len_entered, items)\nDisplays an autocompletion list constructed from string *items* (whose items are delimited by\n`buffer.auto_c_separator` characters) using *len_entered* number of characters behind the\ncaret as the prefix of the word to be autocompleted.\nThe sorted order of *items* (`buffer.auto_c_order`) must have already been defined.\n@param buffer A buffer.\n@param len_entered The number of characters before the caret used to provide the context.\n@param items The sorted string of words to show, separated by `buffer.auto_c_separator`\n characters (initially spaces).\n@see auto_c_separator\n@see auto_c_order
+auto_c_stops buffer.auto_c_stops(buffer, chars)\nAllows the user to type any character in string set *chars* in order to cancel an autocompletion\nor user list.\nThe default set is empty.\n@param buffer A buffer.\n@param chars The string of characters that cancel autocompletion. This string is empty\n by default.
+auto_c_type_separator buffer.auto_c_type_separator (number)\nThe character byte that separates autocompletion and user list items and their image types.\nAutocompletion and user list items can display both an image and text. Register images\nand their types using `view.register_image()` or `view.register_rgba_image()`\nbefore appending image types to list items after type separator characters.\nThe default value is 63 ('?').
+auto_enclose textadept.editing.auto_enclose (bool)\nWhether or not to auto-enclose selected text when typing a punctuation character, taking\n`textadept.editing.auto_pairs` into account.\nThe default value is `false`.
auto_indent textadept.editing.auto_indent (bool)\nMatch the previous line's indentation level after inserting a new line.\nThe default value is `true`.
-auto_pairs textadept.editing.auto_pairs (table)\nMap of auto-paired characters like parentheses, brackets, braces, and quotes.\nThe ASCII values of opening characters are assigned to strings that contain\ncomplement characters. The default auto-paired characters are "()", "[]",\n"{}", "''", and """".
-autocomplete textadept.editing.autocomplete(name)\nDisplays an autocompletion list provided by the autocompleter function\nassociated with string *name*, and returns `true` if completions were found.\n@param name The name of an autocompleter function in the `autocompleters`\n table to use for providing autocompletions.\n@see autocompleters
+auto_pairs textadept.editing.auto_pairs (table)\nMap of auto-paired characters like parentheses, brackets, braces, and quotes.\nThe ASCII values of opening characters are assigned to strings that contain complement\ncharacters. The default auto-paired characters are "()", "[]", "{}", "''", and\n"""".
+autocomplete textadept.editing.autocomplete(name)\nDisplays an autocompletion list provided by the autocompleter function associated with string\n*name*, and returns `true` if completions were found.\n@param name The name of an autocompleter function in the `autocompleters` table to use for\n providing autocompletions.\n@see autocompleters
autocomplete_all_words textadept.editing.autocomplete_all_words (bool)\nAutocomplete the current word using words from all open buffers.\nIf `true`, performance may be slow when many buffers are open.\nThe default value is `false`.
autocomplete_snippets _M.ansi_c.autocomplete_snippets (boolean)\nWhether or not to include snippets in autocompletion lists.\nThe default value is `true`.
autocomplete_snippets _M.lua.autocomplete_snippets (boolean)\nWhether or not to include snippets in autocompletion lists.\nThe default value is `false`.
-autocompleters textadept.editing.autocompleters (table)\nMap of autocompleter names to autocompletion functions.\nNames are typically lexer names and autocompletion functions typically\nautocomplete symbols.\nAutocompletion functions must return two values: the number of characters\nbehind the caret that are used as the prefix of the entity to be\nautocompleted, and a list of completions to be shown. Autocompletion lists\nare sorted automatically.\n@see autocomplete
+autocompleters textadept.editing.autocompleters (table)\nMap of autocompleter names to autocompletion functions.\nNames are typically lexer names and autocompletion functions typically autocomplete symbols.\nAutocompletion functions must return two values: the number of characters behind the caret\nthat are used as the prefix of the entity to be autocompleted, and a list of completions to\nbe shown. Autocompletion lists are sorted automatically.\n@see autocomplete
back textadept.history.back()\nNavigates backwards through the current view's history.
back_space_un_indents buffer.back_space_un_indents (bool)\nUn-indent text when backspacing within indentation.\nThe default value is `false`.
back_tab buffer.back_tab(buffer)\nUn-indents the text on the selected lines.\n@param buffer A buffer.
begin_undo_action buffer.begin_undo_action(buffer)\nStarts a sequence of actions to be undone or redone as a single action.\nMay be nested.\n@param buffer A buffer.
bookmarks textadept.bookmarks (module)\nBookmarks for Textadept.
-brace_bad_light view.brace_bad_light(view, pos)\nHighlights the character at position *pos* as an unmatched brace character\nusing the `'style.bracebad'` style.\nRemoves highlighting when *pos* is `-1`.\n@param view A view.\n@param pos The position in *view*'s buffer to highlight, or `-1` to remove\n the highlight.
-brace_bad_light_indicator view.brace_bad_light_indicator(view, use_indicator, indicator)\nHighlights unmatched brace characters with indicator number *indicator*, in\nthe range of `1` to `32`, instead of the\n`view.STYLE_BRACEBAD` style if *use_indicator* is `true`.\n@param view A view.\n@param use_indicator Whether or not to use an indicator.\n@param indicator The indicator number to use.
-brace_highlight view.brace_highlight(view, pos1, pos2)\nHighlights the characters at positions *pos1* and *pos2* as matching braces\nusing the `'style.bracelight'` style.\nIf indent guides are enabled, locates the column with `buffer.column` and\nsets `view.highlight_guide` in order to highlight the indent guide.\n@param view A view.\n@param pos1 The first position in *view*'s buffer to highlight.\n@param pos2 The second position in *view*'s buffer to highlight.
-brace_highlight_indicator view.brace_highlight_indicator(view, use_indicator, indicator)\nHighlights matching brace characters with indicator number *indicator*, in\nthe range of `1` to `32`, instead of the\n`view.STYLE_BRACELIGHT` style if *use_indicator* is `true`.\n@param view A view.\n@param use_indicator Whether or not to use an indicator.\n@param indicator The indicator number to use.
-brace_match buffer.brace_match(buffer, pos, max_re_style)\nReturns the position of the matching brace for the brace character at\nposition *pos*, taking nested braces into account, or `-1`.\nThe brace characters recognized are '(', ')', '[', ']', '{', '}', '<', and\n'>' and must have the same style.\n@param buffer A buffer.\n@param pos The position of the brace in *buffer* to match.\n@param max_re_style Must be `0`. Reserved for expansion.\n@return number
-brace_matches textadept.editing.brace_matches (table)\nTable of brace characters to highlight.\nThe ASCII values of brace characters are keys and are assigned non-`nil`\nvalues. The default brace characters are '(', ')', '[', ']', '{', and '}'.
-buffer _G.buffer (module)\nA Textadept buffer object.\nConstants are documented in the fields they apply to.\nWhile you can work with individual buffer instances, it is really only useful\nto work with the global one.\nMany of these functions and fields are derived from buffer-specific\nfunctionality of the Scintilla editing component, and additional information\ncan be found on the\nScintilla website.\nNote that with regard to Scintilla-specific functionality, this API is a\n_suggestion_, not a hard requirement. All of that functionality also exists\nin `view`, even if undocumented.\nAny buffer fields set on startup (e.g. in *~/.textadept/init.lua*) will be\nthe default, initial values for all buffers.
+brace_bad_light view.brace_bad_light(view, pos)\nHighlights the character at position *pos* as an unmatched brace character using the\n`'style.bracebad'` style.\nRemoves highlighting when *pos* is `-1`.\n@param view A view.\n@param pos The position in *view*'s buffer to highlight, or `-1` to remove the highlight.
+brace_bad_light_indicator view.brace_bad_light_indicator(view, use_indicator, indicator)\nHighlights unmatched brace characters with indicator number *indicator*, in the range of\n`1` to `32`, instead of the `view.STYLE_BRACEBAD` style if *use_indicator* is `true`.\n@param view A view.\n@param use_indicator Whether or not to use an indicator.\n@param indicator The indicator number to use.
+brace_highlight view.brace_highlight(view, pos1, pos2)\nHighlights the characters at positions *pos1* and *pos2* as matching braces using the\n`'style.bracelight'` style.\nIf indent guides are enabled, locates the column with `buffer.column` and sets\n`view.highlight_guide` in order to highlight the indent guide.\n@param view A view.\n@param pos1 The first position in *view*'s buffer to highlight.\n@param pos2 The second position in *view*'s buffer to highlight.
+brace_highlight_indicator view.brace_highlight_indicator(view, use_indicator, indicator)\nHighlights matching brace characters with indicator number *indicator*, in the range of `1`\nto `32`, instead of the `view.STYLE_BRACELIGHT` style if *use_indicator* is `true`.\n@param view A view.\n@param use_indicator Whether or not to use an indicator.\n@param indicator The indicator number to use.
+brace_match buffer.brace_match(buffer, pos, max_re_style)\nReturns the position of the matching brace for the brace character at position *pos*, taking\nnested braces into account, or `-1`.\nThe brace characters recognized are '(', ')', '[', ']', '{', '}', '<', and '>' and must have\nthe same style.\n@param buffer A buffer.\n@param pos The position of the brace in *buffer* to match.\n@param max_re_style Must be `0`. Reserved for expansion.\n@return number
+brace_matches textadept.editing.brace_matches (table)\nTable of brace characters to highlight.\nThe ASCII values of brace characters are keys and are assigned non-`nil` values. The default\nbrace characters are '(', ')', '[', ']', '{', and '}'.
+buffer _G.buffer (module)\nA Textadept buffer object.\nConstants are documented in the fields they apply to.\nWhile you can work with individual buffer instances, it is really only useful to work with\nthe global one.\nMany of these functions and fields are derived from buffer-specific functionality of the\nScintilla editing component, and additional information can be found on the [Scintilla\nwebsite](https://scintilla.org/ScintillaDoc.html). Note that with regard to Scintilla-specific\nfunctionality, this API is a _suggestion_, not a hard requirement. All of that functionality\nalso exists in `view`, even if undocumented.\nAny buffer fields set on startup (e.g. in *~/.textadept/init.lua*) will be the default,\ninitial values for all buffers.
buffer _G.buffer (table)\nThe current buffer in the current view.
buffer view.buffer (table)\nThe buffer the view currently contains. (Read-only)
buffer_statusbar_text ui.buffer_statusbar_text (string, Write-only)\nThe text displayed in the buffer statusbar.
-build textadept.run.build(root_directory)\nBuilds the project whose root path is *root_directory* or the current project\nusing the shell command from the `build_commands` table.\nIf a "makefile" type of build file is found, prompts the user for the full\nbuild command.\nThe current project is determined by either the buffer's filename or the\ncurrent working directory.\nEmits `BUILD_OUTPUT` events.\n@param root_directory The path to the project to build. The default value is\n the current project.\n@see build_commands\n@see _G.events
-build_commands textadept.run.build_commands (table)\nMap of project root paths and "makefiles" to their associated "build" shell\ncommand line strings or functions that return such strings.\nFunctions may also return a working directory and process environment table\nto operate in. By default, the working directory is the project's root\ndirectory and the environment is Textadept's environment.
+build textadept.run.build(root_directory)\nBuilds the project whose root path is *root_directory* or the current project using the\nshell command from the `build_commands` table.\nIf a "makefile" type of build file is found, prompts the user for the full build command. The\ncurrent project is determined by either the buffer's filename or the current working directory.\nEmits `BUILD_OUTPUT` events.\n@param root_directory The path to the project to build. The default value is the current project.\n@see build_commands\n@see _G.events
+build_commands textadept.run.build_commands (table)\nMap of project root paths and "makefiles" to their associated "build" shell command line\nstrings or functions that return such strings.\nFunctions may also return a working directory and process environment table to operate\nin. By default, the working directory is the project's root directory and the environment\nis Textadept's environment.
call_tip_active view.call_tip_active(view)\nReturns whether or not a call tip is visible.\n@param view A view.\n@return bool
call_tip_cancel view.call_tip_cancel(view)\nRemoves the displayed call tip from view.\n@param view A view.
call_tip_fore_hlt view.call_tip_fore_hlt (number, Write-only)\nA call tip's highlighted text foreground color, in "0xBBGGRR" format.
call_tip_pos_start view.call_tip_pos_start (number, Write-only)\nThe position at which backspacing beyond it hides a visible call tip.
call_tip_pos_start view.call_tip_pos_start(view)\nReturns a call tip's display position.\n@param view A view.\n@return number
call_tip_position view.call_tip_position (boolean)\nDisplay a call tip above the current line instead of below it.\nThe default value is `false`.
-call_tip_set_hlt view.call_tip_set_hlt(view, start_pos, end_pos)\nHighlights a call tip's text between positions *start_pos* to *end_pos* with\nthe color `view.call_tip_fore_hlt`.\n@param view A view.\n@param start_pos The start position in a call tip text to highlight.\n@param end_pos The end position in a call tip text to highlight.
-call_tip_show view.call_tip_show(view, pos, text)\nDisplays a call tip at position *pos* with string *text* as the call tip's\ncontents.\nAny "\001" or "\002" bytes in *text* are replaced by clickable up or down\narrow visuals, respectively. These may be used to indicate that a symbol has\nmore than one call tip, for example.\n@param view A view.\n@param pos The position in *view*'s buffer to show a call tip at.\n@param text The call tip text to show.
-call_tip_use_style view.call_tip_use_style (number)\nThe pixel width of tab characters in call tips.\nWhen non-zero, also enables the use of style number `view.STYLE_CALLTIP`\ninstead of `view.STYLE_DEFAULT` for call tip styles.\nThe default value is `0`.
+call_tip_set_hlt view.call_tip_set_hlt(view, start_pos, end_pos)\nHighlights a call tip's text between positions *start_pos* to *end_pos* with the color\n`view.call_tip_fore_hlt`.\n@param view A view.\n@param start_pos The start position in a call tip text to highlight.\n@param end_pos The end position in a call tip text to highlight.
+call_tip_show view.call_tip_show(view, pos, text)\nDisplays a call tip at position *pos* with string *text* as the call tip's contents.\nAny "\001" or "\002" bytes in *text* are replaced by clickable up or down arrow visuals,\nrespectively. These may be used to indicate that a symbol has more than one call tip,\nfor example.\n@param view A view.\n@param pos The position in *view*'s buffer to show a call tip at.\n@param text The call tip text to show.
+call_tip_use_style view.call_tip_use_style (number)\nThe pixel width of tab characters in call tips.\nWhen non-zero, also enables the use of style number `view.STYLE_CALLTIP` instead of\n`view.STYLE_DEFAULT` for call tip styles.\nThe default value is `0`.
can_redo buffer.can_redo(buffer)\nReturns whether or not there is an action to be redone.\n@param buffer A buffer.\n@return bool
can_undo buffer.can_undo(buffer)\nReturns whether or not there is an action to be undone.\n@param buffer A buffer.\n@return bool
-cancel buffer.cancel(buffer)\nCancels the active selection mode, autocompletion or user list, call tip,\netc.\n@param buffer A buffer.
+cancel buffer.cancel(buffer)\nCancels the active selection mode, autocompletion or user list, call tip, etc.\n@param buffer A buffer.
cancel_current textadept.snippets.cancel_current()\nCancels the active snippet, removing all inserted text.\nReturns `false` if no snippet is active.\n@return `false` if no snippet is active; `nil` otherwise.
caret_fore view.caret_fore (number)\nThe caret's foreground color, in "0xBBGGRR" format.
-caret_line_back view.caret_line_back (number)\nThe background color, in "0xBBGGRR" format, of the line that contains the\ncaret.
-caret_line_back_alpha view.caret_line_back_alpha (number)\nThe caret line's background alpha value, ranging from `0` (transparent) to\n`255` (opaque).\nThe default value is `view.ALPHA_NOALPHA`, for no alpha.
-caret_line_frame view.caret_line_frame (number)\nThe caret line's frame width in pixels.\nWhen non-zero, the line that contains the caret is framed instead of\ncolored in. The `view.caret_line_back` and `view.caret_line_back_alpha`\nproperties apply to the frame.\nThe default value is `0`.
+caret_line_back view.caret_line_back (number)\nThe background color, in "0xBBGGRR" format, of the line that contains the caret.
+caret_line_back_alpha view.caret_line_back_alpha (number)\nThe caret line's background alpha value, ranging from `0` (transparent) to `255` (opaque).\nThe default value is `view.ALPHA_NOALPHA`, for no alpha.
+caret_line_frame view.caret_line_frame (number)\nThe caret line's frame width in pixels.\nWhen non-zero, the line that contains the caret is framed instead of colored in. The\n`view.caret_line_back` and `view.caret_line_back_alpha` properties apply to the frame.\nThe default value is `0`.
caret_line_visible view.caret_line_visible (bool)\nColor the background of the line that contains the caret a different color.\nThe default value is `false`.
-caret_line_visible_always view.caret_line_visible_always (bool)\nAlways show the caret line, even when the view is not in focus.\nThe default value is `false`, showing the line only when the view is in\nfocus.
+caret_line_visible_always view.caret_line_visible_always (bool)\nAlways show the caret line, even when the view is not in focus.\nThe default value is `false`, showing the line only when the view is in focus.
caret_period view.caret_period (number)\nThe time between caret blinks in milliseconds.\nA value of `0` stops blinking.\nThe default value is `500`.
-caret_sticky buffer.caret_sticky (number)\nThe caret's preferred horizontal position when moving between lines.\n\n* `buffer.CARETSTICKY_OFF`\n Use the same position the caret had on the previous line.\n* `buffer.CARETSTICKY_ON`\n Use the last position the caret was moved to via the mouse, left/right\n arrow keys, home/end keys, etc. Typing text does not affect the position.\n* `buffer.CARETSTICKY_WHITESPACE`\n Use the position the caret had on the previous line, but prior to any\n inserted indentation.\n\nThe default value is `buffer.CARETSTICKY_OFF`.
-caret_style view.caret_style (number)\nThe caret's visual style.\n\n* `view.CARETSTYLE_INVISIBLE`\n No caret.\n* `view.CARETSTYLE_LINE`\n A line caret.\n* `view.CARETSTYLE_BLOCK`\n A block caret.\n\nAny block setting may be combined with `view.CARETSTYLE_BLOCK_AFTER` via\nbitwise OR (`|`) in order to draw the caret after the end of a selection,\nas opposed to just inside it.\n\nThe default value is `view.CARETSTYLE_LINE`.
+caret_sticky buffer.caret_sticky (number)\nThe caret's preferred horizontal position when moving between lines.\n\n* `buffer.CARETSTICKY_OFF`\n Use the same position the caret had on the previous line.\n* `buffer.CARETSTICKY_ON`\n Use the last position the caret was moved to via the mouse, left/right arrow keys,\n home/end keys, etc. Typing text does not affect the position.\n* `buffer.CARETSTICKY_WHITESPACE`\n Use the position the caret had on the previous line, but prior to any inserted indentation.\n\nThe default value is `buffer.CARETSTICKY_OFF`.
+caret_style view.caret_style (number)\nThe caret's visual style.\n\n* `view.CARETSTYLE_INVISIBLE`\n No caret.\n* `view.CARETSTYLE_LINE`\n A line caret.\n* `view.CARETSTYLE_BLOCK`\n A block caret.\n\nAny block setting may be combined with `view.CARETSTYLE_BLOCK_AFTER` via bitwise OR (`|`)\nin order to draw the caret after the end of a selection, as opposed to just inside it.\n\nThe default value is `view.CARETSTYLE_LINE`.
caret_width view.caret_width (number)\nThe line caret's pixel width in insert mode, between `0` and `20`.\nThe default value is `1`.
char_at buffer.char_at (table, Read-only)\nTable of character bytes per position.
char_left buffer.char_left(buffer)\nMoves the caret left one character.\n@param buffer A buffer.
-char_left_extend buffer.char_left_extend(buffer)\nMoves the caret left one character, extending the selected text to the new\nposition.\n@param buffer A buffer.
-char_left_rect_extend buffer.char_left_rect_extend(buffer)\nMoves the caret left one character, extending the rectangular selection to\nthe new position.\n@param buffer A buffer.
+char_left_extend buffer.char_left_extend(buffer)\nMoves the caret left one character, extending the selected text to the new position.\n@param buffer A buffer.
+char_left_rect_extend buffer.char_left_rect_extend(buffer)\nMoves the caret left one character, extending the rectangular selection to the new position.\n@param buffer A buffer.
char_right buffer.char_right(buffer)\nMoves the caret right one character.\n@param buffer A buffer.
-char_right_extend buffer.char_right_extend(buffer)\nMoves the caret right one character, extending the selected text to the new\nposition.\n@param buffer A buffer.
-char_right_rect_extend buffer.char_right_rect_extend(buffer)\nMoves the caret right one character, extending the rectangular selection to\nthe new position.\n@param buffer A buffer.
-choose_caret_x buffer.choose_caret_x(buffer)\nIdentifies the current horizontal caret position as the caret's preferred\nhorizontal position when moving between lines.\n@param buffer A buffer.\n@see caret_sticky
+char_right_extend buffer.char_right_extend(buffer)\nMoves the caret right one character, extending the selected text to the new position.\n@param buffer A buffer.
+char_right_rect_extend buffer.char_right_rect_extend(buffer)\nMoves the caret right one character, extending the rectangular selection to the new position.\n@param buffer A buffer.
+choose_caret_x buffer.choose_caret_x(buffer)\nIdentifies the current horizontal caret position as the caret's preferred horizontal position\nwhen moving between lines.\n@param buffer A buffer.\n@see caret_sticky
clear buffer.clear(buffer)\nDeletes the selected text or the character at the caret.\n@param buffer A buffer.
clear textadept.bookmarks.clear()\nClears all bookmarks in the current buffer.
clear textadept.history.clear()\nClears all view history.
clear_all buffer.clear_all(buffer)\nDeletes the buffer's text.\n@param buffer A buffer.
clear_document_style buffer.clear_document_style(buffer)\nClears all styling and folding information.\n@param buffer A buffer.
-clear_registered_images view.clear_registered_images(view)\nClears all images registered using `view.register_image()` and\n`view.register_rgba_image()`.\n@param view A view.
-clear_representation view.clear_representation(view, char)\nRemoves the alternate string representation for character *char* (which may\n be a multi-byte character).\n@param view A view.\n@param char The string character in `buffer.representations` to remove the\n alternate string representation for.
+clear_registered_images view.clear_registered_images(view)\nClears all images registered using `view.register_image()` and `view.register_rgba_image()`.\n@param view A view.
+clear_representation view.clear_representation(view, char)\nRemoves the alternate string representation for character *char* (which may be a multi-byte\n character).\n@param view A view.\n@param char The string character in `buffer.representations` to remove the alternate string\n representation for.
clipboard_text ui.clipboard_text (string)\nThe text on the clipboard.
-close buffer.close(buffer, force)\nCloses the buffer, prompting the user to continue if there are unsaved\nchanges (unless *force* is `true`), and returns `true` if the buffer was\nclosed.\n@param buffer A buffer.\n@param force Optional flag that discards unsaved changes without prompting\n the user. The default value is `false`.\n@return `true` if the buffer was closed; `nil` otherwise.
-close spawn_proc:close()\nCloses standard input for process *spawn_proc*, effectively sending an EOF\n(end of file) to it.
-close_all_buffers io.close_all_buffers()\nCloses all open buffers, prompting the user to continue if there are unsaved\nbuffers, and returns `true` if the user did not cancel.\nNo buffers are saved automatically. They must be saved manually.\n@return `true` if user did not cancel; `nil` otherwise.\n@see buffer.close
+close buffer.close(buffer, force)\nCloses the buffer, prompting the user to continue if there are unsaved changes (unless *force*\nis `true`), and returns `true` if the buffer was closed.\n@param buffer A buffer.\n@param force Optional flag that discards unsaved changes without prompting the user. The\n default value is `false`.\n@return `true` if the buffer was closed; `nil` otherwise.
+close spawn_proc:close()\nCloses standard input for process *spawn_proc*, effectively sending an EOF (end of file) to it.
+close_all_buffers io.close_all_buffers()\nCloses all open buffers, prompting the user to continue if there are unsaved buffers, and\nreturns `true` if the user did not cancel.\nNo buffers are saved automatically. They must be saved manually.\n@return `true` if user did not cancel; `nil` otherwise.\n@see buffer.close
cntrl lexer.cntrl (pattern)\nA pattern that matches any control character (ASCII codes 0 to 31).
-colorize buffer.colorize(buffer, start_pos, end_pos)\nInstructs the lexer to style and mark fold points in the range of text\nbetween *start_pos* and *end_pos*.\nIf *end_pos* is `-1`, styles and marks to the end of the buffer.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to\n process.\n@param end_pos The end position of the range of text in *buffer* to process,\n or `-1` to process from *start_pos* to the end of *buffer*.
-colors lexer.colors (table)\nMap of color name strings to color values in `0xBBGGRR` or `"#RRGGBB"`\nformat.\nNote: for applications running within a terminal emulator, only 16 color\nvalues are recognized, regardless of how many colors a user's terminal\nactually supports. (A terminal emulator's settings determines how to actually\ndisplay these recognized color values, which may end up being mapped to a\ncompletely different color set.) In order to use the light variant of a\ncolor, some terminals require a style's `bold` attribute must be set along\nwith that normal color. Recognized color values are black (0x000000), red\n(0x000080), green (0x008000), yellow (0x008080), blue (0x800000), magenta\n(0x800080), cyan (0x808000), white (0xC0C0C0), light black (0x404040), light\nred (0x0000FF), light green (0x00FF00), light yellow (0x00FFFF), light blue\n(0xFF0000), light magenta (0xFF00FF), light cyan (0xFFFF00), and light white\n(0xFFFFFF).
-colorselect ui.dialogs.colorselect(options)\nPrompts the user with a color selection dialog defined by dialog options\ntable *options*, returning the color selected.\nIf the user canceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the option select dialog.\n\n * `title`: The dialog's title text.\n * `color`: The initially selected color as either a number in "0xBBGGRR"\n format, or as a string in "#RRGGBB" format.\n * `palette`: The list of colors to show in the dialog's color palette.\n Up to 20 colors can be specified as either numbers in "0xBBGGRR" format\n or as strings in "#RRGGBB" format. If `true` (no list was given), a\n default palette is shown.\n * `string_output`: Return the selected color in string "#RRGGBB" format\n instead of as a number. The default value is `false`.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n@usage ui.dialogs.colorselect{title = 'Foreground color', color = 0x000000,\n palette = {'#000000', 0x0000FF, '#00FF00', 0xFF0000}}\n@return selected color
+colorize buffer.colorize(buffer, start_pos, end_pos)\nInstructs the lexer to style and mark fold points in the range of text between *start_pos*\nand *end_pos*.\nIf *end_pos* is `-1`, styles and marks to the end of the buffer.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to process.\n@param end_pos The end position of the range of text in *buffer* to process, or `-1` to\n process from *start_pos* to the end of *buffer*.
+colors lexer.colors (table)\nMap of color name strings to color values in `0xBBGGRR` or `"#RRGGBB"` format.\nNote: for applications running within a terminal emulator, only 16 color values are recognized,\nregardless of how many colors a user's terminal actually supports. (A terminal emulator's\nsettings determines how to actually display these recognized color values, which may end up\nbeing mapped to a completely different color set.) In order to use the light variant of a\ncolor, some terminals require a style's `bold` attribute must be set along with that normal\ncolor. Recognized color values are black (0x000000), red (0x000080), green (0x008000), yellow\n(0x008080), blue (0x800000), magenta (0x800080), cyan (0x808000), white (0xC0C0C0), light black\n(0x404040), light red (0x0000FF), light green (0x00FF00), light yellow (0x00FFFF), light blue\n(0xFF0000), light magenta (0xFF00FF), light cyan (0xFFFF00), and light white (0xFFFFFF).
+colorselect ui.dialogs.colorselect(options)\nPrompts the user with a color selection dialog defined by dialog options table *options*,\nreturning the color selected.\nIf the user canceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the option select dialog.\n\n * `title`: The dialog's title text.\n * `color`: The initially selected color as either a number in "0xBBGGRR" format, or as a\n string in "#RRGGBB" format.\n * `palette`: The list of colors to show in the dialog's color palette. Up to 20 colors can\n be specified as either numbers in "0xBBGGRR" format or as strings in "#RRGGBB" format. If\n `true` (no list was given), a default palette is shown.\n * `string_output`: Return the selected color in string "#RRGGBB" format instead of as a\n number. The default value is `false`.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n@usage ui.dialogs.colorselect{title = 'Foreground color', color = 0x000000,\n palette = {'#000000', 0x0000FF, '#00FF00', 0xFF0000}}\n@return selected color
column buffer.column (table, Read-only)\nTable of column numbers (taking tab widths into account) per position.\nMulti-byte characters count as single characters.
-command_entry ui.command_entry (module)\nTextadept's Command Entry.\nIt supports multiple modes that each have their own functionality (such as\nrunning Lua code and filtering text through shell commands) and history.
-comment_string textadept.editing.comment_string (table)\nMap of lexer names to line comment strings for programming languages, used by\nthe `toggle_comment()` function.\nKeys are lexer names and values are either the language's line comment\nprefixes or block comment delimiters separated by a '|' character.\n@see toggle_comment
-compile textadept.run.compile(filename)\nCompiles file *filename* or the current file using an appropriate shell\ncommand from the `compile_commands` table.\nThe shell command is determined from the file's filename, extension, or\nlanguage in that order.\nEmits `COMPILE_OUTPUT` events.\n@param filename Optional path to the file to compile. The default value is\n the current file's filename.\n@see compile_commands\n@see _G.events
-compile_commands textadept.run.compile_commands (table)\nMap of filenames, file extensions, and lexer names to their associated\n"compile" shell command line strings or functions that return such strings.\nCommand line strings may have the following macros:\n\n + `%f`: The file's name, including its extension.\n + `%e`: The file's name, excluding its extension.\n + `%d`: The file's directory path.\n + `%p`: The file's full path.\n\nFunctions may also return a working directory and process environment table\nto operate in. By default, the working directory is the current file's parent\ndirectory and the environment is Textadept's environment.
-connect events.connect(event, f, index)\nAdds function *f* to the set of event handlers for event *event* at position\n*index*.\nIf *index* not given, appends *f* to the set of handlers. *event* may be any\narbitrary string and does not need to have been previously defined.\n@param event The string event name.\n@param f The Lua function to connect to *event*.\n@param index Optional index to insert the handler into.\n@usage events.connect('my_event', function(msg) ui.print(msg) end)\n@see disconnect
+command_entry ui.command_entry (module)\nTextadept's Command Entry.\nIt supports multiple modes that each have their own functionality (such as running Lua code\nand filtering text through shell commands) and history.
+comment_string textadept.editing.comment_string (table)\nMap of lexer names to line comment strings for programming languages, used by the\n`toggle_comment()` function.\nKeys are lexer names and values are either the language's line comment prefixes or block\ncomment delimiters separated by a '|' character.\n@see toggle_comment
+compile textadept.run.compile(filename)\nCompiles file *filename* or the current file using an appropriate shell command from the\n`compile_commands` table.\nThe shell command is determined from the file's filename, extension, or language in that order.\nEmits `COMPILE_OUTPUT` events.\n@param filename Optional path to the file to compile. The default value is the current\n file's filename.\n@see compile_commands\n@see _G.events
+compile_commands textadept.run.compile_commands (table)\nMap of filenames, file extensions, and lexer names to their associated "compile" shell\ncommand line strings or functions that return such strings.\nCommand line strings may have the following macros:\n\n + `%f`: The file's name, including its extension.\n + `%e`: The file's name, excluding its extension.\n + `%d`: The file's directory path.\n + `%p`: The file's full path.\n\nFunctions may also return a working directory and process environment table to operate in. By\ndefault, the working directory is the current file's parent directory and the environment\nis Textadept's environment.
+connect events.connect(event, f, index)\nAdds function *f* to the set of event handlers for event *event* at position *index*.\nIf *index* not given, appends *f* to the set of handlers. *event* may be any arbitrary string\nand does not need to have been previously defined.\n@param event The string event name.\n@param f The Lua function to connect to *event*.\n@param index Optional index to insert the handler into.\n@usage events.connect('my_event', function(msg) ui.print(msg) end)\n@see disconnect
constants _SCINTILLA.constants (table)\nMap of Scintilla constant names to their numeric values.\n@see _G.buffer
-context_menu textadept.menu.context_menu (table)\nThe default right-click context menu.\nSubmenus, and menu items can be retrieved by name in addition to table index\nnumber.
+context_menu textadept.menu.context_menu (table)\nThe default right-click context menu.\nSubmenus, and menu items can be retrieved by name in addition to table index number.
context_menu ui.context_menu (userdata)\nThe buffer's context menu, a `ui.menu()`.\nThis is a low-level field. You probably want to use the higher-level\n`textadept.menu.context_menu`.
-contracted_fold_next view.contracted_fold_next(view, line)\nReturns the line number of the next contracted fold point starting from line\nnumber *line*, or `-1` if none exists.\n@param view A view.\n@param line The line number in *view* to start at.\n@return number
+contracted_fold_next view.contracted_fold_next(view, line)\nReturns the line number of the next contracted fold point starting from line number *line*,\nor `-1` if none exists.\n@param view A view.\n@param line The line number in *view* to start at.\n@return number
convert_eols buffer.convert_eols(buffer, mode)\nConverts all end of line characters to those in end of line mode *mode*.\n@param buffer A buffer.\n@param mode The end of line mode to convert to. Valid values are:\n * `buffer.EOL_CRLF`\n * `buffer.EOL_CR`\n * `buffer.EOL_LF`
-convert_indentation textadept.editing.convert_indentation()\nConverts indentation between tabs and spaces according to `buffer.use_tabs`.\nIf `buffer.use_tabs` is `true`, `buffer.tab_width` indenting spaces are\nconverted to tabs. Otherwise, all indenting tabs are converted to\n`buffer.tab_width` spaces.\n@see buffer.use_tabs
-copy buffer.copy(buffer)\nCopies the selected text to the clipboard.\nMultiple selections are copied in order with no delimiters. Rectangular\nselections are copied from top to bottom with end of line characters. Virtual\nspace is not copied.\n@param buffer A buffer.
-copy_range buffer.copy_range(buffer, start_pos, end_pos)\nCopies to the clipboard the range of text between positions *start_pos* and\n*end_pos*.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to copy.\n@param end_pos The end position of the range of text in *buffer* to copy.
+convert_indentation textadept.editing.convert_indentation()\nConverts indentation between tabs and spaces according to `buffer.use_tabs`.\nIf `buffer.use_tabs` is `true`, `buffer.tab_width` indenting spaces are converted to tabs.\nOtherwise, all indenting tabs are converted to `buffer.tab_width` spaces.\n@see buffer.use_tabs
+copy buffer.copy(buffer)\nCopies the selected text to the clipboard.\nMultiple selections are copied in order with no delimiters. Rectangular selections are copied\nfrom top to bottom with end of line characters. Virtual space is not copied.\n@param buffer A buffer.
+copy_range buffer.copy_range(buffer, start_pos, end_pos)\nCopies to the clipboard the range of text between positions *start_pos* and *end_pos*.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to copy.\n@param end_pos The end position of the range of text in *buffer* to copy.
copy_text buffer.copy_text(buffer, text)\nCopies string *text* to the clipboard.\n@param buffer A buffer.\n@param text The text to copy.
-count_characters buffer.count_characters(buffer, start_pos, end_pos)\nReturns the number of whole characters (taking multi-byte characters into\naccount) between positions *start_pos* and *end_pos*.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to start\n counting at.\n@param end_pos The end position of the range of text in *buffer* to stop\n counting at.\n@return number
+count_characters buffer.count_characters(buffer, start_pos, end_pos)\nReturns the number of whole characters (taking multi-byte characters into account) between\npositions *start_pos* and *end_pos*.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to start counting at.\n@param end_pos The end position of the range of text in *buffer* to stop counting at.\n@return number
current_pos buffer.current_pos (number)\nThe caret's position.\nWhen set, does not scroll the caret into view.
cursor view.cursor (number)\nThe display cursor type.\n\n* `view.CURSORNORMAL`\n The text insert cursor.\n* `view.CURSORARROW`\n The arrow cursor.\n* `view.CURSORWAIT`\n The wait cursor.\n* `view.CURSORREVERSEARROW`\n The reversed arrow cursor.\n\nThe default value is `view.CURSORNORMAL`.
-cut buffer.cut(buffer)\nCuts the selected text to the clipboard.\nMultiple selections are copied in order with no delimiters. Rectangular\nselections are copied from top to bottom with end of line characters. Virtual\nspace is not copied.\n@param buffer A buffer.
+cut buffer.cut(buffer)\nCuts the selected text to the clipboard.\nMultiple selections are copied in order with no delimiters. Rectangular selections are copied\nfrom top to bottom with end of line characters. Virtual space is not copied.\n@param buffer A buffer.
dec_num lexer.dec_num (pattern)\nA pattern that matches a decimal number.
-default_filter lfs.default_filter (table)\nThe filter table containing common binary file extensions and version control\ndirectories to exclude when iterating over files and directories using\n`walk`.\nExtensions excluded: a, bmp, bz2, class, dll, exe, gif, gz, jar, jpeg, jpg,\no, pdf, png, so, tar, tgz, tif, tiff, xz, and zip.\nDirectories excluded: .bzr, .git, .hg, .svn, _FOSSIL_, and node_modules.\n@see walk
-del_line_left buffer.del_line_left(buffer)\nDeletes the range of text from the caret to the beginning of the current\nline.\n@param buffer A buffer.
+default_filter lfs.default_filter (table)\nThe filter table containing common binary file extensions and version control directories\nto exclude when iterating over files and directories using `walk`.\nExtensions excluded: a, bmp, bz2, class, dll, exe, gif, gz, jar, jpeg, jpg, o, pdf, png,\nso, tar, tgz, tif, tiff, xz, and zip.\nDirectories excluded: .bzr, .git, .hg, .svn, _FOSSIL_, and node_modules.\n@see walk
+del_line_left buffer.del_line_left(buffer)\nDeletes the range of text from the caret to the beginning of the current line.\n@param buffer A buffer.
del_line_right buffer.del_line_right(buffer)\nDeletes the range of text from the caret to the end of the current line.\n@param buffer A buffer.
-del_word_left buffer.del_word_left(buffer)\nDeletes the word to the left of the caret, including any leading non-word\ncharacters.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-del_word_right buffer.del_word_right(buffer)\nDeletes the word to the right of the caret, including any trailing non-word\ncharacters.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-del_word_right_end buffer.del_word_right_end(buffer)\nDeletes the word to the right of the caret, excluding any trailing non-word\ncharacters.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-delete buffer.delete(buffer)\nDeletes the buffer.\n**Do not call this function.** Call `buffer:close()` instead. Emits a\n`BUFFER_DELETED` event.\n@param buffer A buffer.\n@see events.BUFFER_DELETED
+del_word_left buffer.del_word_left(buffer)\nDeletes the word to the left of the caret, including any leading non-word characters.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+del_word_right buffer.del_word_right(buffer)\nDeletes the word to the right of the caret, including any trailing non-word characters.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+del_word_right_end buffer.del_word_right_end(buffer)\nDeletes the word to the right of the caret, excluding any trailing non-word characters.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+delete buffer.delete(buffer)\nDeletes the buffer.\n**Do not call this function.** Call `buffer:close()` instead. Emits a `BUFFER_DELETED` event.\n@param buffer A buffer.\n@see events.BUFFER_DELETED
delete_back buffer.delete_back(buffer)\nDeletes the character behind the caret if no text is selected.\nOtherwise, deletes the selected text.\n@param buffer A buffer.
-delete_back_not_line buffer.delete_back_not_line(buffer)\nDeletes the character behind the caret unless either the caret is at the\nbeginning of a line or text is selected.\nIf text is selected, deletes it.\n@param buffer A buffer.
+delete_back_not_line buffer.delete_back_not_line(buffer)\nDeletes the character behind the caret unless either the caret is at the beginning of a line\nor text is selected.\nIf text is selected, deletes it.\n@param buffer A buffer.
delete_range buffer.delete_range(buffer, pos, length)\nDeletes the range of text from position *pos* to *pos* + *length*.\n@param buffer A buffer.\n@param pos The start position of the range of text in *buffer* to delete.\n@param length The number of characters in the range of text to delete.
-dialog ui.dialog(kind, ...)\nLow-level function for prompting the user with a gtdialog of kind *kind*\nwith the given string and table arguments, returning a formatted string of\nthe dialog's output.\nYou probably want to use the higher-level functions in the `ui.dialogs`\nmodule.\nTable arguments containing strings are allowed and expanded in place. This is\nuseful for filtered list dialogs with many items.\n@param kind The kind of gtdialog.\n@param ... Parameters to the gtdialog.\n@return string gtdialog result.
+dialog ui.dialog(kind, ...)\nLow-level function for prompting the user with a gtdialog of kind *kind* with the given\nstring and table arguments, returning a formatted string of the dialog's output.\nYou probably want to use the higher-level functions in the `ui.dialogs` module.\nTable arguments containing strings are allowed and expanded in place. This is useful for\nfiltered list dialogs with many items.\n@param kind The kind of gtdialog.\n@param ... Parameters to the gtdialog.\n@return string gtdialog result.
dialogs ui.dialogs (module)\nProvides a set of interactive dialog prompts for user input.
digit lexer.digit (pattern)\nA pattern that matches any digit ('0'-'9').
disconnect events.disconnect(event, f)\nRemoves function *f* from the set of handlers for event *event*.\n@param event The string event name.\n@param f The Lua function connected to *event*.\n@see connect
-doc_line_from_visible view.doc_line_from_visible(view, display_line)\nReturns the actual line number of displayed line number *display_line*,\ntaking wrapped, annotated, and hidden lines into account.\nIf *display_line* is less than or equal to `1`, returns `1`. If\n*display_line* is greater than the number of displayed lines, returns\n`buffer.line_count`.\n@param view A view.\n@param display_line The display line number to use.\n@return number
+doc_line_from_visible view.doc_line_from_visible(view, display_line)\nReturns the actual line number of displayed line number *display_line*, taking wrapped,\nannotated, and hidden lines into account.\nIf *display_line* is less than or equal to `1`, returns `1`. If *display_line* is greater\nthan the number of displayed lines, returns `buffer.line_count`.\n@param view A view.\n@param display_line The display line number to use.\n@return number
document_end buffer.document_end(buffer)\nMoves the caret to the end of the buffer.\n@param buffer A buffer.
-document_end_extend buffer.document_end_extend(buffer)\nMoves the caret to the end of the buffer, extending the selected text to the\nnew position.\n@param buffer A buffer.
+document_end_extend buffer.document_end_extend(buffer)\nMoves the caret to the end of the buffer, extending the selected text to the new position.\n@param buffer A buffer.
document_start buffer.document_start(buffer)\nMoves the caret to the beginning of the buffer.\n@param buffer A buffer.
-document_start_extend buffer.document_start_extend(buffer)\nMoves the caret to the beginning of the buffer, extending the selected text\nto the new position.\n@param buffer A buffer.
+document_start_extend buffer.document_start_extend(buffer)\nMoves the caret to the beginning of the buffer, extending the selected text to the new position.\n@param buffer A buffer.
drop_selection_n buffer.drop_selection_n(buffer, n)\nDrops existing selection number *n*.\n@param buffer A buffer.\n@param n The number of the existing selection.
-dropdown ui.dialogs.dropdown(options)\nPrompts the user with a drop-down item selection dialog defined by dialog\noptions table *options*, returning the selected button's index along with the\nindex of the selected item.\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the selected item's text.\nIf the dialog closed due to *options*.`exit_onchange`, returns `4` along with\neither the selected item's index or its text. If the dialog timed out,\nreturns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or\n`"delete"`.\n@param options Table of key-value option pairs for the drop-down dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string items to show in the drop-down.\n * `button1`: The right-most button's label. The default value is\n `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `exit_onchange`: Close the dialog after selecting a new item. The default\n value is `false`.\n * `select`: The index of the initially selected list item. The default\n value is `1`.\n * `string_output`: Return the selected button's label (instead of its\n index) and the selected item's text (instead of its index). If no item\n was selected, returns the dialog's exit status (instead of its exit\n code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.dropdown{title = 'Select Encoding', width = 200,\n items = io.encodings, string_output = true}\n@return selected button or exit code, selected item
-edge_color view.edge_color (number)\nThe color, in "0xBBGGRR" format, of the single edge or background for long\nlines according to `view.edge_mode`.
+dropdown ui.dialogs.dropdown(options)\nPrompts the user with a drop-down item selection dialog defined by dialog options table\n*options*, returning the selected button's index along with the index of the selected item.\nIf *options*.`string_output` is `true`, returns the selected button's label along with the\nselected item's text. If the dialog closed due to *options*.`exit_onchange`, returns `4`\nalong with either the selected item's index or its text. If the dialog timed out, returns\n`0` or `"timeout"`. If the user canceled the dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the drop-down dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string items to show in the drop-down.\n * `button1`: The right-most button's label. The default value is `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2` to be set.\n * `exit_onchange`: Close the dialog after selecting a new item. The default value is `false`.\n * `select`: The index of the initially selected list item. The default value is `1`.\n * `string_output`: Return the selected button's label (instead of its index) and the selected\n item's text (instead of its index). If no item was selected, returns the dialog's exit\n status (instead of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.dropdown{title = 'Select Encoding', width = 200, items = io.encodings,\n string_output = true}\n@return selected button or exit code, selected item
+edge_color view.edge_color (number)\nThe color, in "0xBBGGRR" format, of the single edge or background for long lines according\nto `view.edge_mode`.
edge_column view.edge_column (number)\nThe column number to mark long lines at.
-edge_mode view.edge_mode (number)\nThe long line mark mode.\n\n* `view.EDGE_NONE`\n Long lines are not marked.\n* `view.EDGE_LINE`\n Draw a single vertical line whose color is `view.edge_color` at\n column `view.edge_column`.\n* `view.EDGE_BACKGROUND`\n Change the background color of text after column `view.edge_column`\n to `view.edge_color`.\n* `view.EDGE_MULTILINE`\n Draw vertical lines whose colors and columns are defined by calls to\n `view:multi_edge_add_line()`.
+edge_mode view.edge_mode (number)\nThe long line mark mode.\n\n* `view.EDGE_NONE`\n Long lines are not marked.\n* `view.EDGE_LINE`\n Draw a single vertical line whose color is `view.edge_color` at column\n `view.edge_column`.\n* `view.EDGE_BACKGROUND`\n Change the background color of text after column `view.edge_column` to\n `view.edge_color`.\n* `view.EDGE_MULTILINE`\n Draw vertical lines whose colors and columns are defined by calls to\n `view:multi_edge_add_line()`.
edit_toggle_overtype buffer.edit_toggle_overtype(buffer)\nToggles `buffer.overtype`.\n@param buffer A buffer.
editing textadept.editing (module)\nEditing features for Textadept.
-editing_keys ui.command_entry.editing_keys (table)\nA metatable with typical platform-specific key bindings for text entries.\nThis metatable may be used to add basic editing and movement keys to command\nentry modes. It is automatically added to command entry modes unless a\nmetatable was previously set.
-embed lexer.embed(lexer, child, start_rule, end_rule)\nEmbeds child lexer *child* in parent lexer *lexer* using patterns\n*start_rule* and *end_rule*, which signal the beginning and end of the\nembedded lexer, respectively.\n@param lexer The parent lexer.\n@param child The child lexer.\n@param start_rule The pattern that signals the beginning of the embedded\n lexer.\n@param end_rule The pattern that signals the end of the embedded lexer.\n@usage html:embed(css, css_start_rule, css_end_rule)\n@usage html:embed(lex, php_start_rule, php_end_rule) -- from php lexer
-emit events.emit(event, ...)\nSequentially calls all handler functions for event *event* with the given\narguments.\n*event* may be any arbitrary string and does not need to have been previously\ndefined. If any handler explicitly returns a value that is not `nil`,\n`emit()` returns that value and ceases to call subsequent handlers. This is\nuseful for stopping the propagation of an event like a keypress after it has\nbeen handled, or for passing back values from handlers.\n@param event The string event name.\n@param ... Arguments passed to the handler.\n@usage events.emit('my_event', 'my message')\n@return `nil` unless any any handler explicitly returned a non-`nil` value;\n otherwise returns that value
+editing_keys ui.command_entry.editing_keys (table)\nA metatable with typical platform-specific key bindings for text entries.\nThis metatable may be used to add basic editing and movement keys to command entry modes. It\nis automatically added to command entry modes unless a metatable was previously set.
+embed lexer.embed(lexer, child, start_rule, end_rule)\nEmbeds child lexer *child* in parent lexer *lexer* using patterns *start_rule* and *end_rule*,\nwhich signal the beginning and end of the embedded lexer, respectively.\n@param lexer The parent lexer.\n@param child The child lexer.\n@param start_rule The pattern that signals the beginning of the embedded lexer.\n@param end_rule The pattern that signals the end of the embedded lexer.\n@usage html:embed(css, css_start_rule, css_end_rule)\n@usage html:embed(lex, php_start_rule, php_end_rule) -- from php lexer
+emit events.emit(event, ...)\nSequentially calls all handler functions for event *event* with the given arguments.\n*event* may be any arbitrary string and does not need to have been previously defined. If\nany handler explicitly returns a value that is not `nil`, `emit()` returns that value and\nceases to call subsequent handlers. This is useful for stopping the propagation of an event\nlike a keypress after it has been handled, or for passing back values from handlers.\n@param event The string event name.\n@param ... Arguments passed to the handler.\n@usage events.emit('my_event', 'my message')\n@return `nil` unless any any handler explicitly returned a non-`nil` value; otherwise returns\n that value
empty_undo_buffer buffer.empty_undo_buffer(buffer)\nDeletes the undo and redo history.\n@param buffer A buffer.
-enclose textadept.editing.enclose(left, right)\nEncloses the selected text or the current word within strings *left* and\n*right*, taking multiple selections into account.\n@param left The left part of the enclosure.\n@param right The right part of the enclosure.
+enclose textadept.editing.enclose(left, right)\nEncloses the selected text or the current word within strings *left* and *right*, taking\nmultiple selections into account.\n@param left The left part of the enclosure.\n@param right The right part of the enclosure.
encoding buffer.encoding (string or nil)\nThe string encoding of the file, or `nil` for binary files.
-encodings io.encodings (table)\nList of encodings to attempt to decode files as.\nYou should add to this list if you get a "Conversion failed" error when\ntrying to open a file whose encoding is not recognized. Valid encodings are\nGNU iconv's encodings and include:\n\n * European: ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, KOI8-R, KOI8-U,\n KOI8-RU, CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},\n Mac{Roman,CentralEurope,Iceland,Croatian,Romania},\n Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh.\n * Unicode: UTF-8, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UTF-16,\n UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF-7, C99, JAVA.
+encodings io.encodings (table)\nList of encodings to attempt to decode files as.\nYou should add to this list if you get a "Conversion failed" error when trying to open a file\nwhose encoding is not recognized. Valid encodings are GNU iconv's encodings and include:\n\n * European: ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, KOI8-R,\n KOI8-U, KOI8-RU, CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},\n Mac{Roman,CentralEurope,Iceland,Croatian,Romania}, Mac{Cyrillic,Ukraine,Greek,Turkish},\n Macintosh.\n * Unicode: UTF-8, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UTF-16, UTF-16BE,\n UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF-7, C99, JAVA.
end_at_last_line view.end_at_last_line (bool)\nDisable scrolling past the last line.\nThe default value is `true`.
-end_styled buffer.end_styled (number, Read-only)\nThe current styling position or the last correctly styled character's\nposition.
+end_styled buffer.end_styled (number, Read-only)\nThe current styling position or the last correctly styled character's position.
end_undo_action buffer.end_undo_action(buffer)\nEnds a sequence of actions to be undone or redone as a single action.\n@param buffer A buffer.
ensure_visible view.ensure_visible(view, line)\nEnsures line number *line* is visible by expanding any fold points hiding it.\n@param view A view.\n@param line The line number in *view* to ensure visible.
-ensure_visible_enforce_policy view.ensure_visible_enforce_policy(view, line)\nEnsures line number *line* is visible by expanding any fold points hiding it\nbased on the vertical caret policy previously defined in\n`view.set_visible_policy()`.\n@param view A view.\n@param line The line number in *view* to ensure visible.
+ensure_visible_enforce_policy view.ensure_visible_enforce_policy(view, line)\nEnsures line number *line* is visible by expanding any fold points hiding it based on the\nvertical caret policy previously defined in `view.set_visible_policy()`.\n@param view A view.\n@param line The line number in *view* to ensure visible.
eol_annotation_clear_all buffer.eol_annotation_clear_all(buffer)\nClears EOL annotations from all lines.\n@param buffer A buffer.
-eol_annotation_style buffer.eol_annotation_style (table)\nTable of style numbers for EOL annotation text per line number.\nOnly some style attributes are active in annotations: font,\nsize/size_fractional, bold/weight, italics, fore, back, and character_set.
+eol_annotation_style buffer.eol_annotation_style (table)\nTable of style numbers for EOL annotation text per line number.\nOnly some style attributes are active in annotations: font, size/size_fractional, bold/weight,\nitalics, fore, back, and character_set.
eol_annotation_text buffer.eol_annotation_text (table)\nTable of EOL annotation text per line number.
eol_annotation_visible view.eol_annotation_visible (number)\nThe EOL annotation visibility mode.\n\n* `view.EOLANNOTATION_HIDDEN`\n EOL Annotations are invisible.\n* `view.EOLANNOTATION_STANDARD`\n Draw EOL annotations no decoration.\n* `view.EOLANNOTATION_BOXED`\n Draw EOL annotations outlined with a box.\n\nThe default value is `view.EOLANNOTATION_HIDDEN`.
-eol_mode buffer.eol_mode (number)\nThe current end of line mode. Changing the current mode does not convert\nany of the buffer's existing end of line characters.\nUse `buffer.convert_eols()` to do so.\n\n* `buffer.EOL_CRLF`\n Carriage return with line feed ("\r\\n").\n* `buffer.EOL_CR`\n Carriage return ("\r").\n* `buffer.EOL_LF`\n Line feed ("\\n").\n\nThe default value is `buffer.EOL_CRLF` on Windows platforms,\n`buffer.EOL_LF` otherwise.
-error_patterns textadept.run.error_patterns (table)\nMap of file extensions and lexer names to their associated lists of string\npatterns that match warning and error messages emitted by compile and run\ncommands for those file extensions and lexers.\nPatterns match single lines and contain captures for a filename, line number,\ncolumn number (optional), and warning or error message (optional).\nDouble-clicking a warning or error message takes the user to the source of\nthat warning/error.\nNote: `(.-)` captures in patterns are interpreted as filenames; `(%d+)`\ncaptures are interpreted as line numbers first, and then column numbers; and\nany other capture is treated as warning/error message text.
-events _G.events (module)\nTextadept's core event structure and handlers.\n\nTextadept emits events when you do things like create a new buffer, press a\nkey, click on a menu, etc. You can even emit events yourself using Lua. Each\nevent has a set of event handlers, which are simply Lua functions called in\nthe order they were connected to an event. For example, if you created a\nmodule that needs to do something each time Textadept creates a new buffer,\nconnect a Lua function to the `events.BUFFER_NEW` event:\n\n events.connect(events.BUFFER_NEW, function()\n -- Do something here.\n end)\n\nEvents themselves are nothing special. You do not have to declare one before\nusing it. Events are simply strings containing arbitrary event names. When\neither you or Textadept emits an event, Textadept runs all event handlers\nconnected to the event, passing any given arguments to the event's handler\nfunctions. If an event handler explicitly returns a value that is not `nil`,\nTextadept will not call subsequent handlers. This is useful if you want to\nstop the propagation of an event like a keypress if your event handler\nhandled it, or if you want to use the event framework to pass values.\n
+eol_mode buffer.eol_mode (number)\nThe current end of line mode.\nChanging the current mode does not convert any of the buffer's existing end of line\ncharacters. Use `buffer.convert_eols()` to do so.\n\n* `buffer.EOL_CRLF`\n Carriage return with line feed ("\r\\n").\n* `buffer.EOL_CR`\n Carriage return ("\r").\n* `buffer.EOL_LF`\n Line feed ("\\n").\n\nThe default value is `buffer.EOL_CRLF` on Windows platforms, `buffer.EOL_LF` otherwise.
+error_patterns textadept.run.error_patterns (table)\nMap of file extensions and lexer names to their associated lists of string patterns that\nmatch warning and error messages emitted by compile and run commands for those file extensions\nand lexers.\nPatterns match single lines and contain captures for a filename, line number, column number\n(optional), and warning or error message (optional). Double-clicking a warning or error\nmessage takes the user to the source of that warning/error.\nNote: `(.-)` captures in patterns are interpreted as filenames; `(%d+)` captures are\ninterpreted as line numbers first, and then column numbers; and any other capture is treated\nas warning/error message text.
+events _G.events (module)\nTextadept's core event structure and handlers.\n\nTextadept emits events when you do things like create a new buffer, press a key, click on\na menu, etc. You can even emit events yourself using Lua. Each event has a set of event\nhandlers, which are simply Lua functions called in the order they were connected to an\nevent. For example, if you created a module that needs to do something each time Textadept\ncreates a new buffer, connect a Lua function to the `events.BUFFER_NEW` event:\n\n events.connect(events.BUFFER_NEW, function()\n -- Do something here.\n end)\n\nEvents themselves are nothing special. You do not have to declare one before using it. Events\nare simply strings containing arbitrary event names. When either you or Textadept emits an\nevent, Textadept runs all event handlers connected to the event, passing any given arguments\nto the event's handler functions. If an event handler explicitly returns a value that is not\n`nil`, Textadept will not call subsequent handlers. This is useful if you want to stop the\npropagation of an event like a keypress if your event handler handled it, or if you want to\nuse the event framework to pass values.\n
events _SCINTILLA.events (table)\nMap of Scintilla event IDs to tables of event names and event parameters.
-expr_types _M.lua.expr_types (table)\nMap of expression patterns to their types.\nUsed for type-hinting when showing autocompletions for variables.\nExpressions are expected to match after the '=' sign of a statement.
+expr_types _M.lua.expr_types (table)\nMap of expression patterns to their types.\nUsed for type-hinting when showing autocompletions for variables. Expressions are expected\nto match after the '=' sign of a statement.
extend lexer.extend (pattern)\nA pattern that matches any ASCII extended character (codes 0 to 255).
-extensions textadept.file_types.extensions (table)\nMap of file extensions to their associated lexer names.\nIf the file type is not recognized by its first-line, each file extension is\nmatched against the file's extension.
+extensions textadept.file_types.extensions (table)\nMap of file extensions to their associated lexer names.\nIf the file type is not recognized by its first-line, each file extension is matched against\nthe file's extension.
extra_ascent view.extra_ascent (number)\nThe amount of pixel padding above lines.\nThe default value is `0`.
extra_descent view.extra_descent (number)\nThe amount of pixel padding below lines.\nThe default is `0`.
file_types textadept.file_types (module)\nHandles file type detection for Textadept.
filename buffer.filename (string)\nThe absolute file path associated with the buffer.
-filesave ui.dialogs.filesave(options)\nPrompts the user with a file save dialog defined by dialog options table\n*options*, returning the string file chosen.\nIf the user canceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the dialog.\n\n * `title`: The dialog's title text.\n * `with_directory`: The initial filesystem directory to show.\n * `with_file`: The initially chosen filename. This option requires\n `with_directory` to be set.\n * `with_extension`: The list of extensions selectable files must have.\n * `no_create_directories`: Prevent the user from creating new directories.\n The default value is `false`.\n@return filename or nil
-fileselect ui.dialogs.fileselect(options)\nPrompts the user with a file selection dialog defined by dialog options\ntable *options*, returning the string file selected.\nIf *options*.`select_multiple` is `true`, returns the list of files selected.\nIf the user canceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the dialog.\n\n * `title`: The dialog's title text.\n * `with_directory`: The initial filesystem directory to show.\n * `with_file`: The initially selected filename. This option requires\n `with_directory` to be set.\n * `with_extension`: The list of extensions selectable files must have.\n * `select_multiple`: Allow the user to select multiple files. The default\n value is `false`.\n * `select_only_directories`: Only allow the user to select directories. The\n default value is `false`.\n@usage ui.dialogs.fileselect{title = 'Open C File', with_directory = _HOME,\n with_extension = {'c', 'h'}, select_multiple = true}\n@return filename, list of filenames, or nil
-filter_through textadept.editing.filter_through(command)\nPasses the selected text or all buffer text to string shell command *command*\nas standard input (stdin) and replaces the input text with the command's\nstandard output (stdout). *command* may contain shell pipes ('|').\nStandard input is as follows:\n\n1. If no text is selected, the entire buffer is used.\n2. If text is selected and spans a single line, only the selected text is\nused.\n3. If text is selected and spans multiple lines, all text on the lines that\nhave text selected is passed as stdin. However, if the end of the selection\nis at the beginning of a line, only the line ending delimiters from the\nprevious line are included. The rest of the line is excluded.\n@param command The Linux, BSD, macOS, or Windows shell command to filter text\n through. May contain pipes.
-filteredlist ui.dialogs.filteredlist(options)\nPrompts the user with a filtered list item selection dialog defined by dialog\noptions table *options*, returning the selected button's index along with the\nindex or indices of the selected item or items (depending on whether or not\n*options*.`select_multiple` is `true`).\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the text of the selected item or items.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\nSpaces in the filter text are treated as wildcards.\n@param options Table of key-value option pairs for the filtered list dialog.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text.\n * `text`: The dialog's initial input text.\n * `columns`: The list of string column names for list rows.\n * `items`: The list of string items to show in the filtered list.\n * `button1`: The right-most button's label. The default value is\n `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `select_multiple`: Allow the user to select multiple items. The default\n value is `false`.\n * `search_column`: The column number to filter the input text against. The\n default value is `1`. This option requires `columns` to be set and\n contain at least *n* column names.\n * `output_column`: The column number to use for `string_output`. The\n default value is `1`. This option requires `columns` to be set and\n contain at least *n* column names.\n * `string_output`: Return the selected button's label (instead of its\n index) and the selected item's text (instead of its index). If no item\n was selected, returns the dialog's exit status (instead of its exit\n code). The default value is `false`.\n * `width`: The dialog's pixel width. The default width stretches nearly the\n width of Textadept's window.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.filteredlist{title = 'Title', columns = {'Foo', 'Bar'},\n items = {'a', 'b', 'c', 'd'}}\n@return selected button or exit code, selected item or list of selected items
+filesave ui.dialogs.filesave(options)\nPrompts the user with a file save dialog defined by dialog options table *options*, returning\nthe string file chosen.\nIf the user canceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the dialog.\n\n * `title`: The dialog's title text.\n * `with_directory`: The initial filesystem directory to show.\n * `with_file`: The initially chosen filename. This option requires `with_directory` to be set.\n * `with_extension`: The list of extensions selectable files must have.\n * `no_create_directories`: Prevent the user from creating new directories. The default\n value is `false`.\n@return filename or nil
+fileselect ui.dialogs.fileselect(options)\nPrompts the user with a file selection dialog defined by dialog options table *options*,\nreturning the string file selected.\nIf *options*.`select_multiple` is `true`, returns the list of files selected. If the user\ncanceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the dialog.\n\n * `title`: The dialog's title text.\n * `with_directory`: The initial filesystem directory to show.\n * `with_file`: The initially selected filename. This option requires `with_directory`\n to be set.\n * `with_extension`: The list of extensions selectable files must have.\n * `select_multiple`: Allow the user to select multiple files. The default value is `false`.\n * `select_only_directories`: Only allow the user to select directories. The default value is\n `false`.\n@usage ui.dialogs.fileselect{title = 'Open C File', with_directory = _HOME,\n with_extension = {'c', 'h'}, select_multiple = true}\n@return filename, list of filenames, or nil
+filter_through textadept.editing.filter_through(command)\nPasses the selected text or all buffer text to string shell command *command* as standard input\n(stdin) and replaces the input text with the command's standard output (stdout). *command*\nmay contain shell pipes ('|').\nStandard input is as follows:\n\n1. If no text is selected, the entire buffer is used.\n2. If text is selected and spans a single line, only the selected text is used.\n3. If text is selected and spans multiple lines, all text on the lines that have text selected\n is passed as stdin. However, if the end of the selection is at the beginning of a line,\n only the line ending delimiters from the previous line are included. The rest of the line\n is excluded.\n@param command The Linux, BSD, macOS, or Windows shell command to filter text through. May\n contain pipes.
+filteredlist ui.dialogs.filteredlist(options)\nPrompts the user with a filtered list item selection dialog defined by dialog options table\n*options*, returning the selected button's index along with the index or indices of the\nselected item or items (depending on whether or not *options*.`select_multiple` is `true`).\nIf *options*.`string_output` is `true`, returns the selected button's label along with the\ntext of the selected item or items. If the dialog timed out, returns `0` or `"timeout"`. If\nthe user canceled the dialog, returns `-1` or `"delete"`.\nSpaces in the filter text are treated as wildcards.\n@param options Table of key-value option pairs for the filtered list dialog.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text.\n * `text`: The dialog's initial input text.\n * `columns`: The list of string column names for list rows.\n * `items`: The list of string items to show in the filtered list.\n * `button1`: The right-most button's label. The default value is `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2` to be set.\n * `select_multiple`: Allow the user to select multiple items. The default value is `false`.\n * `search_column`: The column number to filter the input text against. The default value is\n `1`. This option requires `columns` to be set and contain at least *n* column names.\n * `output_column`: The column number to use for `string_output`. The default value is\n `1`. This option requires `columns` to be set and contain at least *n* column names.\n * `string_output`: Return the selected button's label (instead of its index) and the selected\n item's text (instead of its index). If no item was selected, returns the dialog's exit\n status (instead of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width. The default width stretches nearly the width of\n Textadept's window.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.filteredlist{title = 'Title', columns = {'Foo', 'Bar'},\n items = {'a', 'b', 'c', 'd'}}\n@return selected button or exit code, selected item or list of selected items
find ui.find (module)\nTextadept's Find & Replace pane.
-find_column buffer.find_column(buffer, line, column)\nReturns the position of column number *column* on line number *line* (taking\ntab and multi-byte characters into account), or the position at the end of\nline *line*.\n@param buffer A buffer.\n@param line The line number in *buffer* to use.\n@param column The column number to use.
+find_column buffer.find_column(buffer, line, column)\nReturns the position of column number *column* on line number *line* (taking tab and multi-byte\ncharacters into account), or the position at the end of line *line*.\n@param buffer A buffer.\n@param line The line number in *buffer* to use.\n@param column The column number to use.
find_entry_text ui.find.find_entry_text (string)\nThe text in the "Find" entry.
-find_in_files ui.find.find_in_files(dir, filter)\nSearches directory *dir* or the user-specified directory for files that match\nsearch text and search options (subject to optional filter *filter*), and\nprints the results to a buffer titled "Files Found", highlighting found text.\nUse the `find_entry_text`, `match_case`, `whole_word`, and `regex` fields to\nset the search text and option flags, respectively.\nA filter determines which files to search in, with the default filter being\n`ui.find.find_in_files_filters[dir]` (if it exists) or `lfs.default_filter`.\nA filter consists of Lua patterns that match file and directory paths to\ninclude or exclude. Patterns are inclusive by default. Exclusive patterns\nbegin with a '!'. If no inclusive patterns are given, any filename is\ninitially considered. As a convenience, file extensions can be specified\nliterally instead of as a Lua pattern (e.g. '.lua' vs. '%.lua$'), and '/'\nalso matches the Windows directory separator ('[/\\]' is not needed).\nIf *filter* is `nil`, the filter from the `ui.find.find_in_files_filters`\ntable for *dir* is used. If that filter does not exist, `lfs.default_filter`\nis used.\n@param dir Optional directory path to search. If `nil`, the user is prompted\n for one.\n@param filter Optional filter for files and directories to exclude. The\n default value is `lfs.default_filter` unless a filter for *dir* is defined\n in `ui.find.find_in_files_filters`.\n@see find_in_files_filters
-find_in_files_filters ui.find.find_in_files_filters (table)\nMap of directory paths to filters used in `ui.find.find_in_files()`.\nThis table is updated when the user manually specifies a filter in the\n"Filter" entry during an "In files" search.\n@see find_in_files
+find_in_files ui.find.find_in_files(dir, filter)\nSearches directory *dir* or the user-specified directory for files that match search text\nand search options (subject to optional filter *filter*), and prints the results to a buffer\ntitled "Files Found", highlighting found text.\nUse the `find_entry_text`, `match_case`, `whole_word`, and `regex` fields to set the search\ntext and option flags, respectively.\nA filter determines which files to search in, with the default filter being\n`ui.find.find_in_files_filters[dir]` (if it exists) or `lfs.default_filter`. A filter consists\nof Lua patterns that match file and directory paths to include or exclude. Patterns are\ninclusive by default. Exclusive patterns begin with a '!'. If no inclusive patterns are given,\nany filename is initially considered. As a convenience, file extensions can be specified\nliterally instead of as a Lua pattern (e.g. '.lua' vs. '%.lua$'), and '/' also matches the\nWindows directory separator ('[/\\]' is not needed). If *filter* is `nil`, the filter from\nthe `ui.find.find_in_files_filters` table for *dir* is used. If that filter does not exist,\n`lfs.default_filter` is used.\n@param dir Optional directory path to search. If `nil`, the user is prompted for one.\n@param filter Optional filter for files and directories to exclude. The default value is\n `lfs.default_filter` unless a filter for *dir* is defined in `ui.find.find_in_files_filters`.\n@see find_in_files_filters
+find_in_files_filters ui.find.find_in_files_filters (table)\nMap of directory paths to filters used in `ui.find.find_in_files()`.\nThis table is updated when the user manually specifies a filter in the "Filter" entry during\nan "In files" search.\n@see find_in_files
find_label_text ui.find.find_label_text (string, Write-only)\nThe text of the "Find" label.\nThis is primarily used for localization.
find_next ui.find.find_next()\nMimics pressing the "Find Next" button.
find_next_button_text ui.find.find_next_button_text (string, Write-only)\nThe text of the "Find Next" button.\nThis is primarily used for localization.
@@ -526,119 +526,119 @@ first_visible_line view.first_visible_line (number)\nThe line number of the line
float lexer.float (pattern)\nA pattern that matches a floating point number.
focus ui.command_entry.focus()\nOpens the command entry.
focus ui.find.focus(options)\nDisplays and focuses the Find & Replace Pane.\n@param options Optional table of `ui.find` field options to initially set.
-fold lexer.fold(lexer, text, start_pos, start_line, start_level)\nDetermines fold points in a chunk of text *text* using lexer *lexer*,\nreturning a table of fold levels associated with line numbers.\n*text* starts at position *start_pos* on line number *start_line* with a\nbeginning fold level of *start_level* in the buffer.\n@param lexer The lexer to fold text with.\n@param text The text in the buffer to fold.\n@param start_pos The position in the buffer *text* starts at, counting from\n 1.\n@param start_line The line number *text* starts on, counting from 1.\n@param start_level The fold level *text* starts on.\n@return table of fold levels associated with line numbers.
-fold_all view.fold_all(view, action)\nContracts, expands, or toggles all fold points, depending on *action*.\nWhen toggling, the state of the first fold point determines whether to\nexpand or contract.\n@param view A view.\n@param action The fold action to perform. Valid values are:\n * `view.FOLDACTION_CONTRACT`\n * `view.FOLDACTION_EXPAND`\n * `view.FOLDACTION_TOGGLE`
+fold lexer.fold(lexer, text, start_pos, start_line, start_level)\nDetermines fold points in a chunk of text *text* using lexer *lexer*, returning a table of\nfold levels associated with line numbers.\n*text* starts at position *start_pos* on line number *start_line* with a beginning fold\nlevel of *start_level* in the buffer.\n@param lexer The lexer to fold text with.\n@param text The text in the buffer to fold.\n@param start_pos The position in the buffer *text* starts at, counting from 1.\n@param start_line The line number *text* starts on, counting from 1.\n@param start_level The fold level *text* starts on.\n@return table of fold levels associated with line numbers.
+fold_all view.fold_all(view, action)\nContracts, expands, or toggles all fold points, depending on *action*.\nWhen toggling, the state of the first fold point determines whether to expand or contract.\n@param view A view.\n@param action The fold action to perform. Valid values are:\n * `view.FOLDACTION_CONTRACT`\n * `view.FOLDACTION_EXPAND`\n * `view.FOLDACTION_TOGGLE`
fold_by_indentation lexer.fold_by_indentation (boolean)\nWhether or not to fold based on indentation level if a lexer does not have\na folder.\nSome lexers automatically enable this option. It is disabled by default.\nThis is an alias for `lexer.property['fold.by.indentation'] = '1|0'`.
-fold_children view.fold_children(view, line, action)\nContracts, expands, or toggles the fold point on line number *line*, as well\nas all of its children, depending on *action*.\n@param view A view.\n@param line The line number in *view* to set the fold states for.\n@param action The fold action to perform. Valid values are:\n * `view.FOLDACTION_CONTRACT`\n * `view.FOLDACTION_EXPAND`\n * `view.FOLDACTION_TOGGLE`
+fold_children view.fold_children(view, line, action)\nContracts, expands, or toggles the fold point on line number *line*, as well as all of its\nchildren, depending on *action*.\n@param view A view.\n@param line The line number in *view* to set the fold states for.\n@param action The fold action to perform. Valid values are:\n * `view.FOLDACTION_CONTRACT`\n * `view.FOLDACTION_EXPAND`\n * `view.FOLDACTION_TOGGLE`
fold_compact lexer.fold_compact (boolean)\nWhether or not blank lines after an ending fold point are included in that\nfold.\nThis option is disabled by default.\nThis is an alias for `lexer.property['fold.compact'] = '1|0'`.
-fold_consecutive_lines lexer.fold_consecutive_lines(prefix)\nReturns for `lexer.add_fold_point()` the parameters needed to fold\nconsecutive lines that start with string *prefix*.\n@param prefix The prefix string (e.g. a line comment).\n@usage lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('--'))\n@usage lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('//'))\n@usage lex:add_fold_point(\n lexer.KEYWORD, lexer.fold_consecutive_lines('import'))
+fold_consecutive_lines lexer.fold_consecutive_lines(prefix)\nReturns for `lexer.add_fold_point()` the parameters needed to fold consecutive lines that\nstart with string *prefix*.\n@param prefix The prefix string (e.g. a line comment).\n@usage lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('--'))\n@usage lex:add_fold_point(lexer.COMMENT, lexer.fold_consecutive_lines('//'))\n@usage lex:add_fold_point(lexer.KEYWORD, lexer.fold_consecutive_lines('import'))
fold_display_text_style view.fold_display_text_style (number)\nThe fold display text mode.\n\n* `view.FOLDDISPLAYTEXT_HIDDEN`\n Fold display text is not shown.\n* `view.FOLDDISPLAYTEXT_STANDARD`\n Fold display text is shown with no decoration.\n* `view.FOLDDISPLAYTEXT_BOXED`\n Fold display text is shown outlined with a box.\n\nThe default value is `view.FOLDDISPLAYTEXT_HIDDEN`.
-fold_expanded view.fold_expanded (table)\nTable of flags per line number that indicate whether or not fold points are\nexpanded for those line numbers.\nSetting expanded fold states does not toggle folds; it only updates fold\nmargin markers. Use `view.toggle_fold()` instead.
+fold_expanded view.fold_expanded (table)\nTable of flags per line number that indicate whether or not fold points are expanded for\nthose line numbers.\nSetting expanded fold states does not toggle folds; it only updates fold margin markers. Use\n`view.toggle_fold()` instead.
fold_flags view.fold_flags (number, Read-only)\nBit-mask of folding lines to draw in the buffer.\n\n* `view.FOLDFLAG_LINEBEFORE_EXPANDED`\n Draw lines above expanded folds.\n* `view.FOLDFLAG_LINEBEFORE_CONTRACTED`\n Draw lines above collapsed folds.\n* `view.FOLDFLAG_LINEAFTER_EXPANDED`\n Draw lines below expanded folds.\n* `view.FOLDFLAG_LINEAFTER_CONTRACTED`\n Draw lines below collapsed folds.\n* `view.FOLDFLAG_LEVELNUMBERS`\n Show hexadecimal fold levels in line margins.\n This option cannot be combined with `FOLDFLAG_LINESTATE`.\n* `view.FOLDFLAG_LINESTATE`\n Show line state in line margins.\n This option cannot be combined with `FOLDFLAG_LEVELNUMBERS`.\n\nThe default value is `0`.
-fold_level buffer.fold_level (table)\nTable of fold level bit-masks per line number.\nFold level masks comprise of an integer level combined with any of the\nfollowing bit flags:\n\n* `buffer.FOLDLEVELBASE`\n The initial fold level.\n* `buffer.FOLDLEVELWHITEFLAG`\n The line is blank.\n* `buffer.FOLDLEVELHEADERFLAG`\n The line is a header, or fold point.
-fold_level lexer.fold_level (table, Read-only)\nTable of fold level bit-masks for line numbers starting from 1.\nFold level masks are composed of an integer level combined with any of the\nfollowing bits:\n\n* `lexer.FOLD_BASE`\n The initial fold level.\n* `lexer.FOLD_BLANK`\n The line is blank.\n* `lexer.FOLD_HEADER`\n The line is a header, or fold point.
-fold_line view.fold_line(view, line, action)\nContracts, expands, or toggles the fold point on line number *line*,\ndepending on *action*.\n@param view A view.\n@param line The line number in *view* to set the fold state for.\n@param action The fold action to perform. Valid values are:\n * `view.FOLDACTION_CONTRACT`\n * `view.FOLDACTION_EXPAND`\n * `view.FOLDACTION_TOGGLE`
-fold_line_groups lexer.fold_line_groups (boolean)\nWhether or not to fold multiple, consecutive line groups (such as line\ncomments and import statements) and only show the top line.\nThis option is disabled by default.\nThis is an alias for `lexer.property['fold.line.groups'] = '1|0'`.
-fold_on_zero_sum_lines lexer.fold_on_zero_sum_lines (boolean)\nWhether or not to mark as a fold point lines that contain both an ending\nand starting fold point. For example, `} else {` would be marked as a fold\npoint.\nThis option is disabled by default.\nThis is an alias for `lexer.property['fold.on.zero.sum.lines'] = '1|0'`.
+fold_level buffer.fold_level (table)\nTable of fold level bit-masks per line number.\nFold level masks comprise of an integer level combined with any of the following bit flags:\n\n* `buffer.FOLDLEVELBASE`\n The initial fold level.\n* `buffer.FOLDLEVELWHITEFLAG`\n The line is blank.\n* `buffer.FOLDLEVELHEADERFLAG`\n The line is a header, or fold point.
+fold_level lexer.fold_level (table, Read-only)\nTable of fold level bit-masks for line numbers starting from 1.\nFold level masks are composed of an integer level combined with any of the following bits:\n\n* `lexer.FOLD_BASE`\n The initial fold level.\n* `lexer.FOLD_BLANK`\n The line is blank.\n* `lexer.FOLD_HEADER`\n The line is a header, or fold point.
+fold_line view.fold_line(view, line, action)\nContracts, expands, or toggles the fold point on line number *line*, depending on *action*.\n@param view A view.\n@param line The line number in *view* to set the fold state for.\n@param action The fold action to perform. Valid values are:\n * `view.FOLDACTION_CONTRACT`\n * `view.FOLDACTION_EXPAND`\n * `view.FOLDACTION_TOGGLE`
+fold_line_groups lexer.fold_line_groups (boolean)\nWhether or not to fold multiple, consecutive line groups (such as line comments and import\nstatements) and only show the top line.\nThis option is disabled by default.\nThis is an alias for `lexer.property['fold.line.groups'] = '1|0'`.
+fold_on_zero_sum_lines lexer.fold_on_zero_sum_lines (boolean)\nWhether or not to mark as a fold point lines that contain both an ending and starting fold\npoint. For example, `} else {` would be marked as a fold point.\nThis option is disabled by default. This is an alias for\n`lexer.property['fold.on.zero.sum.lines'] = '1|0'`.
fold_parent buffer.fold_parent (table, Read-only)\nTable of fold point line numbers per child line number.\nA line number of `-1` means no line was found.
folding lexer.folding (boolean)\nWhether or not folding is enabled for the lexers that support it.\nThis option is disabled by default.\nThis is an alias for `lexer.property['fold'] = '1|0'`.
-fontselect ui.dialogs.fontselect(options)\nPrompts the user with a font selection dialog defined by dialog options\ntable *options*, returning the font selected (including style and size).\nIf the user canceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the option select dialog.\n\n * `title`: The dialog's title text.\n * `text`: The font preview text.\n * `font_name`: The initially selected font name.\n * `font_size`: The initially selected font size. The default value is `12`.\n * `font_style`: The initially selected font style. The available options\n are `"regular"`, `"bold"`, `"italic"`, and `"bold italic"`. The default\n value is `"regular"`.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n@usage ui.dialogs.fontselect{title = 'Font', font_name = 'Monospace',\n font_size = 10}\n@return selected font, including style and size
+fontselect ui.dialogs.fontselect(options)\nPrompts the user with a font selection dialog defined by dialog options table *options*,\nreturning the font selected (including style and size).\nIf the user canceled the dialog, returns `nil`.\n@param options Table of key-value option pairs for the option select dialog.\n\n * `title`: The dialog's title text.\n * `text`: The font preview text.\n * `font_name`: The initially selected font name.\n * `font_size`: The initially selected font size. The default value is `12`.\n * `font_style`: The initially selected font style. The available options are `"regular"`,\n `"bold"`, `"italic"`, and `"bold italic"`. The default value is `"regular"`.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n@usage ui.dialogs.fontselect{title = 'Font', font_name = 'Monospace', font_size = 10}\n@return selected font, including style and size
forward textadept.history.forward()\nNavigates forwards through the current view's history.
-functions _SCINTILLA.functions (table)\nMap of Scintilla function names to tables containing their IDs, return types,\nwParam types, and lParam types. Types are as follows:\n\n + `0`: Void.\n + `1`: Integer.\n + `2`: Length of the given lParam string.\n + `3`: Integer position.\n + `4`: Color, in "0xBBGGRR" format.\n + `5`: Boolean `true` or `false`.\n + `6`: Bitmask of Scintilla key modifiers and a key value.\n + `7`: String parameter.\n + `8`: String return value.
+functions _SCINTILLA.functions (table)\nMap of Scintilla function names to tables containing their IDs, return types, wParam types,\nand lParam types. Types are as follows:\n\n + `0`: Void.\n + `1`: Integer.\n + `2`: Length of the given lParam string.\n + `3`: Integer position.\n + `4`: Color, in "0xBBGGRR" format.\n + `5`: Boolean `true` or `false`.\n + `6`: Bitmask of Scintilla key modifiers and a key value.\n + `7`: String parameter.\n + `8`: String return value.
get_cur_line buffer.get_cur_line(buffer)\nReturns the current line's text and the caret's position on that line.\n@param buffer A buffer.\n@return string, number
get_default_fold_display_text view.get_default_fold_display_text(view)\nReturns the default fold display text.\n@param view A view.
-get_last_child buffer.get_last_child(buffer, line, level)\nReturns the line number of the last line after line number *line* whose fold\nlevel is greater than *level*.\nIf *level* is `-1`, returns the level of *line*.\n@param buffer A buffer.\n@param line The line number in *buffer* of a header line.\n@param level The fold level, or `-1` for the level of *line*.
-get_lexer buffer.get_lexer(buffer, current)\nReturns the buffer's lexer name.\nIf *current* is `true`, returns the name of the lexer under the caret in\na multiple-language lexer.\n@param buffer A buffer.\n@param current Whether or not to get the lexer at the current caret position\n in multi-language lexers. The default is `false` and returns the parent\n lexer.
+get_last_child buffer.get_last_child(buffer, line, level)\nReturns the line number of the last line after line number *line* whose fold level is greater\nthan *level*.\nIf *level* is `-1`, returns the level of *line*.\n@param buffer A buffer.\n@param line The line number in *buffer* of a header line.\n@param level The fold level, or `-1` for the level of *line*.
+get_lexer buffer.get_lexer(buffer, current)\nReturns the buffer's lexer name.\nIf *current* is `true`, returns the name of the lexer under the caret in a multiple-language\nlexer.\n@param buffer A buffer.\n@param current Whether or not to get the lexer at the current caret position in multi-language\n lexers. The default is `false` and returns the parent lexer.
get_line buffer.get_line(buffer, line)\nReturns the text on line number *line*, including end of line characters.\n@param buffer A buffer.\n@param line The line number in *buffer* to use.\n@return string, number
-get_project_root io.get_project_root(path, submodule)\nReturns the root directory of the project that contains filesystem path\n*path*.\nIn order to be recognized, projects must be under version control. Recognized\nVCSes are Bazaar, Fossil, Git, Mercurial, and SVN.\n@param path Optional filesystem path to a project or a file contained within\n a project. The default value is the buffer's filename or the current\n working directory. This parameter may be omitted.\n@param submodule Optional flag that indicates whether or not to return the\n root of the current submodule (if applicable). The default value is\n `false`.\n@return string root or nil
+get_project_root io.get_project_root(path, submodule)\nReturns the root directory of the project that contains filesystem path *path*.\nIn order to be recognized, projects must be under version control. Recognized VCSes are\nBazaar, Fossil, Git, Mercurial, and SVN.\n@param path Optional filesystem path to a project or a file contained within a project. The\n default value is the buffer's filename or the current working directory. This parameter\n may be omitted.\n@param submodule Optional flag that indicates whether or not to return the root of the\n current submodule (if applicable). The default value is `false`.\n@return string root or nil
get_rule lexer.get_rule(lexer, id)\nReturns the rule identified by string *id*.\n@param lexer The lexer to fetch a rule from.\n@param id The id of the rule to fetch.\n@return pattern
-get_sel_text buffer.get_sel_text(buffer)\nReturns the selected text.\nMultiple selections are included in order with no delimiters. Rectangular\nselections are included from top to bottom with end of line characters.\nVirtual space is not included.\n@param buffer A buffer.\n@return string, number
-get_split_table ui.get_split_table()\nReturns a split table that contains Textadept's current split view structure.\nThis is primarily used in session saving.\n@return table of split views. Each split view entry is a table with 4\n fields: `1`, `2`, `vertical`, and `size`. `1` and `2` have values of either\n nested split view entries or the views themselves; `vertical` is a flag\n that indicates if the split is vertical or not; and `size` is the integer\n position of the split resizer.
+get_sel_text buffer.get_sel_text(buffer)\nReturns the selected text.\nMultiple selections are included in order with no delimiters. Rectangular selections are\nincluded from top to bottom with end of line characters. Virtual space is not included.\n@param buffer A buffer.\n@return string, number
+get_split_table ui.get_split_table()\nReturns a split table that contains Textadept's current split view structure.\nThis is primarily used in session saving.\n@return table of split views. Each split view entry is a table with 4 fields: `1`, `2`,\n `vertical`, and `size`. `1` and `2` have values of either nested split view entries or\n the views themselves; `vertical` is a flag that indicates if the split is vertical or not;\n and `size` is the integer position of the split resizer.
get_text buffer.get_text(buffer)\nReturns the buffer's text.\n@param buffer A buffer.
-goto_buffer view.goto_buffer(view, buffer)\nSwitches to buffer *buffer* or the buffer *buffer* number of buffers relative\nto the current one.\nEmits `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events.\n@param view The view to switch buffers in.\n@param buffer A buffer or relative buffer number (typically 1 or -1).\n@see _G._BUFFERS\n@see events.BUFFER_BEFORE_SWITCH\n@see events.BUFFER_AFTER_SWITCH
-goto_error textadept.run.goto_error(line_num, next)\nJumps to the source of the recognized compile/run warning or error on line\nnumber *line_num* in the message buffer.\nIf *line_num* is `nil`, jumps to the next or previous warning or error,\ndepending on boolean *next*. Displays an annotation with the warning or error\nmessage if possible.\n@param line_num Optional line number in the message buffer that contains the\n compile/run warning or error to go to. This parameter may be omitted\n completely.\n@param next Optional flag indicating whether to go to the next recognized\n warning/error or the previous one. Only applicable when *line_num* is\n `nil`.\n@see error_patterns
-goto_file ui.goto_file(filename, split, preferred_view, sloppy)\nSwitches to the existing view whose buffer's filename is *filename*.\nIf no view was found and *split* is `true`, splits the current view in order\nto show the requested file. If *split* is `false`, shifts to the next or\n*preferred_view* view in order to show the requested file. If *sloppy* is\n`true`, requires only the basename of *filename* to match a buffer's\n`filename`. If the requested file was not found, it is opened in the desired\nview.\n@param filename The filename of the buffer to go to.\n@param split Optional flag that indicates whether or not to open the buffer\n in a split view if there is only one view. The default value is `false`.\n@param preferred_view Optional view to open the desired buffer in if the\n buffer is not visible in any other view.\n@param sloppy Optional flag that indicates whether or not to not match\n *filename* to `buffer.filename` exactly. When `true`, matches *filename* to\n only the last part of `buffer.filename` This is useful for run and compile\n commands which output relative filenames and paths instead of full ones and\n it is likely that the file in question is already open. The default value\n is `false`.
-goto_file_found ui.find.goto_file_found(line_num, next)\nJumps to the source of the find in files search result on line number\n*line_num* in the buffer titled "Files Found" or, if *line_num* is `nil`,\njumps to the next or previous search result, depending on boolean *next*.\n@param line_num Optional line number in the files found buffer that contains\n the search result to go to. This parameter may be omitted completely.\n@param next Optional flag indicating whether to go to the next search result\n or the previous one. Only applicable when *line_num* is `nil`.
-goto_line buffer.goto_line(buffer, line)\nMoves the caret to the beginning of line number *line* and scrolls it into\nview, event if *line* is hidden.\n@param buffer A buffer.\n@param line The line number in *buffer* to go to.
-goto_line textadept.editing.goto_line(line)\nMoves the caret to the beginning of line number *line* or the user-specified\nline, ensuring *line* is visible.\n@param line Optional line number to go to. If `nil`, the user is prompted for\n one.
-goto_mark textadept.bookmarks.goto_mark(next)\nPrompts the user to select a bookmarked line to move the caret to the\nbeginning of unless *next* is given.\nIf *next* is `true` or `false`, moves the caret to the beginning of the next\nor previously bookmarked line, respectively.\n@param next Optional flag indicating whether to go to the next or previous\n bookmarked line relative to the current line. The default value is `nil`,\n prompting the user for a bookmarked line to go to.
+goto_buffer view.goto_buffer(view, buffer)\nSwitches to buffer *buffer* or the buffer *buffer* number of buffers relative to the\ncurrent one.\nEmits `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events.\n@param view The view to switch buffers in.\n@param buffer A buffer or relative buffer number (typically 1 or -1).\n@see _G._BUFFERS\n@see events.BUFFER_BEFORE_SWITCH\n@see events.BUFFER_AFTER_SWITCH
+goto_error textadept.run.goto_error(line_num, next)\nJumps to the source of the recognized compile/run warning or error on line number *line_num*\nin the message buffer.\nIf *line_num* is `nil`, jumps to the next or previous warning or error, depending on boolean\n*next*. Displays an annotation with the warning or error message if possible.\n@param line_num Optional line number in the message buffer that contains the compile/run\n warning or error to go to. This parameter may be omitted completely.\n@param next Optional flag indicating whether to go to the next recognized warning/error or\n the previous one. Only applicable when *line_num* is `nil`.\n@see error_patterns
+goto_file ui.goto_file(filename, split, preferred_view, sloppy)\nSwitches to the existing view whose buffer's filename is *filename*.\nIf no view was found and *split* is `true`, splits the current view in order to show the\nrequested file. If *split* is `false`, shifts to the next or *preferred_view* view in order\nto show the requested file. If *sloppy* is `true`, requires only the basename of *filename*\nto match a buffer's `filename`. If the requested file was not found, it is opened in the\ndesired view.\n@param filename The filename of the buffer to go to.\n@param split Optional flag that indicates whether or not to open the buffer in a split view\n if there is only one view. The default value is `false`.\n@param preferred_view Optional view to open the desired buffer in if the buffer is not\n visible in any other view.\n@param sloppy Optional flag that indicates whether or not to not match *filename* to\n `buffer.filename` exactly. When `true`, matches *filename* to only the last part of\n `buffer.filename` This is useful for run and compile commands which output relative filenames\n and paths instead of full ones and it is likely that the file in question is already open.\n The default value is `false`.
+goto_file_found ui.find.goto_file_found(line_num, next)\nJumps to the source of the find in files search result on line number *line_num* in the buffer\ntitled "Files Found" or, if *line_num* is `nil`, jumps to the next or previous search result,\ndepending on boolean *next*.\n@param line_num Optional line number in the files found buffer that contains the search\n result to go to. This parameter may be omitted completely.\n@param next Optional flag indicating whether to go to the next search result or the previous\n one. Only applicable when *line_num* is `nil`.
+goto_line buffer.goto_line(buffer, line)\nMoves the caret to the beginning of line number *line* and scrolls it into view, event if\n*line* is hidden.\n@param buffer A buffer.\n@param line The line number in *buffer* to go to.
+goto_line textadept.editing.goto_line(line)\nMoves the caret to the beginning of line number *line* or the user-specified line, ensuring\n*line* is visible.\n@param line Optional line number to go to. If `nil`, the user is prompted for one.
+goto_mark textadept.bookmarks.goto_mark(next)\nPrompts the user to select a bookmarked line to move the caret to the beginning of unless\n*next* is given.\nIf *next* is `true` or `false`, moves the caret to the beginning of the next or previously\nbookmarked line, respectively.\n@param next Optional flag indicating whether to go to the next or previous bookmarked\n line relative to the current line. The default value is `nil`, prompting the user for a\n bookmarked line to go to.
goto_pos buffer.goto_pos(buffer, pos)\nMoves the caret to position *pos* and scrolls it into view.\n@param buffer A buffer.\n@param pos The position in *buffer* to go to.
-goto_view ui.goto_view(view)\nShifts to view *view* or the view *view* number of views relative to the\ncurrent one.\nEmits `VIEW_BEFORE_SWITCH` and `VIEW_AFTER_SWITCH` events.\n@param view A view or relative view number (typically 1 or -1).\n@see _G._VIEWS\n@see events.VIEW_BEFORE_SWITCH\n@see events.VIEW_AFTER_SWITCH
+goto_view ui.goto_view(view)\nShifts to view *view* or the view *view* number of views relative to the current one.\nEmits `VIEW_BEFORE_SWITCH` and `VIEW_AFTER_SWITCH` events.\n@param view A view or relative view number (typically 1 or -1).\n@see _G._VIEWS\n@see events.VIEW_BEFORE_SWITCH\n@see events.VIEW_AFTER_SWITCH
graph lexer.graph (pattern)\nA pattern that matches any graphical character ('!' to '~').
h_scroll_bar view.h_scroll_bar (bool)\nDisplay the horizontal scroll bar.\nThe default value is `true`.
height ui.command_entry.height (number)\nThe height in pixels of the command entry.
hex_num lexer.hex_num (pattern)\nA pattern that matches a hexadecimal number.
-hide_lines view.hide_lines(view, start_line, end_line)\nHides the range of lines between line numbers *start_line* to *end_line*.\nThis has no effect on fold levels or fold flags and the first line cannot be\nhidden.\n@param view A view.\n@param start_line The start line of the range of lines in *view* to hide.\n@param end_line The end line of the range of lines in *view* to hide.
-highlight_all_matches ui.find.highlight_all_matches (boolean)\nWhether or not to highlight all occurrences of found text in the current\nbuffer.\nThe default value is `false`.
-highlight_guide view.highlight_guide (number)\nThe indentation guide column number to also highlight when highlighting\nmatching braces, or `0` to stop indentation guide highlighting.
+hide_lines view.hide_lines(view, start_line, end_line)\nHides the range of lines between line numbers *start_line* to *end_line*.\nThis has no effect on fold levels or fold flags and the first line cannot be hidden.\n@param view A view.\n@param start_line The start line of the range of lines in *view* to hide.\n@param end_line The end line of the range of lines in *view* to hide.
+highlight_all_matches ui.find.highlight_all_matches (boolean)\nWhether or not to highlight all occurrences of found text in the current buffer.\nThe default value is `false`.
+highlight_guide view.highlight_guide (number)\nThe indentation guide column number to also highlight when highlighting matching braces,\nor `0` to stop indentation guide highlighting.
highlight_words textadept.editing.highlight_words (number)\nThe word highlight mode.\n\n* `textadept.editing.HIGHLIGHT_CURRENT`\n Automatically highlight all instances of the current word.\n* `textadept.editing.HIGHLIGHT_SELECTED`\n Automatically highlight all instances of the selected word.\n* `textadept.editing.HIGHLIGHT_NONE`\n Do not automatically highlight words.\n\nThe default value is `textadept.editing.HIGHLIGHT_NONE`.
-history textadept.history (module)\nRecords buffer positions within Textadept views over time and allows for\nnavigating through that history.\n\nThis module listens for text edit events and buffer switch events. Each time\nan insertion or deletion occurs, its location is recorded in the current\nview's location history. If the edit is close enough to the previous record,\nthe previous record is amended. Each time a buffer switch occurs, the before\nand after locations are also recorded.
+history textadept.history (module)\nRecords buffer positions within Textadept views over time and allows for navigating through\nthat history.\n\nThis module listens for text edit events and buffer switch events. Each time an insertion\nor deletion occurs, its location is recorded in the current view's location history. If the\nedit is close enough to the previous record, the previous record is amended. Each time a\nbuffer switch occurs, the before and after locations are also recorded.
home buffer.home(buffer)\nMoves the caret to the beginning of the current line.\n@param buffer A buffer.
home_display buffer.home_display(buffer)\nMoves the caret to the beginning of the current wrapped line.\n@param buffer A buffer.
-home_display_extend buffer.home_display_extend(buffer)\nMoves the caret to the beginning of the current wrapped line, extending the\nselected text to the new position.\n@param buffer A buffer.
-home_extend buffer.home_extend(buffer)\nMoves the caret to the beginning of the current line, extending the selected\ntext to the new position.\n@param buffer A buffer.
-home_rect_extend buffer.home_rect_extend(buffer)\nMoves the caret to the beginning of the current line, extending the\nrectangular selection to the new position.\n@param buffer A buffer.
-home_wrap buffer.home_wrap(buffer)\nMoves the caret to the beginning of the current wrapped line or, if already\nthere, to the beginning of the actual line.\n@param buffer A buffer.
+home_display_extend buffer.home_display_extend(buffer)\nMoves the caret to the beginning of the current wrapped line, extending the selected text\nto the new position.\n@param buffer A buffer.
+home_extend buffer.home_extend(buffer)\nMoves the caret to the beginning of the current line, extending the selected text to the\nnew position.\n@param buffer A buffer.
+home_rect_extend buffer.home_rect_extend(buffer)\nMoves the caret to the beginning of the current line, extending the rectangular selection\nto the new position.\n@param buffer A buffer.
+home_wrap buffer.home_wrap(buffer)\nMoves the caret to the beginning of the current wrapped line or, if already there, to the\nbeginning of the actual line.\n@param buffer A buffer.
home_wrap_extend buffer.home_wrap_extend(buffer)\nLike `buffer.home_wrap()`, but extends the selected text to the new position.\n@param buffer A buffer.
-iconv string.iconv(text, new, old)\nConverts string *text* from encoding *old* to encoding *new* using GNU\nlibiconv, returning the string result.\nRaises an error if the encoding conversion failed.\nValid encodings are GNU libiconv's encodings and include:\n\n * European: ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, KOI8-R, KOI8-U,\n KOI8-RU, CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},\n Mac{Roman,CentralEurope,Iceland,Croatian,Romania},\n Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh.\n * Semitic: ISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}.\n * Japanese: EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2,\n ISO-2022-JP-1.\n * Chinese: EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950,\n BIG5-HKSCS, BIG5-HKSCS:2004, BIG5-HKSCS:2001, BIG5-HKSCS:1999,\n ISO-2022-CN, ISO-2022-CN-EXT.\n * Korean: EUC-KR, CP949, ISO-2022-KR, JOHAB.\n * Armenian: ARMSCII-8.\n * Georgian: Georgian-Academy, Georgian-PS.\n * Tajik: KOI8-T.\n * Kazakh: PT154, RK1048.\n * Thai: ISO-8859-11, TIS-620, CP874, MacThai.\n * Laotian: MuleLao-1, CP1133.\n * Vietnamese: VISCII, TCVN, CP1258.\n * Unicode: UTF-8, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UTF-16,\n UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF-7, C99, JAVA.\n@param text The text to convert.\n@param new The string encoding to convert to.\n@param old The string encoding to convert from.
-idle_styling view.idle_styling (number)\nThe idle styling mode.\nThis mode has no effect when `view.wrap_mode` is on.\n\n* `view.IDLESTYLING_NONE`\n Style all the currently visible text before displaying it.\n* `view.IDLESTYLING_TOVISIBLE`\n Style some text before displaying it and then style the rest\n incrementally in the background as an idle-time task.\n* `view.IDLESTYLING_AFTERVISIBLE`\n Style text after the currently visible portion in the background.\n* `view.IDLESTYLING_ALL`\n Style text both before and after the visible text in the background.\n\nThe default value is `view.IDLESTYLING_NONE`.
+iconv string.iconv(text, new, old)\nConverts string *text* from encoding *old* to encoding *new* using GNU libiconv, returning\nthe string result.\nRaises an error if the encoding conversion failed.\nValid encodings are GNU libiconv's encodings and include:\n\n * European: ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, KOI8-R,\n KOI8-U, KOI8-RU, CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},\n Mac{Roman,CentralEurope,Iceland,Croatian,Romania}, Mac{Cyrillic,Ukraine,Greek,Turkish},\n Macintosh.\n * Semitic: ISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}.\n * Japanese: EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1.\n * Chinese: EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS, BIG5-HKSCS:2004,\n BIG5-HKSCS:2001, BIG5-HKSCS:1999, ISO-2022-CN, ISO-2022-CN-EXT.\n * Korean: EUC-KR, CP949, ISO-2022-KR, JOHAB.\n * Armenian: ARMSCII-8.\n * Georgian: Georgian-Academy, Georgian-PS.\n * Tajik: KOI8-T.\n * Kazakh: PT154, RK1048.\n * Thai: ISO-8859-11, TIS-620, CP874, MacThai.\n * Laotian: MuleLao-1, CP1133.\n * Vietnamese: VISCII, TCVN, CP1258.\n * Unicode: UTF-8, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UTF-16, UTF-16BE,\n UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF-7, C99, JAVA.\n@param text The text to convert.\n@param new The string encoding to convert to.\n@param old The string encoding to convert from.
+idle_styling view.idle_styling (number)\nThe idle styling mode.\nThis mode has no effect when `view.wrap_mode` is on.\n\n* `view.IDLESTYLING_NONE`\n Style all the currently visible text before displaying it.\n* `view.IDLESTYLING_TOVISIBLE`\n Style some text before displaying it and then style the rest incrementally in the\n background as an idle-time task.\n* `view.IDLESTYLING_AFTERVISIBLE`\n Style text after the currently visible portion in the background.\n* `view.IDLESTYLING_ALL`\n Style text both before and after the visible text in the background.\n\nThe default value is `view.IDLESTYLING_NONE`.
in_files ui.find.in_files (bool)\nFind search text in a directory of files.\nThe default value is `false`.
in_files_label_text ui.find.in_files_label_text (string, Write-only)\nThe text of the "In files" label.\nThis is primarily used for localization.
incremental ui.find.incremental (bool)\nFind search text incrementally as it is typed.\nThe default value is `false`.
indent buffer.indent (number)\nThe number of spaces in one level of indentation.\nThe default value is `0`, which uses the value of `buffer.tab_width`.
-indent_amount lexer.indent_amount (table, Read-only)\nTable of indentation amounts in character columns, for line numbers\nstarting from 1.
-indentation_guides view.indentation_guides (number)\nThe indentation guide drawing mode.\nIndentation guides are dotted vertical lines that appear within indentation\nwhitespace at each level of indentation.\n\n* `view.IV_NONE`\n Does not draw any guides.\n* `view.IV_REAL`\n Draw guides only within indentation whitespace.\n* `view.IV_LOOKFORWARD`\n Draw guides beyond the current line up to the next non-empty line's\n indentation level, but with an additional level if the previous non-empty\n line is a fold point.\n* `view.IV_LOOKBOTH`\n Draw guides beyond the current line up to either the indentation level of\n the previous or next non-empty line, whichever is greater.\n\nThe default value is `view.IV_NONE`.
-indic_alpha view.indic_alpha (table)\nTable of fill color alpha values, ranging from `0` (transparent) to `255`\n(opaque), for indicator numbers from `1` to `32` whose styles are either\n`INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.\nThe default values are `view.ALPHA_NOALPHA`, for no alpha.
-indic_fore view.indic_fore (table)\nTable of foreground colors, in "0xBBGGRR" format, for indicator numbers\nfrom `1` to `32`.\nChanging an indicator's foreground color resets that indicator's hover\nforeground color.
-indic_hover_fore view.indic_hover_fore (table)\nTable of hover foreground colors, in "0xBBGGRR" format, for indicator\nnumbers from `1` to `32`.\nThe default values are the respective indicator foreground colors.
-indic_hover_style view.indic_hover_style (table)\nTable of hover styles for indicators numbers from `1` to `32`. An\nindicator's hover style drawn when either the cursor hovers over that\nindicator or the caret is within that indicator.\nThe default values are the respective indicator styles.
-indic_outline_alpha view.indic_outline_alpha (table)\nTable of outline color alpha values, ranging from `0` (transparent) to\n`255` (opaque), for indicator numbers from `1` to `32` whose styles are\neither `INDIC_ROUNDBOX`, `INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.\nThe default values are `view.ALPHA_NOALPHA`, for no alpha.
-indic_style view.indic_style (table)\nTable of styles for indicator numbers from `1` to `32`.\n\n* `view.INDIC_PLAIN`\n An underline.\n* `view.INDIC_SQUIGGLE`\n A squiggly underline 3 pixels in height.\n* `view.INDIC_TT`\n An underline of small 'T' shapes.\n* `view.INDIC_DIAGONAL`\n An underline of diagonal hatches.\n* `view.INDIC_STRIKE`\n Strike out.\n* `view.INDIC_HIDDEN`\n Invisible.\n* `view.INDIC_BOX`\n A bounding box.\n* `view.INDIC_ROUNDBOX`\n A translucent box with rounded corners around the text. Use\n `view.indic_alpha` and `view.indic_outline_alpha` to set the\n fill and outline transparency, respectively. Their default values are\n `30` and `50`.\n* `view.INDIC_STRAIGHTBOX`\n Similar to `INDIC_ROUNDBOX` but with sharp corners.\n* `view.INDIC_DASH`\n A dashed underline.\n* `view.INDIC_DOTS`\n A dotted underline.\n* `view.INDIC_SQUIGGLELOW`\n A squiggly underline 2 pixels in height.\n* `view.INDIC_DOTBOX`\n Similar to `INDIC_STRAIGHTBOX` but with a dotted outline.\n Translucency alternates between `view.indic_alpha` and\n `view.indic_outline_alpha` starting with the top-left pixel.\n* `view.INDIC_SQUIGGLEPIXMAP`\n Identical to `INDIC_SQUIGGLE` but draws faster by using a pixmap instead\n of multiple line segments.\n* `view.INDIC_COMPOSITIONTHICK`\n A 2-pixel thick underline at the bottom of the line inset by 1 pixel on\n on either side. Similar in appearance to the target in Asian language\n input composition.\n* `view.INDIC_COMPOSITIONTHIN`\n A 1-pixel thick underline just before the bottom of the line inset by 1\n pixel on either side. Similar in appearance to the non-target ranges in\n Asian language input composition.\n* `view.INDIC_FULLBOX`\n Similar to `INDIC_STRAIGHTBOX` but extends to the top of its line,\n potentially touching any similar indicators on the line above.\n* `view.INDIC_TEXTFORE`\n Changes the color of text to an indicator's foreground color.\n* `view.INDIC_POINT`\n A triangle below the start of the indicator range.\n* `view.INDIC_POINTCHARACTER`\n A triangle below the center of the first character of the indicator\n range.\n* `view.INDIC_GRADIENT`\n A box with a vertical gradient from solid on top to transparent on\n bottom.\n* `view.INDIC_GRADIENTCENTER`\n A box with a centered gradient from solid in the middle to transparent on\n the top and bottom.\n\nUse `_SCINTILLA.next_indic_number()` for custom indicators.\nChanging an indicator's style resets that indicator's hover style.
-indic_under view.indic_under (table)\nTable of flags that indicate whether or not to draw indicators behind text\ninstead of over the top of it for indicator numbers from `1` to `32`.\nThe default values are `false`.
-indicator_all_on_for buffer.indicator_all_on_for(buffer, pos)\nReturns a bit-mask that represents which indicators are on at position *pos*.\nThe first bit is set if indicator 1 is on, the second bit for indicator 2,\netc.\n@param buffer A buffer.\n@param pos The position in *buffer* to get indicators at.\n@return number
-indicator_clear_range buffer.indicator_clear_range(buffer, pos, length)\nClears indicator number `buffer.indicator_current` over the range of text\nfrom position *pos* to *pos* + *length*.\n@param buffer A buffer.\n@param pos The start position of the range of text in *buffer* to clear\n indicators over.\n@param length The number of characters in the range of text to clear\n indicators over.
-indicator_current buffer.indicator_current (number)\nThe indicator number in the range of `1` to `32` used by\n`buffer.indicator_fill_range()` and\n`buffer.indicator_clear_range()`.
-indicator_end buffer.indicator_end(buffer, indicator, pos)\nReturns the next boundary position, starting from position *pos*, of\nindicator number *indicator*, in the range of `1` to `32`.\nReturns `1` if *indicator* was not found.\n@param buffer A buffer.\n@param indicator An indicator number in the range of `1` to `32`.\n@param pos The position in *buffer* of the indicator.
-indicator_fill_range buffer.indicator_fill_range(buffer, pos, length)\nFills the range of text from position *pos* to *pos* + *length* with\nindicator number `buffer.indicator_current`.\n@param buffer A buffer.\n@param pos The start position of the range of text in *buffer* to set\n indicators over.\n@param length The number of characters in the range of text to set indicators\n over.
-indicator_start buffer.indicator_start(buffer, indicator, pos)\nReturns the previous boundary position, starting from position *pos*, of\nindicator number *indicator*, in the range of `1` to `32`.\nReturns `1` if *indicator* was not found.\n@param buffer A buffer.\n@param indicator An indicator number in the range of `1` to `32`.\n@param pos The position in *buffer* of the indicator.
-inputbox ui.dialogs.inputbox(options)\nPrompts the user with an inputbox dialog defined by dialog options table\n*options*, returning the selected button's index along with the user's\ninput text (the latter as a string or table, depending on the type of\n*options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the user's input text.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a\n table, the first table value is the main message text and any subsequent\n values are used as the labels for multiple entry boxes. Providing a\n single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the\n table values are used to populate the multiple entry boxes defined by\n `informative_text`.\n * `button1`: The right-most button's label. The default value is\n `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.inputbox{title = 'Goto Line', informative_text = 'Line:',\n text = '1'}\n@return selected button or exit code, input text
-insert textadept.snippets.insert(text)\nInserts snippet text *text* or the snippet assigned to the trigger word\nbehind the caret.\nOtherwise, if a snippet is active, goes to the active snippet's next\nplaceholder. Returns `false` if no action was taken.\n@param text Optional snippet text to insert. If `nil`, attempts to insert a\n new snippet based on the trigger, the word behind caret, and the current\n lexer.\n@return `false` if no action was taken; `nil` otherwise.\n@see buffer.word_chars
-insert_text buffer.insert_text(buffer, pos, text)\nInserts string *text* at position *pos*, removing any selections.\nIf *pos* is `-1`, inserts *text* at the caret position.\nIf the caret is after the *pos*, it is moved appropriately, but not scrolled\ninto view.\n@param buffer A buffer.\n@param pos The position in *buffer* to insert text at, or `-1` for the\n current position.\n@param text The text to insert.
+indent_amount lexer.indent_amount (table, Read-only)\nTable of indentation amounts in character columns, for line numbers starting from 1.
+indentation_guides view.indentation_guides (number)\nThe indentation guide drawing mode.\nIndentation guides are dotted vertical lines that appear within indentation whitespace at\neach level of indentation.\n\n* `view.IV_NONE`\n Does not draw any guides.\n* `view.IV_REAL`\n Draw guides only within indentation whitespace.\n* `view.IV_LOOKFORWARD`\n Draw guides beyond the current line up to the next non-empty line's indentation level,\n but with an additional level if the previous non-empty line is a fold point.\n* `view.IV_LOOKBOTH`\n Draw guides beyond the current line up to either the indentation level of the previous\n or next non-empty line, whichever is greater.\n\nThe default value is `view.IV_NONE`.
+indic_alpha view.indic_alpha (table)\nTable of fill color alpha values, ranging from `0` (transparent) to `255` (opaque),\nfor indicator numbers from `1` to `32` whose styles are either `INDIC_ROUNDBOX`,\n`INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.\nThe default values are `view.ALPHA_NOALPHA`, for no alpha.
+indic_fore view.indic_fore (table)\nTable of foreground colors, in "0xBBGGRR" format, for indicator numbers from `1` to `32`.\nChanging an indicator's foreground color resets that indicator's hover foreground color.
+indic_hover_fore view.indic_hover_fore (table)\nTable of hover foreground colors, in "0xBBGGRR" format, for indicator numbers from `1` to\n`32`.\nThe default values are the respective indicator foreground colors.
+indic_hover_style view.indic_hover_style (table)\nTable of hover styles for indicators numbers from `1` to `32`.\nAn indicator's hover style drawn when either the cursor hovers over that indicator or the\ncaret is within that indicator.\nThe default values are the respective indicator styles.
+indic_outline_alpha view.indic_outline_alpha (table)\nTable of outline color alpha values, ranging from `0` (transparent) to `255` (opaque),\nfor indicator numbers from `1` to `32` whose styles are either `INDIC_ROUNDBOX`,\n`INDIC_STRAIGHTBOX`, or `INDIC_DOTBOX`.\nThe default values are `view.ALPHA_NOALPHA`, for no alpha.
+indic_style view.indic_style (table)\nTable of styles for indicator numbers from `1` to `32`.\n\n* `view.INDIC_PLAIN`\n An underline.\n* `view.INDIC_SQUIGGLE`\n A squiggly underline 3 pixels in height.\n* `view.INDIC_TT`\n An underline of small 'T' shapes.\n* `view.INDIC_DIAGONAL`\n An underline of diagonal hatches.\n* `view.INDIC_STRIKE`\n Strike out.\n* `view.INDIC_HIDDEN`\n Invisible.\n* `view.INDIC_BOX`\n A bounding box.\n* `view.INDIC_ROUNDBOX`\n A translucent box with rounded corners around the text. Use `view.indic_alpha` and\n `view.indic_outline_alpha` to set the fill and outline transparency, respectively.\n Their default values are `30` and `50`.\n* `view.INDIC_STRAIGHTBOX`\n Similar to `INDIC_ROUNDBOX` but with sharp corners.\n* `view.INDIC_DASH`\n A dashed underline.\n* `view.INDIC_DOTS`\n A dotted underline.\n* `view.INDIC_SQUIGGLELOW`\n A squiggly underline 2 pixels in height.\n* `view.INDIC_DOTBOX`\n Similar to `INDIC_STRAIGHTBOX` but with a dotted outline.\n Translucency alternates between `view.indic_alpha` and `view.indic_outline_alpha`\n starting with the top-left pixel.\n* `view.INDIC_SQUIGGLEPIXMAP`\n Identical to `INDIC_SQUIGGLE` but draws faster by using a pixmap instead of multiple\n line segments.\n* `view.INDIC_COMPOSITIONTHICK`\n A 2-pixel thick underline at the bottom of the line inset by 1 pixel on on either\n side. Similar in appearance to the target in Asian language input composition.\n* `view.INDIC_COMPOSITIONTHIN`\n A 1-pixel thick underline just before the bottom of the line inset by 1 pixel on either\n side. Similar in appearance to the non-target ranges in Asian language input composition.\n* `view.INDIC_FULLBOX`\n Similar to `INDIC_STRAIGHTBOX` but extends to the top of its line, potentially touching\n any similar indicators on the line above.\n* `view.INDIC_TEXTFORE`\n Changes the color of text to an indicator's foreground color.\n* `view.INDIC_POINT`\n A triangle below the start of the indicator range.\n* `view.INDIC_POINTCHARACTER`\n A triangle below the center of the first character of the indicator\n range.\n* `view.INDIC_GRADIENT`\n A box with a vertical gradient from solid on top to transparent on bottom.\n* `view.INDIC_GRADIENTCENTER`\n A box with a centered gradient from solid in the middle to transparent on the top\n and bottom.\n\nUse `_SCINTILLA.next_indic_number()` for custom indicators.\nChanging an indicator's style resets that indicator's hover style.
+indic_under view.indic_under (table)\nTable of flags that indicate whether or not to draw indicators behind text instead of over\nthe top of it for indicator numbers from `1` to `32`.\nThe default values are `false`.
+indicator_all_on_for buffer.indicator_all_on_for(buffer, pos)\nReturns a bit-mask that represents which indicators are on at position *pos*.\nThe first bit is set if indicator 1 is on, the second bit for indicator 2, etc.\n@param buffer A buffer.\n@param pos The position in *buffer* to get indicators at.\n@return number
+indicator_clear_range buffer.indicator_clear_range(buffer, pos, length)\nClears indicator number `buffer.indicator_current` over the range of text from position *pos*\nto *pos* + *length*.\n@param buffer A buffer.\n@param pos The start position of the range of text in *buffer* to clear indicators over.\n@param length The number of characters in the range of text to clear indicators over.
+indicator_current buffer.indicator_current (number)\nThe indicator number in the range of `1` to `32` used by `buffer.indicator_fill_range()`\nand `buffer.indicator_clear_range()`.
+indicator_end buffer.indicator_end(buffer, indicator, pos)\nReturns the next boundary position, starting from position *pos*, of indicator number\n*indicator*, in the range of `1` to `32`.\nReturns `1` if *indicator* was not found.\n@param buffer A buffer.\n@param indicator An indicator number in the range of `1` to `32`.\n@param pos The position in *buffer* of the indicator.
+indicator_fill_range buffer.indicator_fill_range(buffer, pos, length)\nFills the range of text from position *pos* to *pos* + *length* with indicator number\n`buffer.indicator_current`.\n@param buffer A buffer.\n@param pos The start position of the range of text in *buffer* to set indicators over.\n@param length The number of characters in the range of text to set indicators over.
+indicator_start buffer.indicator_start(buffer, indicator, pos)\nReturns the previous boundary position, starting from position *pos*, of indicator number\n*indicator*, in the range of `1` to `32`.\nReturns `1` if *indicator* was not found.\n@param buffer A buffer.\n@param indicator An indicator number in the range of `1` to `32`.\n@param pos The position in *buffer* of the indicator.
+inputbox ui.dialogs.inputbox(options)\nPrompts the user with an inputbox dialog defined by dialog options table *options*, returning\nthe selected button's index along with the user's input text (the latter as a string or table,\ndepending on the type of *options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label along with the\nuser's input text. If the dialog timed out, returns `0` or `"timeout"`. If the user canceled\nthe dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a table, the first\n table value is the main message text and any subsequent values are used as the labels\n for multiple entry boxes. Providing a single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the table values are\n used to populate the multiple entry boxes defined by `informative_text`.\n * `button1`: The right-most button's label. The default value is `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2` to be set.\n * `string_output`: Return the selected button's label (instead of its index) or the dialog's\n exit status instead of the button's index (instead of its exit code). The default value is\n `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.inputbox{title = 'Goto Line', informative_text = 'Line:',\n text = '1'}\n@return selected button or exit code, input text
+insert textadept.snippets.insert(text)\nInserts snippet text *text* or the snippet assigned to the trigger word behind the caret.\nOtherwise, if a snippet is active, goes to the active snippet's next placeholder. Returns\n`false` if no action was taken.\n@param text Optional snippet text to insert. If `nil`, attempts to insert a new snippet\n based on the trigger, the word behind caret, and the current lexer.\n@return `false` if no action was taken; `nil` otherwise.\n@see buffer.word_chars
+insert_text buffer.insert_text(buffer, pos, text)\nInserts string *text* at position *pos*, removing any selections.\nIf *pos* is `-1`, inserts *text* at the caret position.\nIf the caret is after the *pos*, it is moved appropriately, but not scrolled into view.\n@param buffer A buffer.\n@param pos The position in *buffer* to insert text at, or `-1` for the current position.\n@param text The text to insert.
integer lexer.integer (pattern)\nA pattern that matches either a decimal, hexadecimal, or octal number.
io _G.io (module)\nExtends Lua's `io` library with Textadept functions for working with files.
-is_range_word buffer.is_range_word(buffer, start_pos, end_pos)\nReturns whether or not the the positions *start_pos* and *end_pos* are at\nword boundaries.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to\n check for a word boundary at.\n@param end_pos The end position of the range of text in *buffer* to check for\n a word boundary at.
-join_lines textadept.editing.join_lines()\nJoins the currently selected lines or the current line with the line below\nit.\nAs long as any part of a line is selected, the entire line is eligible for\njoining.
+is_range_word buffer.is_range_word(buffer, start_pos, end_pos)\nReturns whether or not the the positions *start_pos* and *end_pos* are at word boundaries.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to check for a word\n boundary at.\n@param end_pos The end position of the range of text in *buffer* to check for a word\n boundary at.
+join_lines textadept.editing.join_lines()\nJoins the currently selected lines or the current line with the line below it.\nAs long as any part of a line is selected, the entire line is eligible for joining.
keychain keys.keychain (table)\nThe current chain of key sequences. (Read-only.)
keys _G.keys (module)\nManages key bindings in Textadept.
-keys _G.keys (table)\nMap of key bindings to commands, with language-specific key tables assigned\nto a lexer name key.
-keys textadept.keys (module)\nDefines key bindings for Textadept.\nThis set of key bindings is pretty standard among other text editors, at\nleast for basic editing commands and movements.
-kill spawn_proc:kill(signal)\nKills running process *spawn_proc*, or sends it Unix signal *signal*.\n@param signal Optional Unix signal to send to *spawn_proc*. The default value\n is 9 (`SIGKILL`), which kills the process.
-last_char_includes lexer.last_char_includes(s)\nCreates and returns a pattern that verifies the first non-whitespace\ncharacter behind the current match position is in string set *s*.\n@param s String character set like one passed to `lpeg.S()`.\n@usage local regex = lexer.last_char_includes('+-*!%^&|=,([{') *\n lexer.range('/')\n@return pattern
+keys _G.keys (table)\nMap of key bindings to commands, with language-specific key tables assigned to a lexer name key.
+keys textadept.keys (module)\nDefines key bindings for Textadept.\nThis set of key bindings is pretty standard among other text editors, at least for basic\nediting commands and movements.
+kill spawn_proc:kill(signal)\nKills running process *spawn_proc*, or sends it Unix signal *signal*.\n@param signal Optional Unix signal to send to *spawn_proc*. The default value is 9 (`SIGKILL`),\n which kills the process.
+last_char_includes lexer.last_char_includes(s)\nCreates and returns a pattern that verifies the first non-whitespace character behind the\ncurrent match position is in string set *s*.\n@param s String character set like one passed to `lpeg.S()`.\n@usage local regex = lexer.last_char_includes('+-*!%^&|=,([{') * lexer.range('/')\n@return pattern
length buffer.length (number, Read-only)\nThe number of bytes in the buffer.
-lex lexer.lex(lexer, text, init_style)\nLexes a chunk of text *text* (that has an initial style number of\n*init_style*) using lexer *lexer*, returning a table of token names and\npositions.\n@param lexer The lexer to lex text with.\n@param text The text in the buffer to lex.\n@param init_style The current style. Multiple-language lexers use this to\n determine which language to start lexing in.\n@return table of token names and positions.
+lex lexer.lex(lexer, text, init_style)\nLexes a chunk of text *text* (that has an initial style number of *init_style*) using lexer\n*lexer*, returning a table of token names and positions.\n@param lexer The lexer to lex text with.\n@param text The text in the buffer to lex.\n@param init_style The current style. Multiple-language lexers use this to determine which\n language to start lexing in.\n@return table of token names and positions.
lexer _G.lexer (module)\nLexes Scintilla documents and source code with Lua and LPeg.
-lfs _G.lfs (module)\nExtends the `lfs` library to find files in directories and determine absolute\nfile paths.
+lfs _G.lfs (module)\nExtends the `lfs` library to find files in directories and determine absolute file paths.
line_copy buffer.line_copy(buffer)\nCopies the current line to the clipboard.\n@param buffer A buffer.
line_count buffer.line_count (number, Read-only)\nThe number of lines in the buffer.\nThere is always at least one.
line_cut buffer.line_cut(buffer)\nCuts the current line to the clipboard.\n@param buffer A buffer.
line_delete buffer.line_delete(buffer)\nDeletes the current line.\n@param buffer A buffer.
line_down buffer.line_down(buffer)\nMoves the caret down one line.\n@param buffer A buffer.
-line_down_extend buffer.line_down_extend(buffer)\nMoves the caret down one line, extending the selected text to the new\nposition.\n@param buffer A buffer.
-line_down_rect_extend buffer.line_down_rect_extend(buffer)\nMoves the caret down one line, extending the rectangular selection to the new\nposition.\n@param buffer A buffer.
+line_down_extend buffer.line_down_extend(buffer)\nMoves the caret down one line, extending the selected text to the new position.\n@param buffer A buffer.
+line_down_rect_extend buffer.line_down_rect_extend(buffer)\nMoves the caret down one line, extending the rectangular selection to the new position.\n@param buffer A buffer.
line_duplicate buffer.line_duplicate(buffer)\nDuplicates the current line on a new line below.\n@param buffer A buffer.
line_end buffer.line_end(buffer)\nMoves the caret to the end of the current line.\n@param buffer A buffer.
line_end_display buffer.line_end_display(buffer)\nMoves the caret to the end of the current wrapped line.\n@param buffer A buffer.
-line_end_display_extend buffer.line_end_display_extend(buffer)\nMoves the caret to the end of the current wrapped line, extending the\nselected text to the new position.\n@param buffer A buffer.
-line_end_extend buffer.line_end_extend(buffer)\nMoves the caret to the end of the current line, extending the selected text\nto the new position.\n@param buffer A buffer.
-line_end_position buffer.line_end_position (table, Read-only)\nTable of positions at the ends of lines, but before any end of line\ncharacters, per line number.
-line_end_rect_extend buffer.line_end_rect_extend(buffer)\nMoves the caret to the end of the current line, extending the rectangular\nselection to the new position.\n@param buffer A buffer.
-line_end_wrap buffer.line_end_wrap(buffer)\nMoves the caret to the end of the current wrapped line or, if already there,\nto the end of the actual line.\n@param buffer A buffer.
-line_end_wrap_extend buffer.line_end_wrap_extend(buffer)\nLike `buffer.line_end_wrap()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
-line_from_position buffer.line_from_position(buffer, pos)\nReturns the line number of the line that contains position *pos*.\nReturns `1` if *pos* is less than 1 or `buffer.line_count` if *pos* is\ngreater than `buffer.length + 1`.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the line number of.\n@return number
-line_from_position lexer.line_from_position(pos)\nReturns the line number (starting from 1) of the line that contains position\n*pos*, which starts from 1.\n@param pos The position to get the line number of.\n@return number
+line_end_display_extend buffer.line_end_display_extend(buffer)\nMoves the caret to the end of the current wrapped line, extending the selected text to the\nnew position.\n@param buffer A buffer.
+line_end_extend buffer.line_end_extend(buffer)\nMoves the caret to the end of the current line, extending the selected text to the new position.\n@param buffer A buffer.
+line_end_position buffer.line_end_position (table, Read-only)\nTable of positions at the ends of lines, but before any end of line characters, per\nline number.
+line_end_rect_extend buffer.line_end_rect_extend(buffer)\nMoves the caret to the end of the current line, extending the rectangular selection to the\nnew position.\n@param buffer A buffer.
+line_end_wrap buffer.line_end_wrap(buffer)\nMoves the caret to the end of the current wrapped line or, if already there, to the end of\nthe actual line.\n@param buffer A buffer.
+line_end_wrap_extend buffer.line_end_wrap_extend(buffer)\nLike `buffer.line_end_wrap()`, but extends the selected text to the new position.\n@param buffer A buffer.
+line_from_position buffer.line_from_position(buffer, pos)\nReturns the line number of the line that contains position *pos*.\nReturns `1` if *pos* is less than 1 or `buffer.line_count` if *pos* is greater than\n`buffer.length + 1`.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the line number of.\n@return number
+line_from_position lexer.line_from_position(pos)\nReturns the line number (starting from 1) of the line that contains position *pos*, which\nstarts from 1.\n@param pos The position to get the line number of.\n@return number
line_indent_position buffer.line_indent_position (table, Read-only)\nTable of positions at the ends of indentation per line number.
line_indentation buffer.line_indentation (table)\nTable of column indentation amounts per line number.
-line_length buffer.line_length(buffer, line)\nReturns the number of bytes on line number *line*, including end of line\ncharacters.\nTo get line length excluding end of line characters, use\n`buffer.line_end_position[line] - buffer.position_from_line(line)`.\n@param buffer A buffer.\n@param line The line number in *buffer* to get the length of.\n@return number
+line_length buffer.line_length(buffer, line)\nReturns the number of bytes on line number *line*, including end of line characters.\nTo get line length excluding end of line characters, use `buffer.line_end_position[line]\n- buffer.position_from_line(line)`.\n@param buffer A buffer.\n@param line The line number in *buffer* to get the length of.\n@return number
line_reverse buffer.line_reverse(buffer)\nReverses the order of the selected lines.\n@param buffer A buffer.
line_scroll view.line_scroll(view, columns, lines)\nScrolls the buffer right *columns* columns and down *lines* lines.\nNegative values are allowed.\n@param view A view.\n@param columns The number of columns to scroll horizontally.\n@param lines The number of lines to scroll vertically.
line_scroll_down view.line_scroll_down(view)\nScrolls the buffer down one line, keeping the caret visible.\n@param view A view.
@@ -647,373 +647,373 @@ line_state lexer.line_state (table)\nTable of integer line states for line numbe
line_transpose buffer.line_transpose(buffer)\nSwaps the current line with the previous one.\n@param buffer A buffer.
line_up buffer.line_up(buffer)\nMoves the caret up one line.\n@param buffer A buffer.
line_up_extend buffer.line_up_extend(buffer)\nMoves the caret up one line, extending the selected text to the new position.\n@param buffer A buffer.
-line_up_rect_extend buffer.line_up_rect_extend(buffer)\nMoves the caret up one line, extending the rectangular selection to the new\nposition.\n@param buffer A buffer.
-line_visible view.line_visible (table, Read-only)\nTable of flags per line number that indicate whether or not lines are\nvisible for those line numbers.
-lines_join buffer.lines_join(buffer)\nJoins the lines in the target range, inserting spaces between the words\njoined at line boundaries.\n@param buffer A buffer.
+line_up_rect_extend buffer.line_up_rect_extend(buffer)\nMoves the caret up one line, extending the rectangular selection to the new position.\n@param buffer A buffer.
+line_visible view.line_visible (table, Read-only)\nTable of flags per line number that indicate whether or not lines are visible for those\nline numbers.
+lines_join buffer.lines_join(buffer)\nJoins the lines in the target range, inserting spaces between the words joined at line\nboundaries.\n@param buffer A buffer.
lines_on_screen view.lines_on_screen (number, Read-only)\nThe number of completely visible lines in the view.\nIt is possible to have a partial line visible at the bottom of the view.
-lines_split buffer.lines_split(buffer, pixel_width, width)\nSplits the lines in the target range into lines *width* pixels wide.\nIf *width* is `0`, splits the lines in the target range into lines as wide as\nthe view.\n@param buffer A buffer.\n@param width The pixel width to split lines at. When `0`, uses the width of\n the view.
-load lexer.load(name, alt_name, cache)\nInitializes or loads and returns the lexer of string name *name*.\nScintilla calls this function in order to load a lexer. Parent lexers also\ncall this function in order to load child lexers and vice-versa. The user\ncalls this function in order to load a lexer when using Scintillua as a Lua\nlibrary.\n@param name The name of the lexing language.\n@param alt_name The alternate name of the lexing language. This is useful for\n embedding the same child lexer with multiple sets of start and end tokens.\n@param cache Flag indicating whether or not to load lexers from the cache.\n This should only be `true` when initially loading a lexer (e.g. not from\n within another lexer for embedding purposes).\n The default value is `false`.\n@return lexer object
-load textadept.macros.load(filename)\nLoads a macro from file *filename* or the user-selected file.\n@param filename Optional macro file to load. If `nil`, the user is prompted\n for one.
-load textadept.session.load(filename)\nLoads session file *filename* or the user-selected session, returning `true`\nif a session file was opened and read.\nTextadept restores split views, opened buffers, cursor information, recent\nfiles, and bookmarks.\n@param filename Optional absolute path to the session file to load. If `nil`,\n the user is prompted for one.\n@usage textadept.session.load(filename)\n@return `true` if the session file was opened and read; `nil` otherwise.
+lines_split buffer.lines_split(buffer, pixel_width, width)\nSplits the lines in the target range into lines *width* pixels wide.\nIf *width* is `0`, splits the lines in the target range into lines as wide as the view.\n@param buffer A buffer.\n@param width The pixel width to split lines at. When `0`, uses the width of the view.
+load lexer.load(name, alt_name, cache)\nInitializes or loads and returns the lexer of string name *name*.\nScintilla calls this function in order to load a lexer. Parent lexers also call this function\nin order to load child lexers and vice-versa. The user calls this function in order to load\na lexer when using Scintillua as a Lua library.\n@param name The name of the lexing language.\n@param alt_name The alternate name of the lexing language. This is useful for embedding the\n same child lexer with multiple sets of start and end tokens.\n@param cache Flag indicating whether or not to load lexers from the cache. This should only\n be `true` when initially loading a lexer (e.g. not from within another lexer for embedding\n purposes). The default value is `false`.\n@return lexer object
+load textadept.macros.load(filename)\nLoads a macro from file *filename* or the user-selected file.\n@param filename Optional macro file to load. If `nil`, the user is prompted for one.
+load textadept.session.load(filename)\nLoads session file *filename* or the user-selected session, returning `true` if a session\nfile was opened and read.\nTextadept restores split views, opened buffers, cursor information, recent files, and bookmarks.\n@param filename Optional absolute path to the session file to load. If `nil`, the user is\n prompted for one.\n@usage textadept.session.load(filename)\n@return `true` if the session file was opened and read; `nil` otherwise.
lower lexer.lower (pattern)\nA pattern that matches any lower case character ('a'-'z').
lower_case buffer.lower_case(buffer)\nConverts the selected text to lower case letters.\n@param buffer A buffer.
lua _M.lua (module)\nThe lua module.\nIt provides utilities for editing Lua code.
-macros textadept.macros (module)\nA module for recording, playing, saving, and loading keyboard macros.\nMenu commands are also recorded.\nAt this time, typing into multiple cursors during macro playback is not\nsupported.
+macros textadept.macros (module)\nA module for recording, playing, saving, and loading keyboard macros.\nMenu commands are also recorded.\nAt this time, typing into multiple cursors during macro playback is not supported.
main_selection buffer.main_selection (number)\nThe number of the main or most recent selection.\nOnly an existing selection can be made main.
-margin_back_n view.margin_back_n (table)\nTable of background colors, in "0xBBGGRR" format, of margin numbers from\n`1` to `view.margins` (`5` by default).\nOnly affects margins of type `view.MARGIN_COLOR`.
-margin_cursor_n view.margin_cursor_n (table)\nTable of cursor types shown over margin numbers from `1` to\n`view.margins` (`5` by default).\n\n* `view.CURSORARROW`\n Normal arrow cursor.\n* `view.CURSORREVERSEARROW`\n Reversed arrow cursor.\n\nThe default values are `view.CURSORREVERSEARROW`.
+margin_back_n view.margin_back_n (table)\nTable of background colors, in "0xBBGGRR" format, of margin numbers from `1` to `view.margins`\n(`5` by default).\nOnly affects margins of type `view.MARGIN_COLOR`.
+margin_cursor_n view.margin_cursor_n (table)\nTable of cursor types shown over margin numbers from `1` to `view.margins` (`5` by default).\n\n* `view.CURSORARROW`\n Normal arrow cursor.\n* `view.CURSORREVERSEARROW`\n Reversed arrow cursor.\n\nThe default values are `view.CURSORREVERSEARROW`.
margin_left view.margin_left (number)\nThe pixel size of the left margin of the buffer text.\nThe default value is `1`.
-margin_mask_n view.margin_mask_n (table)\nTable of bit-masks of markers whose symbols marker symbol margins can\ndisplay for margin numbers from `1` to `view.margins` (`5` by default).\nBit-masks are 32-bit values whose bits correspond to the 32 available\nmarkers.\nThe default values are `0`, `view.MASK_FOLDERS`, `0`, `0`, and `0`, for\na line margin and logical marker margin.
-margin_options view.margin_options (number)\nA bit-mask of margin option settings.\n\n* `view.MARGINOPTION_NONE`\n None.\n* `view.MARGINOPTION_SUBLINESELECT`\n Select only a wrapped line's sub-line (rather than the entire line) when\n the line number margin is clicked.\n\nThe default value is `view.MARGINOPTION_NONE`.
+margin_mask_n view.margin_mask_n (table)\nTable of bit-masks of markers whose symbols marker symbol margins can display for margin\nnumbers from `1` to `view.margins` (`5` by default).\nBit-masks are 32-bit values whose bits correspond to the 32 available markers.\nThe default values are `0`, `view.MASK_FOLDERS`, `0`, `0`, and `0`, for a line margin and\nlogical marker margin.
+margin_options view.margin_options (number)\nA bit-mask of margin option settings.\n\n* `view.MARGINOPTION_NONE`\n None.\n* `view.MARGINOPTION_SUBLINESELECT`\n Select only a wrapped line's sub-line (rather than the entire line) when the line number\n margin is clicked.\n\nThe default value is `view.MARGINOPTION_NONE`.
margin_right view.margin_right (number)\nThe pixel size of the right margin of the buffer text.\nThe default value is `1`.
-margin_sensitive_n view.margin_sensitive_n (table)\nTable of flags that indicate whether or not mouse clicks in margins emit\n`MARGIN_CLICK` events for margin numbers from `1` to `view.margins` (`5`\nby default).\nThe default values are `false`.
-margin_style buffer.margin_style (table)\nTable of style numbers in the text margin per line number.\nOnly some style attributes are active in text margins: font, size, bold,\nitalics, fore, and back.
+margin_sensitive_n view.margin_sensitive_n (table)\nTable of flags that indicate whether or not mouse clicks in margins emit `MARGIN_CLICK`\nevents for margin numbers from `1` to `view.margins` (`5` by default).\nThe default values are `false`.
+margin_style buffer.margin_style (table)\nTable of style numbers in the text margin per line number.\nOnly some style attributes are active in text margins: font, size, bold, italics, fore,\nand back.
margin_text buffer.margin_text (table)\nTable of text displayed in text margins per line number.
margin_text_clear_all buffer.margin_text_clear_all(buffer)\nClears all text in text margins.\n@param buffer A buffer.
-margin_type_n view.margin_type_n (table)\nTable of margin types for margin numbers from `1` to `view.margins` (`5`\nby default).\n\n* `view.MARGIN_SYMBOL`\n A marker symbol margin.\n* `view.MARGIN_NUMBER`\n A line number margin.\n* `view.MARGIN_BACK`\n A marker symbol margin whose background color matches the default text\n background color.\n* `view.MARGIN_FORE`\n A marker symbol margin whose background color matches the default text\n foreground color.\n* `view.MARGIN_TEXT`\n A text margin.\n* `view.MARGIN_RTEXT`\n A right-justified text margin.\n* `view.MARGIN_COLOR`\n A marker symbol margin whose background color is configurable.\n\nThe default value for the first margin is `view.MARGIN_NUMBER`, followed\nby `view.MARGIN_SYMBOL` for the rest.
-margin_width_n view.margin_width_n (table)\nTable of pixel margin widths for margin numbers from `1` to\n`view.margins` (`5` by default).
+margin_type_n view.margin_type_n (table)\nTable of margin types for margin numbers from `1` to `view.margins` (`5` by default).\n\n* `view.MARGIN_SYMBOL`\n A marker symbol margin.\n* `view.MARGIN_NUMBER`\n A line number margin.\n* `view.MARGIN_BACK`\n A marker symbol margin whose background color matches the default text background color.\n* `view.MARGIN_FORE`\n A marker symbol margin whose background color matches the default text foreground color.\n* `view.MARGIN_TEXT`\n A text margin.\n* `view.MARGIN_RTEXT`\n A right-justified text margin.\n* `view.MARGIN_COLOR`\n A marker symbol margin whose background color is configurable.\n\nThe default value for the first margin is `view.MARGIN_NUMBER`, followed by\n`view.MARGIN_SYMBOL` for the rest.
+margin_width_n view.margin_width_n (table)\nTable of pixel margin widths for margin numbers from `1` to `view.margins` (`5` by default).
margins view.margins (number)\nThe number of margins.\nThe default value is `5`.
-marker_add buffer.marker_add(buffer, line, marker)\nAdds marker number *marker*, in the range of `1` to `32`, to line number\n*line*, returning the added marker's handle which can be used in\n`buffer.marker_delete_handle()` and `buffer.marker_line_from_handle()`, or\n`-1` if *line* is invalid.\n@param buffer A buffer.\n@param line The line number to add the marker on.\n@param marker The marker number in the range of `1` to `32` to add.\n@return number
-marker_add_set buffer.marker_add_set(buffer, line, marker_mask)\nAdds the markers specified in marker bit-mask *marker_mask* to line number\n*line*.\nThe first bit is set to add marker number 1, the second bit for marker number\n2, and so on up to marker number 32.\n@param buffer A buffer.\n@param line The line number to add the markers on.\n@param marker_mask The mask of markers to set. Set the first bit to set\n marker 1, the second bit for marker 2 and so on.
-marker_alpha view.marker_alpha (table, Write-only)\nTable of alpha values, ranging from `0` (transparent) to `255` (opaque),\nof markers drawn in the text area (not the margin) for markers numbers from\n`1` to `32`.\nThe default values are `view.ALPHA_NOALPHA`, for no alpha.
-marker_back view.marker_back (table, Write-only)\nTable of background colors, in "0xBBGGRR" format, of marker numbers from\n`1` to `32`.
-marker_back_selected view.marker_back_selected (table, Write-only)\nTable of background colors, in "0xBBGGRR" format, of markers whose folding\nblocks are selected for marker numbers from `1` to `32`.
-marker_define view.marker_define(view, marker, symbol)\nAssigns marker symbol *symbol* to marker number *marker*, in the range of `1`\nto `32`.\n*symbol* is shown in marker symbol margins next to lines marked with\n*marker*.\n@param view A view.\n@param marker The marker number in the range of `1` to `32` to set *symbol*\n for.\n@param symbol The marker symbol: `buffer.MARK_*`.\n@see _SCINTILLA.next_marker_number
-marker_define_pixmap view.marker_define_pixmap(view, marker, pixmap)\nAssociates marker number *marker*, in the range of `1` to `32`, with XPM\nimage *pixmap*.\nThe `view.MARK_PIXMAP` marker symbol must be assigned to *marker*.\n*pixmap* is shown in marker symbol margins next to lines marked with\n*marker*.\n@param view A view.\n@param marker The marker number in the range of `1` to `32` to define\n pixmap *pixmap* for.\n@param pixmap The string pixmap data.
-marker_define_rgba_image view.marker_define_rgba_image(view, marker, pixels)\nAssociates marker number *marker*, in the range of `1` to `32`, with RGBA\nimage *pixels*.\nThe dimensions for *pixels* (`view.rgba_image_width` and\n`view.rgba_image_height`) must have already been defined. *pixels* is a\nsequence of 4 byte pixel values (red, blue, green, and alpha) defining the\nimage line by line starting at the top-left pixel.\nThe `view.MARK_RGBAIMAGE` marker symbol must be assigned to *marker*.\n*pixels* is shown in symbol margins next to lines marked with *marker*.\n@param view A view.\n@param marker The marker number in the range of `1` to `32` to define RGBA\n data *pixels* for.\n@param pixels The string sequence of 4 byte pixel values starting with the\n pixels for the top line, with the leftmost pixel first, then continuing\n with the pixels for subsequent lines. There is no gap between lines for\n alignment reasons. Each pixel consists of, in order, a red byte, a green\n byte, a blue byte and an alpha byte. The color bytes are not premultiplied\n by the alpha value. That is, a fully red pixel that is 25% opaque will be\n `[FF, 00, 00, 3F]`.
-marker_delete buffer.marker_delete(buffer, line, marker)\nDeletes marker number *marker*, in the range of `1` to `32`, from line number\n*line*. If *marker* is `-1`, deletes all markers from *line*.\n@param buffer A buffer.\n@param line The line number to delete the marker on.\n@param marker The marker number in the range of `1` to `32` to delete from\n *line*, or `-1` to delete all markers from the line.
-marker_delete_all buffer.marker_delete_all(buffer, marker)\nDeletes marker number *marker*, in the range of `1` to `32`, from any line\nthat has it.\nIf *marker* is `-1`, deletes all markers from all lines.\n@param buffer A buffer.\n@param marker The marker number in the range of `1` to `32` to delete from\n all lines, or `-1` to delete all markers from all lines.
+marker_add buffer.marker_add(buffer, line, marker)\nAdds marker number *marker*, in the range of `1` to `32`, to line number *line*, returning\nthe added marker's handle which can be used in `buffer.marker_delete_handle()` and\n`buffer.marker_line_from_handle()`, or `-1` if *line* is invalid.\n@param buffer A buffer.\n@param line The line number to add the marker on.\n@param marker The marker number in the range of `1` to `32` to add.\n@return number
+marker_add_set buffer.marker_add_set(buffer, line, marker_mask)\nAdds the markers specified in marker bit-mask *marker_mask* to line number *line*.\nThe first bit is set to add marker number 1, the second bit for marker number 2, and so on\nup to marker number 32.\n@param buffer A buffer.\n@param line The line number to add the markers on.\n@param marker_mask The mask of markers to set. Set the first bit to set marker 1, the second\n bit for marker 2 and so on.
+marker_alpha view.marker_alpha (table, Write-only)\nTable of alpha values, ranging from `0` (transparent) to `255` (opaque), of markers drawn\nin the text area (not the margin) for markers numbers from `1` to `32`.\nThe default values are `view.ALPHA_NOALPHA`, for no alpha.
+marker_back view.marker_back (table, Write-only)\nTable of background colors, in "0xBBGGRR" format, of marker numbers from `1` to `32`.
+marker_back_selected view.marker_back_selected (table, Write-only)\nTable of background colors, in "0xBBGGRR" format, of markers whose folding blocks are\nselected for marker numbers from `1` to `32`.
+marker_define view.marker_define(view, marker, symbol)\nAssigns marker symbol *symbol* to marker number *marker*, in the range of `1` to `32`.\n*symbol* is shown in marker symbol margins next to lines marked with *marker*.\n@param view A view.\n@param marker The marker number in the range of `1` to `32` to set *symbol* for.\n@param symbol The marker symbol: `buffer.MARK_*`.\n@see _SCINTILLA.next_marker_number
+marker_define_pixmap view.marker_define_pixmap(view, marker, pixmap)\nAssociates marker number *marker*, in the range of `1` to `32`, with XPM image *pixmap*.\nThe `view.MARK_PIXMAP` marker symbol must be assigned to *marker*. *pixmap* is shown in\nmarker symbol margins next to lines marked with *marker*.\n@param view A view.\n@param marker The marker number in the range of `1` to `32` to define pixmap *pixmap* for.\n@param pixmap The string pixmap data.
+marker_define_rgba_image view.marker_define_rgba_image(view, marker, pixels)\nAssociates marker number *marker*, in the range of `1` to `32`, with RGBA image *pixels*.\nThe dimensions for *pixels* (`view.rgba_image_width` and `view.rgba_image_height`) must\nhave already been defined. *pixels* is a sequence of 4 byte pixel values (red, blue, green,\nand alpha) defining the image line by line starting at the top-left pixel.\nThe `view.MARK_RGBAIMAGE` marker symbol must be assigned to *marker*. *pixels* is shown in\nsymbol margins next to lines marked with *marker*.\n@param view A view.\n@param marker The marker number in the range of `1` to `32` to define RGBA data *pixels* for.\n@param pixels The string sequence of 4 byte pixel values starting with the pixels for the\n top line, with the leftmost pixel first, then continuing with the pixels for subsequent\n lines. There is no gap between lines for alignment reasons. Each pixel consists of, in\n order, a red byte, a green byte, a blue byte and an alpha byte. The color bytes are not\n premultiplied by the alpha value. That is, a fully red pixel that is 25% opaque will be\n `[FF, 00, 00, 3F]`.
+marker_delete buffer.marker_delete(buffer, line, marker)\nDeletes marker number *marker*, in the range of `1` to `32`, from line number *line*. If\n*marker* is `-1`, deletes all markers from *line*.\n@param buffer A buffer.\n@param line The line number to delete the marker on.\n@param marker The marker number in the range of `1` to `32` to delete from *line*, or `-1`\n to delete all markers from the line.
+marker_delete_all buffer.marker_delete_all(buffer, marker)\nDeletes marker number *marker*, in the range of `1` to `32`, from any line that has it.\nIf *marker* is `-1`, deletes all markers from all lines.\n@param buffer A buffer.\n@param marker The marker number in the range of `1` to `32` to delete from all lines, or\n `-1` to delete all markers from all lines.
marker_delete_handle buffer.marker_delete_handle(buffer, handle)\nDeletes the marker with handle *handle* returned by `buffer.marker_add()`.\n@param buffer A buffer.\n@param handle The identifier of a marker returned by `buffer.marker_add()`.
-marker_enable_highlight view.marker_enable_highlight(view, enabled)\nHighlights the margin fold markers for the current fold block if *enabled* is\n`true`.\n@param view A view.\n@param enabled Whether or not to enable highlight.
-marker_fore view.marker_fore (table, Write-only)\nTable of foreground colors, in "0xBBGGRR" format, of marker numbers from\n`1` to `32`.
-marker_get buffer.marker_get(buffer, line)\nReturns a bit-mask that represents the markers on line number *line*.\nThe first bit is set if marker number 1 is present, the second bit for marker\nnumber 2, and so on.\n@param buffer A buffer.\n@param line The line number to get markers on.\n@return number
-marker_handle_from_line buffer.marker_handle_from_line(buffer, line, n)\nReturns the handle of the *n*th marker on line number *line*, or `-1` if no\nsuch marker exists.\n@param buffer A buffer.\n@param line The line number to get markers on.\n@param n The marker to get the handle of.
-marker_line_from_handle buffer.marker_line_from_handle(buffer, handle)\nReturns the line number of the line that contains the marker with handle\n*handle* (returned `buffer.marker_add()`), or `-1` if the line was not found.\n@param buffer A buffer.\n@param handle The identifier of a marker returned by `buffer.marker_add()`.\n@return number
-marker_next buffer.marker_next(buffer, line, marker_mask)\nReturns the first line number, starting at line number *line*, that contains\nall of the markers represented by marker bit-mask *marker_mask*.\nReturns `-1` if no line was found.\nThe first bit is set if marker 1 is set, the second bit for marker 2, etc.,\nup to marker 32.\n@param buffer A buffer.\n@param line The start line to search from.\n@param marker_mask The mask of markers to find. Set the first bit to find\n marker 1, the second bit for marker 2, and so on.\n@return number
-marker_number_from_line buffer.marker_number_from_line(buffer, line, n)\nReturns the number of the *n*th marker on line number *line*, or `-1` if no\nsuch marker exists.\n@param buffer A buffer.\n@param line The line number to get markers on.\n@param n The marker to get the number of.
-marker_previous buffer.marker_previous(buffer, line, marker_mask)\nReturns the last line number, before or on line number *line*, that contains\nall of the markers represented by marker bit-mask *marker_mask*.\nReturns `-1` if no line was found.\nThe first bit is set if marker 1 is set, the second bit for marker 2, etc.,\nup to marker 32.\n@param buffer A buffer.\n@param line The start line to search from.\n@param marker_mask The mask of markers to find. Set the first bit to find\n marker 1, the second bit for marker 2, and so on.\n@return number
-marker_symbol_defined view.marker_symbol_defined(view, marker)\nReturns the symbol assigned to marker number *marker*, in the range of `1` to\n`32`, used in `view.marker_define()`,\n`view.marker_define_pixmap()`, or `view.marker_define_rgba_image()`.\n@param view A view.\n@param marker The marker number in the range of `1` to `32` to get the symbol\n of.\n@return number
+marker_enable_highlight view.marker_enable_highlight(view, enabled)\nHighlights the margin fold markers for the current fold block if *enabled* is `true`.\n@param view A view.\n@param enabled Whether or not to enable highlight.
+marker_fore view.marker_fore (table, Write-only)\nTable of foreground colors, in "0xBBGGRR" format, of marker numbers from `1` to `32`.
+marker_get buffer.marker_get(buffer, line)\nReturns a bit-mask that represents the markers on line number *line*.\nThe first bit is set if marker number 1 is present, the second bit for marker number 2,\nand so on.\n@param buffer A buffer.\n@param line The line number to get markers on.\n@return number
+marker_handle_from_line buffer.marker_handle_from_line(buffer, line, n)\nReturns the handle of the *n*th marker on line number *line*, or `-1` if no such marker exists.\n@param buffer A buffer.\n@param line The line number to get markers on.\n@param n The marker to get the handle of.
+marker_line_from_handle buffer.marker_line_from_handle(buffer, handle)\nReturns the line number of the line that contains the marker with handle *handle* (returned\n`buffer.marker_add()`), or `-1` if the line was not found.\n@param buffer A buffer.\n@param handle The identifier of a marker returned by `buffer.marker_add()`.\n@return number
+marker_next buffer.marker_next(buffer, line, marker_mask)\nReturns the first line number, starting at line number *line*, that contains all of the\nmarkers represented by marker bit-mask *marker_mask*.\nReturns `-1` if no line was found.\nThe first bit is set if marker 1 is set, the second bit for marker 2, etc., up to marker 32.\n@param buffer A buffer.\n@param line The start line to search from.\n@param marker_mask The mask of markers to find. Set the first bit to find marker 1, the\n second bit for marker 2, and so on.\n@return number
+marker_number_from_line buffer.marker_number_from_line(buffer, line, n)\nReturns the number of the *n*th marker on line number *line*, or `-1` if no such marker exists.\n@param buffer A buffer.\n@param line The line number to get markers on.\n@param n The marker to get the number of.
+marker_previous buffer.marker_previous(buffer, line, marker_mask)\nReturns the last line number, before or on line number *line*, that contains all of the\nmarkers represented by marker bit-mask *marker_mask*.\nReturns `-1` if no line was found.\nThe first bit is set if marker 1 is set, the second bit for marker 2, etc., up to marker 32.\n@param buffer A buffer.\n@param line The start line to search from.\n@param marker_mask The mask of markers to find. Set the first bit to find marker 1, the\n second bit for marker 2, and so on.\n@return number
+marker_symbol_defined view.marker_symbol_defined(view, marker)\nReturns the symbol assigned to marker number *marker*, in the range of `1` to `32`, used in\n`view.marker_define()`,\n`view.marker_define_pixmap()`, or `view.marker_define_rgba_image()`.\n@param view A view.\n@param marker The marker number in the range of `1` to `32` to get the symbol of.\n@return number
match_case ui.find.match_case (bool)\nMatch search text case sensitively.\nThe default value is `false`.
match_case_label_text ui.find.match_case_label_text (string, Write-only)\nThe text of the "Match case" label.\nThis is primarily used for localization.
maximized ui.maximized (bool)\nWhether or not Textadept's window is maximized.
maximum_history_size textadept.history.maximum_history_size (number)\nThe maximum number of history records to keep per view.\nThe default value is `100`.
-menu textadept.menu (module)\nDefines the menus used by Textadept.\nMenus are simply tables of menu items and submenus and may be edited in\nplace. A menu item itself is a table whose first element is a menu label and\nwhose second element is a menu command to run. Submenus have `title` keys\nassigned to string text.
-menu ui.menu(menu_table)\nLow-level function for creating a menu from table *menu_table* and returning\nthe userdata.\nYou probably want to use the higher-level `textadept.menu.menubar`,\n`textadept.menu.context_menu`, or `textadept.menu.tab_context_menu` tables.\nEmits a `MENU_CLICKED` event when a menu item is selected.\n@param menu_table A table defining the menu. It is an ordered list of tables\n with a string menu item, integer menu ID, and optional GDK keycode and\n modifier mask. The latter two are used to display key shortcuts in the\n menu. '_' characters are treated as a menu mnemonics. If the menu item is\n empty, a menu separator item is created. Submenus are just nested\n menu-structure tables. Their title text is defined with a `title` key.\n@usage ui.menu{ {'_New', 1}, {'_Open', 2}, {''}, {'_Quit', 4} }\n@usage ui.menu{ {'_New', 1, string.byte('n'), 4} } -- 'Ctrl+N'\n@see events.MENU_CLICKED\n@see textadept.menu.menubar\n@see textadept.menu.context_menu\n@see textadept.menu.tab_context_menu
-menubar textadept.menu.menubar (table)\nThe default main menubar.\nIndividual menus, submenus, and menu items can be retrieved by name in\naddition to table index number.
-menubar ui.menubar (table)\nA table of menus defining a menubar. (Write-only).\nThis is a low-level field. You probably want to use the higher-level\n`textadept.menu.menubar`.\n@see textadept.menu.menubar
+menu textadept.menu (module)\nDefines the menus used by Textadept.\nMenus are simply tables of menu items and submenus and may be edited in place. A menu item\nitself is a table whose first element is a menu label and whose second element is a menu\ncommand to run. Submenus have `title` keys assigned to string text.
+menu ui.menu(menu_table)\nLow-level function for creating a menu from table *menu_table* and returning the userdata.\nYou probably want to use the higher-level `textadept.menu.menubar`,\n`textadept.menu.context_menu`, or `textadept.menu.tab_context_menu` tables.\nEmits a `MENU_CLICKED` event when a menu item is selected.\n@param menu_table A table defining the menu. It is an ordered list of tables with a string\n menu item, integer menu ID, and optional GDK keycode and modifier mask. The latter\n two are used to display key shortcuts in the menu. '_' characters are treated as a menu\n mnemonics. If the menu item is empty, a menu separator item is created. Submenus are just\n nested menu-structure tables. Their title text is defined with a `title` key.\n@usage ui.menu{ {'_New', 1}, {'_Open', 2}, {''}, {'_Quit', 4} }\n@usage ui.menu{ {'_New', 1, string.byte('n'), 4} } -- 'Ctrl+N'\n@see events.MENU_CLICKED\n@see textadept.menu.menubar\n@see textadept.menu.context_menu\n@see textadept.menu.tab_context_menu
+menubar textadept.menu.menubar (table)\nThe default main menubar.\nIndividual menus, submenus, and menu items can be retrieved by name in addition to table\nindex number.
+menubar ui.menubar (table)\nA table of menus defining a menubar. (Write-only).\nThis is a low-level field. You probably want to use the higher-level `textadept.menu.menubar`.\n@see textadept.menu.menubar
minimum_line_distance textadept.history.minimum_line_distance (number)\nThe minimum number of lines between distinct history records.\nThe default value is `3`.
-mode keys.mode (string)\nThe current key mode.\nWhen non-`nil`, all key bindings defined outside of `keys[mode]` are\nignored.\nThe default value is `nil`.
+mode keys.mode (string)\nThe current key mode.\nWhen non-`nil`, all key bindings defined outside of `keys[mode]` are ignored.\nThe default value is `nil`.
modify buffer.modify (bool, Read-only)\nWhether or not the buffer has unsaved changes.
-modify_rule lexer.modify_rule(lexer, id, rule)\nReplaces in lexer *lexer* the existing rule identified by string *id* with\npattern *rule*.\n@param lexer The lexer to modify.\n@param id The id associated with this rule.\n@param rule The LPeg pattern of the rule.
-mouse_dwell_time view.mouse_dwell_time (number)\nThe number of milliseconds the mouse must idle before generating a\n`DWELL_START` event. A time of `view.TIME_FOREVER` will never generate\none.
-mouse_selection_rectangular_switch view.mouse_selection_rectangular_switch (bool)\nWhether or not pressing `view.rectangular_selection_modifier` when\nselecting text normally with the mouse turns on rectangular selection.\nThe default value is `false`.
+modify_rule lexer.modify_rule(lexer, id, rule)\nReplaces in lexer *lexer* the existing rule identified by string *id* with pattern *rule*.\n@param lexer The lexer to modify.\n@param id The id associated with this rule.\n@param rule The LPeg pattern of the rule.
+mouse_dwell_time view.mouse_dwell_time (number)\nThe number of milliseconds the mouse must idle before generating a `DWELL_START` event. A\ntime of `view.TIME_FOREVER` will never generate one.
+mouse_selection_rectangular_switch view.mouse_selection_rectangular_switch (bool)\nWhether or not pressing `view.rectangular_selection_modifier` when selecting text\nnormally with the mouse turns on rectangular selection.\nThe default value is `false`.
move_caret_inside_view buffer.move_caret_inside_view(buffer)\nMoves the caret into view if it is not already, removing any selections.\n@param buffer A buffer.
move_extends_selection buffer.move_extends_selection (bool, Read-only)\nWhether or not regular caret movement alters the selected text.\n`buffer.selection_mode` dictates this property.
move_selected_lines_down buffer.move_selected_lines_down(buffer)\nShifts the selected lines down one line.\n@param buffer A buffer.
move_selected_lines_up buffer.move_selected_lines_up(buffer)\nShifts the selected lines up one line.\n@param buffer A buffer.
-msgbox ui.dialogs.msgbox(options)\nPrompts the user with a generic message box dialog defined by dialog options\ntable *options*, returning the selected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the message box.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `informative_text`: The dialog's extra informative text.\n * `icon`: The dialog's GTK stock icon name. Examples are\n "gtk-dialog-error", "gtk-dialog-info", "gtk-dialog-question", and\n "gtk-dialog-warning". The dialog does not display an icon by default.\n * `icon_file`: The dialog's icon file path. This option has no effect when\n `icon` is set.\n * `button1`: The right-most button's label. The default value is\n `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.msgbox{title = 'EOL Mode', text = 'Which EOL?',\n icon = 'gtk-dialog-question', button1 = 'CRLF', button2 = 'CR',\n button3 = 'LF'}\n@return selected button or exit code
-multi_edge_add_line view.multi_edge_add_line(view, column, color)\nAdds a new vertical line at column number *column* with color *color*, in\n"0xBBGGRR" format.\n@param view A view.\n@param column The column number to add a vertical line at.\n@param color The color in "0xBBGGRR" format.
+msgbox ui.dialogs.msgbox(options)\nPrompts the user with a generic message box dialog defined by dialog options table *options*,\nreturning the selected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label. If the dialog timed\nout, returns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the message box.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `informative_text`: The dialog's extra informative text.\n * `icon`: The dialog's GTK stock icon name. Examples are "gtk-dialog-error",\n "gtk-dialog-info", "gtk-dialog-question", and "gtk-dialog-warning". The dialog does not\n display an icon by default.\n * `icon_file`: The dialog's icon file path. This option has no effect when `icon` is set.\n * `button1`: The right-most button's label. The default value is `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2` to be set.\n * `string_output`: Return the selected button's label (instead of its index) or the dialog's\n exit status instead of the button's index (instead of its exit code). The default value is\n `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.msgbox{title = 'EOL Mode', text = 'Which EOL?',\n icon = 'gtk-dialog-question', button1 = 'CRLF', button2 = 'CR',\n button3 = 'LF'}\n@return selected button or exit code
+multi_edge_add_line view.multi_edge_add_line(view, column, color)\nAdds a new vertical line at column number *column* with color *color*, in "0xBBGGRR" format.\n@param view A view.\n@param column The column number to add a vertical line at.\n@param color The color in "0xBBGGRR" format.
multi_edge_clear_all view.multi_edge_clear_all(view)\nClears all vertical lines created by `view:multi_edge_add_line()`.\n@param view A view.
multi_edge_column view.multi_edge_column (table, Read-only)\nTable of edge column positions per edge column number.\nA position of `-1` means no edge column was found.
multi_paste buffer.multi_paste (number)\nThe multiple selection paste mode.\n\n* `buffer.MULTIPASTE_ONCE`\n Paste into only the main selection.\n* `buffer.MULTIPASTE_EACH`\n Paste into all selections.\n\nThe default value is `buffer.MULTIPASTE_ONCE`.
-multiple_select_add_each buffer.multiple_select_add_each(buffer)\nAdds to the set of selections each occurrence of the main selection within\nthe target range.\nIf there is no selected text, the current word is used.\n@param buffer A buffer.
-multiple_select_add_next buffer.multiple_select_add_next(buffer)\nAdds to the set of selections the next occurrence of the main selection\nwithin the target range, makes that occurrence the new main selection, and\nscrolls it into view.\nIf there is no selected text, the current word is used.\n@param buffer A buffer.
+multiple_select_add_each buffer.multiple_select_add_each(buffer)\nAdds to the set of selections each occurrence of the main selection within the target range.\nIf there is no selected text, the current word is used.\n@param buffer A buffer.
+multiple_select_add_next buffer.multiple_select_add_next(buffer)\nAdds to the set of selections the next occurrence of the main selection within the target\nrange, makes that occurrence the new main selection, and scrolls it into view.\nIf there is no selected text, the current word is used.\n@param buffer A buffer.
multiple_selection buffer.multiple_selection (bool)\nEnable multiple selection.\nThe default value is `false`.
name_of_style buffer.name_of_style(buffer, style)\nReturns the name of style number *style*, which is between `1` and `256`.\n@param buffer A buffer.\n@param style The style number between `1` and `256` to get the name of.\n@return string
new buffer.new()\nCreates a new buffer, displays it in the current view, and returns it.\nEmits a `BUFFER_NEW` event.\n@return the new buffer.\n@see events.BUFFER_NEW
-new lexer.new(name, opts)\nCreates a returns a new lexer with the given name.\n@param name The lexer's name.\n@param opts Table of lexer options. Options currently supported:\n * `lex_by_line`: Whether or not the lexer only processes whole lines of\n text (instead of arbitrary chunks of text) at a time.\n Line lexers cannot look ahead to subsequent lines.\n The default value is `false`.\n * `fold_by_indentation`: Whether or not the lexer does not define any fold\n points and that fold points should be calculated based on changes in line\n indentation.\n The default value is `false`.\n * `case_insensitive_fold_points`: Whether or not fold points added via\n `lexer.add_fold_point()` ignore case.\n The default value is `false`.\n * `inherit`: Lexer to inherit from.\n The default value is `nil`.\n@usage lexer.new('rhtml', {inherit = lexer.load('html')})
+new lexer.new(name, opts)\nCreates a returns a new lexer with the given name.\n@param name The lexer's name.\n@param opts Table of lexer options. Options currently supported:\n * `lex_by_line`: Whether or not the lexer only processes whole lines of text (instead of\n arbitrary chunks of text) at a time. Line lexers cannot look ahead to subsequent lines.\n The default value is `false`.\n * `fold_by_indentation`: Whether or not the lexer does not define any fold points and that\n fold points should be calculated based on changes in line indentation. The default value\n is `false`.\n * `case_insensitive_fold_points`: Whether or not fold points added via\n `lexer.add_fold_point()` ignore case. The default value is `false`.\n * `inherit`: Lexer to inherit from. The default value is `nil`.\n@usage lexer.new('rhtml', {inherit = lexer.load('html')})
new_line buffer.new_line(buffer)\nTypes a new line at the caret position according to `buffer.eol_mode`.\n@param buffer A buffer.
newline lexer.newline (pattern)\nA pattern that matches a sequence of end of line characters.
-next_image_type _SCINTILLA.next_image_type()\nReturns a unique image type identier number for use with\n`view.register_image()` and `view.register_rgba_image()`.\nUse this function for custom image types in order to prevent clashes with\nidentifiers of other custom image types.\n@usage local image_type = _SCINTILLA.next_image_type()\n@see view.register_image\n@see view.register_rgba_image
-next_indic_number _SCINTILLA.next_indic_number()\nReturns a unique indicator number for use with custom indicators.\nUse this function for custom indicators in order to prevent clashes with\nidentifiers of other custom indicators.\n@usage local indic_num = _SCINTILLA.next_indic_number()\n@see view.indic_style
-next_marker_number _SCINTILLA.next_marker_number()\nReturns a unique marker number for use with `view.marker_define()`.\nUse this function for custom markers in order to prevent clashes with\nidentifiers of other custom markers.\n@usage local marknum = _SCINTILLA.next_marker_number()\n@see view.marker_define
-next_user_list_type _SCINTILLA.next_user_list_type()\nReturns a unique user list identier number for use with\n`buffer.user_list_show()`.\nUse this function for custom user lists in order to prevent clashes with\nlist identifiers of other custom user lists.\n@usage local list_type = _SCINTILLA.next_user_list_type()\n@see buffer.user_list_show
+next_image_type _SCINTILLA.next_image_type()\nReturns a unique image type identier number for use with `view.register_image()` and\n`view.register_rgba_image()`.\nUse this function for custom image types in order to prevent clashes with identifiers of\nother custom image types.\n@usage local image_type = _SCINTILLA.next_image_type()\n@see view.register_image\n@see view.register_rgba_image
+next_indic_number _SCINTILLA.next_indic_number()\nReturns a unique indicator number for use with custom indicators.\nUse this function for custom indicators in order to prevent clashes with identifiers of\nother custom indicators.\n@usage local indic_num = _SCINTILLA.next_indic_number()\n@see view.indic_style
+next_marker_number _SCINTILLA.next_marker_number()\nReturns a unique marker number for use with `view.marker_define()`.\nUse this function for custom markers in order to prevent clashes with identifiers of other\ncustom markers.\n@usage local marknum = _SCINTILLA.next_marker_number()\n@see view.marker_define
+next_user_list_type _SCINTILLA.next_user_list_type()\nReturns a unique user list identier number for use with `buffer.user_list_show()`.\nUse this function for custom user lists in order to prevent clashes with list identifiers\nof other custom user lists.\n@usage local list_type = _SCINTILLA.next_user_list_type()\n@see buffer.user_list_show
nonnewline lexer.nonnewline (pattern)\nA pattern that matches any single, non-newline character.
-number lexer.number (pattern)\nA pattern that matches a typical number, either a floating point, decimal,\nhexadecimal, or octal number.
+number lexer.number (pattern)\nA pattern that matches a typical number, either a floating point, decimal, hexadecimal,\nor octal number.
oct_num lexer.oct_num (pattern)\nA pattern that matches an octal number.
-ok_msgbox ui.dialogs.ok_msgbox(options)\nPrompts the user with a generic message box dialog defined by dialog options\ntable *options* and with localized "Ok" and "Cancel" buttons, returning the\nselected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the message box.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `informative_text`: The dialog's extra informative text.\n * `icon`: The dialog's GTK stock icon name. Examples are\n "gtk-dialog-error", "gtk-dialog-info", "gtk-dialog-question", and\n "gtk-dialog-warning". The dialog does not display an icon by default.\n * `icon_file`: The dialog's icon file path. This option has no effect when\n `icon` is set.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code
-open_file io.open_file(filenames, encodings)\nOpens *filenames*, a string filename or list of filenames, or the\nuser-selected filename(s).\nEmits a `FILE_OPENED` event.\n@param filenames Optional string filename or table of filenames to open. If\n `nil`, the user is prompted with a fileselect dialog.\n@param encodings Optional string encoding or table of encodings file contents\n are in (one encoding per file). If `nil`, encoding auto-detection is\n attempted via `io.encodings`.\n@see _G.events
+ok_msgbox ui.dialogs.ok_msgbox(options)\nPrompts the user with a generic message box dialog defined by dialog options table *options*\nand with localized "Ok" and "Cancel" buttons, returning the selected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label. If the dialog timed\nout, returns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the message box.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `informative_text`: The dialog's extra informative text.\n * `icon`: The dialog's GTK stock icon name. Examples are "gtk-dialog-error",\n "gtk-dialog-info", "gtk-dialog-question", and "gtk-dialog-warning". The dialog does not\n display an icon by default.\n * `icon_file`: The dialog's icon file path. This option has no effect when `icon` is set.\n * `no_cancel`: Do not display the "Cancel" button. The default value is `false`.\n * `string_output`: Return the selected button's label (instead of its index) or the dialog's\n exit status instead of the button's index (instead of its exit code). The default value is\n `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@return selected button or exit code
+open_file io.open_file(filenames, encodings)\nOpens *filenames*, a string filename or list of filenames, or the user-selected filename(s).\nEmits a `FILE_OPENED` event.\n@param filenames Optional string filename or table of filenames to open. If `nil`, the user\n is prompted with a fileselect dialog.\n@param encodings Optional string encoding or table of encodings file contents are in (one\n encoding per file). If `nil`, encoding auto-detection is attempted via `io.encodings`.\n@see _G.events
open_recent_file io.open_recent_file()\nPrompts the user to select a recently opened file to be reopened.\n@see recent_files
-optionselect ui.dialogs.optionselect(options)\nPrompts the user with an option selection dialog defined by dialog options\ntable *options*, returning the selected button's index along with the indices\nof the selected options.\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the text of the selected options.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the option select dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string options to show in the option group.\n * `button1`: The right-most button's label. The default value is\n `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `select`: The indices of initially selected options.\n * `string_output`: Return the selected button's label or the dialog's exit\n status along with the selected options' text instead of the button's\n index or the dialog's exit code along with the options' indices. The\n default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.optionselect{title = 'Language',\n informative_text = 'Check the languages you understand',\n items = {'English', 'Romanian'}, select = 1, string_output = true}\n@return selected button or exit code, list of selected options
+optionselect ui.dialogs.optionselect(options)\nPrompts the user with an option selection dialog defined by dialog options table *options*,\nreturning the selected button's index along with the indices of the selected options.\nIf *options*.`string_output` is `true`, returns the selected button's label along with the\ntext of the selected options. If the dialog timed out, returns `0` or `"timeout"`. If the\nuser canceled the dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the option select dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string options to show in the option group.\n * `button1`: The right-most button's label. The default value is `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2` to be set.\n * `select`: The indices of initially selected options.\n * `string_output`: Return the selected button's label or the dialog's exit status along\n with the selected options' text instead of the button's index or the dialog's exit code\n along with the options' indices. The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.optionselect{title = 'Language',\n informative_text = 'Check the languages you understand',\n items = {'English', 'Romanian'}, select = 1, string_output = true}\n@return selected button or exit code, list of selected options
os _G.os (module)\nExtends Lua's `os` library to provide process spawning capabilities.
overtype buffer.overtype (bool)\nEnable overtype mode, where typed characters overwrite existing ones.\nThe default value is `false`.
page_down buffer.page_down(buffer)\nMoves the caret down one page.\n@param buffer A buffer.
-page_down_extend buffer.page_down_extend(buffer)\nMoves the caret down one page, extending the selected text to the new\nposition.\n@param buffer A buffer.
-page_down_rect_extend buffer.page_down_rect_extend(buffer)\nMoves the caret down one page, extending the rectangular selection to the new\nposition.\n@param buffer A buffer.
+page_down_extend buffer.page_down_extend(buffer)\nMoves the caret down one page, extending the selected text to the new position.\n@param buffer A buffer.
+page_down_rect_extend buffer.page_down_rect_extend(buffer)\nMoves the caret down one page, extending the rectangular selection to the new position.\n@param buffer A buffer.
page_up buffer.page_up(buffer)\nMoves the caret up one page.\n@param buffer A buffer.
page_up_extend buffer.page_up_extend(buffer)\nMoves the caret up one page, extending the selected text to the new position.\n@param buffer A buffer.
-page_up_rect_extend buffer.page_up_rect_extend(buffer)\nMoves the caret up one page, extending the rectangular selection to the new\nposition.\n@param buffer A buffer.
+page_up_rect_extend buffer.page_up_rect_extend(buffer)\nMoves the caret up one page, extending the rectangular selection to the new position.\n@param buffer A buffer.
para_down buffer.para_down(buffer)\nMoves the caret down one paragraph.\nParagraphs are surrounded by one or more blank lines.\n@param buffer A buffer.
-para_down_extend buffer.para_down_extend(buffer)\nMoves the caret down one paragraph, extending the selected text to the new\nposition.\nParagraphs are surrounded by one or more blank lines.\n@param buffer A buffer.
+para_down_extend buffer.para_down_extend(buffer)\nMoves the caret down one paragraph, extending the selected text to the new position.\nParagraphs are surrounded by one or more blank lines.\n@param buffer A buffer.
para_up buffer.para_up(buffer)\nMoves the caret up one paragraph.\nParagraphs are surrounded by one or more blank lines.\n@param buffer A buffer.
-para_up_extend buffer.para_up_extend(buffer)\nMoves the caret up one paragraph, extending the selected text to the new\nposition.\nParagraphs are surrounded by one or more blank lines.\n@param buffer A buffer.
-paste buffer.paste(buffer)\nPastes the clipboard's contents into the buffer, replacing any selected text\naccording to `buffer.multi_paste`.\n@param buffer A buffer.
-paste_reindent textadept.editing.paste_reindent()\nPastes the text from the clipboard, taking into account the buffer's\nindentation settings and the indentation of the current and preceding lines.
-paths textadept.snippets.paths (table)\nList of directory paths to look for snippet files in.\nFilenames are of the form *lexer.trigger.ext* or *trigger.ext* (*.ext* is an\noptional, arbitrary file extension). If the global `snippets` table does not\ncontain a snippet for a given trigger, this table is consulted for a matching\nfilename, and the contents of that file is inserted as a snippet.\nNote: If a directory has multiple snippets with the same trigger, the snippet\nchosen for insertion is not defined and may not be constant.
+para_up_extend buffer.para_up_extend(buffer)\nMoves the caret up one paragraph, extending the selected text to the new position.\nParagraphs are surrounded by one or more blank lines.\n@param buffer A buffer.
+paste buffer.paste(buffer)\nPastes the clipboard's contents into the buffer, replacing any selected text according to\n`buffer.multi_paste`.\n@param buffer A buffer.
+paste_reindent textadept.editing.paste_reindent()\nPastes the text from the clipboard, taking into account the buffer's indentation settings\nand the indentation of the current and preceding lines.
+paths textadept.snippets.paths (table)\nList of directory paths to look for snippet files in.\nFilenames are of the form *lexer.trigger.ext* or *trigger.ext* (*.ext* is an optional,\narbitrary file extension). If the global `snippets` table does not contain a snippet for\na given trigger, this table is consulted for a matching filename, and the contents of that\nfile is inserted as a snippet.\nNote: If a directory has multiple snippets with the same trigger, the snippet chosen for\ninsertion is not defined and may not be constant.
patterns textadept.file_types.patterns (table)\nMap of first-line patterns to their associated lexer names.\nEach pattern is matched against the first line in the file.
play textadept.macros.play()\nPlays a recorded or loaded macro.\n@see load
-position_after buffer.position_after(buffer, pos)\nReturns the position of the character after position *pos* (taking multi-byte\ncharacters into account), or `buffer.length + 1` if there is no character\nafter *pos*.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the position after from.
-position_before buffer.position_before(buffer, pos)\nReturns the position of the character before position *pos* (taking\nmulti-byte characters into account), or `1` if there is no character before\n*pos*.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the position before from.\n@return number
+position_after buffer.position_after(buffer, pos)\nReturns the position of the character after position *pos* (taking multi-byte characters\ninto account), or `buffer.length + 1` if there is no character after *pos*.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the position after from.
+position_before buffer.position_before(buffer, pos)\nReturns the position of the character before position *pos* (taking multi-byte characters\ninto account), or `1` if there is no character before *pos*.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the position before from.\n@return number
position_from_line buffer.position_from_line(buffer, line)\nReturns the position at the beginning of line number *line*.\nReturns `-1` if *line* is greater than `buffer.line_count + 1`.\n@param buffer A buffer.\n@param line The line number in *buffer* to get the beginning position for.\n@return number
-position_relative buffer.position_relative(buffer, pos, n)\nReturns the position *n* characters before or after position *pos* (taking\nmulti-byte characters into account).\nReturns `1` if the position is less than 1 or greater than\n`buffer.length + 1`.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the relative position from.\n@param n The relative number of characters to get the position for. A\n negative number indicates a position before while a positive number\n indicates a position after.\n@return number
-previous textadept.snippets.previous()\nJumps back to the previous snippet placeholder, reverting any changes from\nthe current one.\nReturns `false` if no snippet is active.\n@return `false` if no snippet is active; `nil` otherwise.
+position_relative buffer.position_relative(buffer, pos, n)\nReturns the position *n* characters before or after position *pos* (taking multi-byte\ncharacters into account).\nReturns `1` if the position is less than 1 or greater than `buffer.length + 1`.\n@param buffer A buffer.\n@param pos The position in *buffer* to get the relative position from.\n@param n The relative number of characters to get the position for. A negative number\n indicates a position before while a positive number indicates a position after.\n@return number
+previous textadept.snippets.previous()\nJumps back to the previous snippet placeholder, reverting any changes from the current one.\nReturns `false` if no snippet is active.\n@return `false` if no snippet is active; `nil` otherwise.
print lexer.print (pattern)\nA pattern that matches any printable character (' ' to '~').
print ui.print(...)\nPrints the given string messages to the message buffer.\nOpens a new buffer if one has not already been opened for printing messages.\n@param ... Message strings.
-progressbar ui.dialogs.progressbar(options, f)\nDisplays a progressbar dialog, defined by dialog options table *options*,\nthat receives updates from function *f*.\nReturns "stopped" if *options*.`stoppable` is `true` and the user clicked the\n"Stop" button. Otherwise, returns `nil`.\n@param options Table of key-value option pairs for the progressbar dialog.\n\n * `title`: The dialog's title text.\n * `percent`: The initial progressbar percentage between 0 and 100.\n * `text`: The initial progressbar display text (GTK only).\n * `indeterminate`: Show the progress bar as "busy", with no percentage\n updates.\n * `stoppable`: Show the "Stop" button.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n@param f Function repeatedly called to do work and provide progress updates.\n The function is called without arguments and must return either `nil`,\n which indicates work is complete, or a progress percentage number in the\n range 0-100 and an optional string to display (GTK only). If the text is\n either "stop disable" or "stop enable" and *options*.`stoppable` is `true`,\n the "Stop" button is disabled or enabled, respectively.\n@usage ui.dialogs.progressbar({stoppable = true},\n function() if work() then return percent, status else return nil end end)\n@return nil or "stopped"
-properties _SCINTILLA.properties (table)\nMap of Scintilla property names to table values containing their "get"\nfunction IDs, "set" function IDs, return types, and wParam types.\nThe wParam type will be non-zero if the property is indexable.\nTypes are the same as in the `functions` table.\n@see functions
+progressbar ui.dialogs.progressbar(options, f)\nDisplays a progressbar dialog, defined by dialog options table *options*, that receives\nupdates from function *f*.\nReturns "stopped" if *options*.`stoppable` is `true` and the user clicked the "Stop"\nbutton. Otherwise, returns `nil`.\n@param options Table of key-value option pairs for the progressbar dialog.\n\n * `title`: The dialog's title text.\n * `percent`: The initial progressbar percentage between 0 and 100.\n * `text`: The initial progressbar display text (GTK only).\n * `indeterminate`: Show the progress bar as "busy", with no percentage updates.\n * `stoppable`: Show the "Stop" button.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n@param f Function repeatedly called to do work and provide progress updates. The function is\n called without arguments and must return either `nil`, which indicates work is complete,\n or a progress percentage number in the range 0-100 and an optional string to display (GTK\n only). If the text is either "stop disable" or "stop enable" and *options*.`stoppable` is\n `true`, the "Stop" button is disabled or enabled, respectively.\n@usage ui.dialogs.progressbar({stoppable = true},\n function() if work() then return percent, status else return nil end end)\n@return nil or "stopped"
+properties _SCINTILLA.properties (table)\nMap of Scintilla property names to table values containing their "get" function IDs, "set"\nfunction IDs, return types, and wParam types.\nThe wParam type will be non-zero if the property is indexable.\nTypes are the same as in the `functions` table.\n@see functions
property lexer.property (table)\nMap of key-value string pairs.
property view.property (table)\nMap of key-value string pairs used by lexers.
-property_expanded lexer.property_expanded (table, Read-only)\nMap of key-value string pairs with `$()` and `%()` variable replacement\nperformed in values.
-property_expanded view.property_expanded (table, Read-only)\nMap of key-value string pairs used by lexers with `$()` and `%()` variable\nreplacement performed in values.
-property_int lexer.property_int (table, Read-only)\nMap of key-value pairs with values interpreted as numbers, or `0` if not\nfound.
-property_int view.property_int (table, Read-only)\nMap of key-value pairs used by lexers with values interpreted as numbers,\nor `0` if not found.
-punct lexer.punct (pattern)\nA pattern that matches any punctuation character ('!' to '/', ':' to '@',\n'[' to ''', '{' to '~').
-punctuation_chars buffer.punctuation_chars (string)\nThe string set of characters recognized as punctuation characters.\nSet this only after setting `buffer.word_chars`.\nThe default value is a string that contains all non-word and non-whitespace\ncharacters.
-quick_open io.quick_open(paths, filter, opts)\nPrompts the user to select files to be opened from *paths*, a string\ndirectory path or list of directory paths, using a filtered list dialog.\nIf *paths* is `nil`, uses the current project's root directory, which is\nobtained from `io.get_project_root()`.\nString or list *filter* determines which files to show in the dialog, with\nthe default filter being `io.quick_open_filters[path]` (if it exists) or\n`lfs.default_filter`. A filter consists of Lua patterns that match file and\ndirectory paths to include or exclude. Patterns are inclusive by default.\nExclusive patterns begin with a '!'. If no inclusive patterns are given, any\npath is initially considered. As a convenience, file extensions can be\nspecified literally instead of as a Lua pattern (e.g. '.lua' vs. '%.lua$'),\nand '/' also matches the Windows directory separator ('[/\\]' is not needed).\nThe number of files in the list is capped at `quick_open_max`.\nIf *filter* is `nil` and *paths* is ultimately a string, the filter from the\n`io.quick_open_filters` table is used. If that filter does not exist,\n`lfs.default_filter` is used.\n*opts* is an optional table of additional options for\n`ui.dialogs.filteredlist()`.\n@param paths Optional string directory path or table of directory paths to\n search. The default value is the current project's root directory, if\n available.\n@param filter Optional filter for files and directories to include and/or\n exclude. The default value is `lfs.default_filter` unless a filter for\n *paths* is defined in `io.quick_open_filters`.\n@param opts Optional table of additional options for\n `ui.dialogs.filteredlist()`.\n@usage io.quick_open(buffer.filename:match('^(.+)[/\\]')) -- list all files\n in the current file's directory, subject to the default filter\n@usage io.quick_open(io.get_current_project(), '.lua') -- list all Lua files\n in the current project\n@usage io.quick_open(io.get_current_project(), '!/build') -- list all files\n in the current project except those in the build directory\n@see io.quick_open_filters\n@see lfs.default_filter\n@see quick_open_max\n@see ui.dialogs.filteredlist
+property_expanded lexer.property_expanded (table, Read-only)\nMap of key-value string pairs with `$()` and `%()` variable replacement performed in values.
+property_expanded view.property_expanded (table, Read-only)\nMap of key-value string pairs used by lexers with `$()` and `%()` variable replacement\nperformed in values.
+property_int lexer.property_int (table, Read-only)\nMap of key-value pairs with values interpreted as numbers, or `0` if not found.
+property_int view.property_int (table, Read-only)\nMap of key-value pairs used by lexers with values interpreted as numbers, or `0` if not found.
+punct lexer.punct (pattern)\nA pattern that matches any punctuation character ('!' to '/', ':' to '@', '[' to ''',\n'{' to '~').
+punctuation_chars buffer.punctuation_chars (string)\nThe string set of characters recognized as punctuation characters.\nSet this only after setting `buffer.word_chars`.\nThe default value is a string that contains all non-word and non-whitespace characters.
+quick_open io.quick_open(paths, filter, opts)\nPrompts the user to select files to be opened from *paths*, a string directory path or list\nof directory paths, using a filtered list dialog.\nIf *paths* is `nil`, uses the current project's root directory, which is obtained from\n`io.get_project_root()`.\nString or list *filter* determines which files to show in the dialog, with the default\nfilter being `io.quick_open_filters[path]` (if it exists) or `lfs.default_filter`. A filter\nconsists of Lua patterns that match file and directory paths to include or exclude. Patterns\nare inclusive by default. Exclusive patterns begin with a '!'. If no inclusive patterns are\ngiven, any path is initially considered. As a convenience, file extensions can be specified\nliterally instead of as a Lua pattern (e.g. '.lua' vs. '%.lua$'), and '/' also matches the\nWindows directory separator ('[/\\]' is not needed).\nThe number of files in the list is capped at `quick_open_max`.\nIf *filter* is `nil` and *paths* is ultimately a string, the filter from the\n`io.quick_open_filters` table is used. If that filter does not exist, `lfs.default_filter`\nis used.\n*opts* is an optional table of additional options for `ui.dialogs.filteredlist()`.\n@param paths Optional string directory path or table of directory paths to search. The\n default value is the current project's root directory, if available.\n@param filter Optional filter for files and directories to include and/or exclude. The\n default value is `lfs.default_filter` unless a filter for *paths* is defined in\n `io.quick_open_filters`.\n@param opts Optional table of additional options for `ui.dialogs.filteredlist()`.\n@usage io.quick_open(buffer.filename:match('^(.+)[/\\]')) -- list all files in the current\n file's directory, subject to the default filter\n@usage io.quick_open(io.get_current_project(), '.lua') -- list all Lua files in the current\n project\n@usage io.quick_open(io.get_current_project(), '!/build') -- list all files in the current\n project except those in the build directory\n@see io.quick_open_filters\n@see lfs.default_filter\n@see quick_open_max\n@see ui.dialogs.filteredlist
quick_open_filters io.quick_open_filters (table)\nMap of directory paths to filters used by `io.quick_open()`.\n@see quick_open
quick_open_max io.quick_open_max (number)\nThe maximum number of files listed in the quick open dialog.\nThe default value is `1000`.
-quit _G.quit()\nEmits a `QUIT` event, and unless any handler returns `false`, quits\nTextadept.\n@see events.QUIT
-range lexer.range(s, e, single_line, escapes, balanced)\nCreates and returns a pattern that matches a range of text bounded by strings\nor patterns *s* and *e*.\nThis is a convenience function for matching more complicated ranges like\nstrings with escape characters, balanced parentheses, and block comments\n(nested or not). *e* is optional and defaults to *s*. *single_line* indicates\nwhether or not the range must be on a single line; *escapes* indicates\nwhether or not to allow '\' as an escape character; and *balanced* indicates\nwhether or not to handle balanced ranges like parentheses, and requires *s*\nand *e* to be different.\n@param s String or pattern start of a range.\n@param e Optional string or pattern end of a range. The default value is *s*.\n@param single_line Optional flag indicating whether or not the range must be\n on a single line. The default value is `false`.\n@param escapes Optional flag indicating whether or not the range end may\n be escaped by a '\' character.\n The default value is `false` unless *s* and *e* are identical,\n single-character strings. In that case, the default value is `true`.\n@param balanced Optional flag indicating whether or not to match a balanced\n range, like the "%b" Lua pattern. This flag only applies if *s* and *e* are\n different.\n@usage local dq_str_escapes = lexer.range('"')\n@usage local dq_str_noescapes = lexer.range('"', false, false)\n@usage local unbalanced_parens = lexer.range('(', ')')\n@usage local balanced_parens = lexer.range('(', ')', false, false, true)\n@return pattern
-read spawn_proc:read(arg)\nReads and returns stdout from process *spawn_proc*, according to string\nformat or number *arg*.\nSimilar to Lua's `io.read()` and blocks for input. *spawn_proc* must still be\nrunning. If an error occurs while reading, returns `nil`, an error code, and\nan error message.\nEnsure any read operations read all stdout available, as the stdout callback\nfunction passed to `os.spawn()` will not be called until the stdout buffer is\nclear.\n@param arg Optional argument similar to those in Lua's `io.read()`, but "n"\n is not supported. The default value is "l", which reads a line.\n@return string of bytes read
+quit _G.quit()\nEmits a `QUIT` event, and unless any handler returns `false`, quits Textadept.\n@see events.QUIT
+range lexer.range(s, e, single_line, escapes, balanced)\nCreates and returns a pattern that matches a range of text bounded by strings or patterns *s*\nand *e*.\nThis is a convenience function for matching more complicated ranges like strings with escape\ncharacters, balanced parentheses, and block comments (nested or not). *e* is optional and\ndefaults to *s*. *single_line* indicates whether or not the range must be on a single line;\n*escapes* indicates whether or not to allow '\' as an escape character; and *balanced*\nindicates whether or not to handle balanced ranges like parentheses, and requires *s* and *e*\nto be different.\n@param s String or pattern start of a range.\n@param e Optional string or pattern end of a range. The default value is *s*.\n@param single_line Optional flag indicating whether or not the range must be on a single\n line. The default value is `false`.\n@param escapes Optional flag indicating whether or not the range end may be escaped by a '\'\n character. The default value is `false` unless *s* and *e* are identical, single-character\n strings. In that case, the default value is `true`.\n@param balanced Optional flag indicating whether or not to match a balanced range, like the\n "%b" Lua pattern. This flag only applies if *s* and *e* are different.\n@usage local dq_str_escapes = lexer.range('"')\n@usage local dq_str_noescapes = lexer.range('"', false, false)\n@usage local unbalanced_parens = lexer.range('(', ')')\n@usage local balanced_parens = lexer.range('(', ')', false, false, true)\n@return pattern
+read spawn_proc:read(arg)\nReads and returns stdout from process *spawn_proc*, according to string format or number *arg*.\nSimilar to Lua's `io.read()` and blocks for input. *spawn_proc* must still be running. If\nan error occurs while reading, returns `nil`, an error code, and an error message.\nEnsure any read operations read all stdout available, as the stdout callback function passed\nto `os.spawn()` will not be called until the stdout buffer is clear.\n@param arg Optional argument similar to those in Lua's `io.read()`, but "n" is not\n supported. The default value is "l", which reads a line.\n@return string of bytes read
read_only buffer.read_only (bool)\nWhether or not the buffer is read-only.\nThe default value is `false`.
recent_files io.recent_files (table)\nList of recently opened files, the most recent being towards the top.
-record textadept.history.record(filename, line, column, soft)\nRecords the given location in the current view's history.\n@param filename Optional string filename, buffer type, or identifier of the\n buffer to store. If `nil`, uses the current buffer.\n@param line Optional Integer line number to store. If `nil`, uses the current\n line.\n@param column Optional integer column number on line *line* to store. If\n `nil`, uses the current column.\n@param soft Optional flag that indicates whether or not this record should be\n skipped when navigating backward towards it, and updated when navigating\n away from it. The default value is `false`.
+record textadept.history.record(filename, line, column, soft)\nRecords the given location in the current view's history.\n@param filename Optional string filename, buffer type, or identifier of the buffer to store. If\n `nil`, uses the current buffer.\n@param line Optional Integer line number to store. If `nil`, uses the current line.\n@param column Optional integer column number on line *line* to store. If `nil`, uses the\n current column.\n@param soft Optional flag that indicates whether or not this record should be skipped when\n navigating backward towards it, and updated when navigating away from it. The default\n value is `false`.
record textadept.macros.record()\nToggles between starting and stopping macro recording.
rectangular_selection_anchor buffer.rectangular_selection_anchor (number)\nThe rectangular selection's anchor position.
rectangular_selection_anchor_virtual_space buffer.rectangular_selection_anchor_virtual_space (number)\nThe amount of virtual space for the rectangular selection's anchor.
rectangular_selection_caret buffer.rectangular_selection_caret (number)\nThe rectangular selection's caret position.
rectangular_selection_caret_virtual_space buffer.rectangular_selection_caret_virtual_space (number)\nThe amount of virtual space for the rectangular selection's caret.
-rectangular_selection_modifier view.rectangular_selection_modifier (number)\nThe modifier key used in combination with a mouse drag in order to create a\nrectangular selection.\n\n* `view.MOD_CTRL`\n The "Control" modifier key.\n* `view.MOD_ALT`\n The "Alt" modifier key.\n* `view.MOD_SUPER`\n The "Super" modifier key, usually defined as the left "Windows" or\n "Command" key.\n\nThe default value is `view.MOD_CTRL`.
+rectangular_selection_modifier view.rectangular_selection_modifier (number)\nThe modifier key used in combination with a mouse drag in order to create a rectangular\nselection.\n\n* `view.MOD_CTRL`\n The "Control" modifier key.\n* `view.MOD_ALT`\n The "Alt" modifier key.\n* `view.MOD_SUPER`\n The "Super" modifier key, usually defined as the left "Windows" or\n "Command" key.\n\nThe default value is `view.MOD_CTRL`.
redo buffer.redo(buffer)\nRedoes the next undone action.\n@param buffer A buffer.
regex ui.find.regex (bool)\nInterpret search text as a Regular Expression.\nThe default value is `false`.
regex_label_text ui.find.regex_label_text (string, Write-only)\nThe text of the "Regex" label.\nThis is primarily used for localization.
-register args.register(short, long, narg, f, description)\nRegisters a command line option with short and long versions *short* and\n*long*, respectively. *narg* is the number of arguments the option accepts,\n*f* is the function called when the option is set, and *description* is\nthe option's description when displaying help.\n@param short The string short version of the option.\n@param long The string long version of the option.\n@param narg The number of expected parameters for the option.\n@param f The Lua function to run when the option is set. It is passed *narg*\n string arguments.\n@param description The string description of the option for command line\n help.
-register_image view.register_image(view, type, xpm_data)\nRegisters XPM image *xpm_data* to type number *type* for use in\nautocompletion and user lists.\n@param view A view.\n@param type Integer type to register the image with.\n@param xpm_data The XPM data as described in `view.marker_define_pixmap()`.
-register_rgba_image view.register_rgba_image(view, type, pixels)\nRegisters RGBA image *pixels* to type number *type* for use in autocompletion\nand user lists.\nThe dimensions for *pixels* (`view.rgba_image_width` and\n`view.rgba_image_height`) must have already been defined. *pixels* is a\nsequence of 4 byte pixel values (red, blue, green, and alpha) defining the\nimage line by line starting at the top-left pixel.\n@param view A view.\n@param type Integer type to register the image with.\n@param pixels The RGBA data as described in\n `view.marker_define_rgba_image()`.
-reload buffer.reload(buffer)\nReloads the buffer's file contents, discarding any changes.\nEmits `FILE_BEFORE_RELOAD` and `FILE_AFTER_RELOAD` events if the buffer is\nthe current one.\n@param buffer A buffer.
+register args.register(short, long, narg, f, description)\nRegisters a command line option with short and long versions *short* and *long*, respectively.\n*narg* is the number of arguments the option accepts, *f* is the function called when the\noption is set, and *description* is the option's description when displaying help.\n@param short The string short version of the option.\n@param long The string long version of the option.\n@param narg The number of expected parameters for the option.\n@param f The Lua function to run when the option is set. It is passed *narg* string arguments.\n@param description The string description of the option for command line help.
+register_image view.register_image(view, type, xpm_data)\nRegisters XPM image *xpm_data* to type number *type* for use in autocompletion and user lists.\n@param view A view.\n@param type Integer type to register the image with.\n@param xpm_data The XPM data as described in `view.marker_define_pixmap()`.
+register_rgba_image view.register_rgba_image(view, type, pixels)\nRegisters RGBA image *pixels* to type number *type* for use in autocompletion and user lists.\nThe dimensions for *pixels* (`view.rgba_image_width` and `view.rgba_image_height`) must\nhave already been defined. *pixels* is a sequence of 4 byte pixel values (red, blue, green,\nand alpha) defining the image line by line starting at the top-left pixel.\n@param view A view.\n@param type Integer type to register the image with.\n@param pixels The RGBA data as described in `view.marker_define_rgba_image()`.
+reload buffer.reload(buffer)\nReloads the buffer's file contents, discarding any changes.\nEmits `FILE_BEFORE_RELOAD` and `FILE_AFTER_RELOAD` events if the buffer is the current one.\n@param buffer A buffer.
replace ui.find.replace()\nMimics pressing the "Replace" button.
replace_all ui.find.replace_all()\nMimics pressing the "Replace All" button.
replace_all_button_text ui.find.replace_all_button_text (string, Write-only)\nThe text of the "Replace All" button.\nThis is primarily used for localization.
replace_button_text ui.find.replace_button_text (string, Write-only)\nThe text of the "Replace" button.\nThis is primarily used for localization.
-replace_entry_text ui.find.replace_entry_text (string)\nThe text in the "Replace" entry.\nWhen searching for text in a directory of files, this is the current file\nand directory filter.
+replace_entry_text ui.find.replace_entry_text (string)\nThe text in the "Replace" entry.\nWhen searching for text in a directory of files, this is the current file and directory filter.
replace_label_text ui.find.replace_label_text (string, Write-only)\nThe text of the "Replace" label.\nThis is primarily used for localization.
replace_sel buffer.replace_sel(buffer, text)\nReplaces the selected text with string *text*, scrolling the caret into view.\n@param buffer A buffer.\n@param text The text to replace the selected text with.
-replace_target buffer.replace_target(buffer, text)\nReplaces the text in the target range with string *text* sans modifying any\nselections or scrolling the view.\nSetting the target and calling this function with an empty string is another\nway to delete text.\n@param buffer A buffer.\n@param text The text to replace the target range with.\n@return number
-replace_target_re buffer.replace_target_re(buffer, text)\nReplaces the text in the target range with string *text* but first replaces\nany "\d" sequences with the text of capture number *d* from the regular\nexpression (or the entire match for *d* = 0), and then returns the\nreplacement text's length.\n@param buffer A buffer.\n@param text The text to replace the target range with.\n@return number
-representation view.representation (table)\nThe alternative string representations of characters.\nRepresentations are displayed in the same way control characters are. Use\nthe empty string for the '\0' character when assigning its representation.\nCharacters are strings, not numeric codes, and can be multi-byte\ncharacters.\nCall `view.clear_representation()` to remove a representation.
-reset _G.reset()\nResets the Lua State by reloading all initialization scripts.\nLanguage modules for opened files are NOT reloaded. Re-opening the files that\nuse them will reload those modules instead.\nThis function is useful for modifying user scripts (such as\n*~/.textadept/init.lua* and *~/.textadept/modules/textadept/keys.lua*) on\nthe fly without having to restart Textadept. `arg` is set to `nil` when\nreinitializing the Lua State. Any scripts that need to differentiate between\nstartup and reset can test `arg`.
-rgba_image_height view.rgba_image_height (number)\nThe height of the RGBA image to be defined using\n`view.marker_define_rgba_image()`.
-rgba_image_scale view.rgba_image_scale (number)\nThe scale factor in percent of the RGBA image to be defined using\n`view.marker_define_rgba_image()`.\nThis is useful on macOS with a retina display where each display unit is 2\npixels: use a factor of `200` so that each image pixel is displayed using a\nscreen pixel. The default scale, `100`, will stretch each image pixel to\ncover 4 screen pixels on a retina display.
-rgba_image_width view.rgba_image_width (number)\nThe width of the RGBA image to be defined using\n`view.marker_define_rgba_image()` and\n`view.register_rgba_image()`.
+replace_target buffer.replace_target(buffer, text)\nReplaces the text in the target range with string *text* sans modifying any selections or\nscrolling the view.\nSetting the target and calling this function with an empty string is another way to delete text.\n@param buffer A buffer.\n@param text The text to replace the target range with.\n@return number
+replace_target_re buffer.replace_target_re(buffer, text)\nReplaces the text in the target range with string *text* but first replaces any "\d" sequences\nwith the text of capture number *d* from the regular expression (or the entire match for *d*\n= 0), and then returns the replacement text's length.\n@param buffer A buffer.\n@param text The text to replace the target range with.\n@return number
+representation view.representation (table)\nThe alternative string representations of characters.\nRepresentations are displayed in the same way control characters are. Use the empty\nstring for the '\0' character when assigning its representation. Characters are strings,\nnot numeric codes, and can be multi-byte characters.\nCall `view.clear_representation()` to remove a representation.
+reset _G.reset()\nResets the Lua State by reloading all initialization scripts.\nLanguage modules for opened files are NOT reloaded. Re-opening the files that use them will\nreload those modules instead.\nThis function is useful for modifying user scripts (such as *~/.textadept/init.lua* and\n*~/.textadept/modules/textadept/keys.lua*) on the fly without having to restart Textadept. `arg`\nis set to `nil` when reinitializing the Lua State. Any scripts that need to differentiate\nbetween startup and reset can test `arg`.
+rgba_image_height view.rgba_image_height (number)\nThe height of the RGBA image to be defined using `view.marker_define_rgba_image()`.
+rgba_image_scale view.rgba_image_scale (number)\nThe scale factor in percent of the RGBA image to be defined using\n`view.marker_define_rgba_image()`.\nThis is useful on macOS with a retina display where each display unit is 2 pixels: use a\nfactor of `200` so that each image pixel is displayed using a screen pixel.\nThe default scale, `100`, will stretch each image pixel to cover 4 screen pixels on a\nretina display.
+rgba_image_width view.rgba_image_width (number)\nThe width of the RGBA image to be defined using `view.marker_define_rgba_image()` and\n`view.register_rgba_image()`.
rotate_selection buffer.rotate_selection(buffer)\nDesignates the next additional selection to be the main selection.\n@param buffer A buffer.
-run textadept.run (module)\nCompile and run source code files with Textadept.\nLanguage modules may tweak the `compile_commands`,\n`run_commands`, and `error_patterns` tables for particular languages.\nThe user may tweak `build_commands` and `test_commands` for particular\nprojects.
-run textadept.run.run(filename)\nRuns file *filename* or the current file using an appropriate shell command\nfrom the `run_commands` table.\nThe shell command is determined from the file's filename, extension, or\nlanguage in that order.\nEmits `RUN_OUTPUT` events.\n@param filename Optional path to the file to run. The default value is the\n current file's filename.\n@see run_commands\n@see _G.events
-run ui.command_entry.run(f, keys, lang, height)\nOpens the command entry, subjecting it to any key bindings defined in table\n*keys*, highlighting text with lexer name *lang*, and displaying\n*height* number of lines at a time, and then when the `Enter` key is pressed,\ncloses the command entry and calls function *f* (if non-`nil`) with the\ncommand entry's text as an argument.\nBy default with no arguments given, opens a Lua command entry.\nThe command entry does not respond to Textadept's default key bindings, but\ninstead to the key bindings defined in *keys* and in\n`ui.command_entry.editing_keys`.\n@param f Optional function to call upon pressing `Enter` in the command\n entry, ending the mode. It should accept the command entry text as an\n argument.\n@param keys Optional table of key bindings to respond to. This is in\n addition to the basic editing and movement keys defined in\n `ui.command_entry.editing_keys`.\n `Esc` and `Enter` are automatically defined to cancel and finish the\n command entry, respectively.\n This parameter may be omitted completely.\n@param lang Optional string lexer name to use for command entry text. The\n default value is `'text'`.\n@param height Optional number of lines to display in the command entry. The\n default value is `1`.\n@usage ui.command_entry.run(ui.print)\n@see editing_keys
-run_commands textadept.run.run_commands (table)\nMap of filenames, file extensions, and lexer names to their associated "run"\nshell command line strings or functions that return strings.\nCommand line strings may have the following macros:\n\n + `%f`: The file's name, including its extension.\n + `%e`: The file's name, excluding its extension.\n + `%d`: The file's directory path.\n + `%p`: The file's full path.\n\nFunctions may also return a working directory and process environment table\nto operate in. By default, the working directory is the current file's parent\ndirectory and the environment is Textadept's environment.
-run_in_background textadept.run.run_in_background (bool)\nRun shell commands silently in the background.\nThis only applies when the message buffer is open, though it does not have\nto be visible.\nThe default value is `false`.
+run textadept.run (module)\nCompile and run source code files with Textadept.\nLanguage modules may tweak the `compile_commands`, `run_commands`, and\n`error_patterns` tables for particular languages.\nThe user may tweak `build_commands` and `test_commands` for particular projects.
+run textadept.run.run(filename)\nRuns file *filename* or the current file using an appropriate shell command from the\n`run_commands` table.\nThe shell command is determined from the file's filename, extension, or language in that order.\nEmits `RUN_OUTPUT` events.\n@param filename Optional path to the file to run. The default value is the current file's\n filename.\n@see run_commands\n@see _G.events
+run ui.command_entry.run(f, keys, lang, height)\nOpens the command entry, subjecting it to any key bindings defined in table *keys*,\nhighlighting text with lexer name *lang*, and displaying *height* number of lines at a time,\nand then when the `Enter` key is pressed, closes the command entry and calls function *f*\n(if non-`nil`) with the command entry's text as an argument.\nBy default with no arguments given, opens a Lua command entry.\nThe command entry does not respond to Textadept's default key bindings, but instead to the\nkey bindings defined in *keys* and in `ui.command_entry.editing_keys`.\n@param f Optional function to call upon pressing `Enter` in the command entry, ending the mode.\n It should accept the command entry text as an argument.\n@param keys Optional table of key bindings to respond to. This is in addition to the\n basic editing and movement keys defined in `ui.command_entry.editing_keys`. `Esc` and\n `Enter` are automatically defined to cancel and finish the command entry, respectively.\n This parameter may be omitted completely.\n@param lang Optional string lexer name to use for command entry text. The default value is\n `'text'`.\n@param height Optional number of lines to display in the command entry. The default value is `1`.\n@usage ui.command_entry.run(ui.print)\n@see editing_keys
+run_commands textadept.run.run_commands (table)\nMap of filenames, file extensions, and lexer names to their associated "run" shell command\nline strings or functions that return strings.\nCommand line strings may have the following macros:\n\n + `%f`: The file's name, including its extension.\n + `%e`: The file's name, excluding its extension.\n + `%d`: The file's directory path.\n + `%p`: The file's full path.\n\nFunctions may also return a working directory and process environment table to operate in. By\ndefault, the working directory is the current file's parent directory and the environment\nis Textadept's environment.
+run_in_background textadept.run.run_in_background (bool)\nRun shell commands silently in the background.\nThis only applies when the message buffer is open, though it does not have to be visible.\nThe default value is `false`.
save buffer.save(buffer)\nSaves the buffer to its file.\nIf the buffer does not have a file, the user is prompted for one.\nEmits `FILE_BEFORE_SAVE` and `FILE_AFTER_SAVE` events.\n@param buffer A buffer.
-save textadept.macros.save(filename)\nSaves a recorded macro to file *filename* or the user-selected file.\n@param filename Optional filename to save the recorded macro to. If `nil`,\n the user is prompted for one.
-save textadept.session.save(filename)\nSaves the session to file *filename* or the user-selected file.\nSaves split views, opened buffers, cursor information, recent files, and\nbookmarks.\nUpon quitting, the current session is saved to *filename* again, unless\n`textadept.session.save_on_quit` is `false`.\n@param filename Optional absolute path to the session file to save. If `nil`,\n the user is prompted for one.\n@usage textadept.session.save(filename)
+save textadept.macros.save(filename)\nSaves a recorded macro to file *filename* or the user-selected file.\n@param filename Optional filename to save the recorded macro to. If `nil`, the user is\n prompted for one.
+save textadept.session.save(filename)\nSaves the session to file *filename* or the user-selected file.\nSaves split views, opened buffers, cursor information, recent files, and bookmarks.\nUpon quitting, the current session is saved to *filename* again, unless\n`textadept.session.save_on_quit` is `false`.\n@param filename Optional absolute path to the session file to save. If `nil`, the user is\n prompted for one.\n@usage textadept.session.save(filename)
save_all_files io.save_all_files()\nSaves all unsaved buffers to their respective files.\n@see buffer.save
-save_as buffer.save_as(buffer, filename)\nSaves the buffer to file *filename* or the user-specified filename.\nEmits a `FILE_AFTER_SAVE` event.\n@param buffer A buffer.\n@param filename Optional new filepath to save the buffer to. If `nil`, the\n user is prompted for one.
-save_on_quit textadept.session.save_on_quit (bool)\nSave the session when quitting.\nThe default value is `true` unless the user passed the command line switch\n`-n` or `--nosession` to Textadept.
+save_as buffer.save_as(buffer, filename)\nSaves the buffer to file *filename* or the user-specified filename.\nEmits a `FILE_AFTER_SAVE` event.\n@param buffer A buffer.\n@param filename Optional new filepath to save the buffer to. If `nil`, the user is prompted\n for one.
+save_on_quit textadept.session.save_on_quit (bool)\nSave the session when quitting.\nThe default value is `true` unless the user passed the command line switch `-n` or\n`--nosession` to Textadept.
scroll_caret view.scroll_caret(view)\nScrolls the caret into view based on the policies previously defined in\n`view.set_x_caret_policy()` and `view.set_y_caret_policy()`.\n@param view A view.\n@see set_x_caret_policy\n@see set_y_caret_policy
-scroll_range view.scroll_range(view, secondary_pos, primary_pos)\nScrolls into view the range of text between positions *primary_pos* and\n*secondary_pos*, with priority given to *primary_pos*.\nSimilar to `view.scroll_caret()`, but with *primary_pos* instead of\n`buffer.current_pos`.\nThis is useful for scrolling search results into view.\n@param view A view.\n@param secondary_pos The secondary range position to scroll into view.\n@param primary_pos The primary range position to scroll into view.
+scroll_range view.scroll_range(view, secondary_pos, primary_pos)\nScrolls into view the range of text between positions *primary_pos* and *secondary_pos*,\nwith priority given to *primary_pos*.\nSimilar to `view.scroll_caret()`, but with *primary_pos* instead of `buffer.current_pos`.\nThis is useful for scrolling search results into view.\n@param view A view.\n@param secondary_pos The secondary range position to scroll into view.\n@param primary_pos The primary range position to scroll into view.
scroll_to_end view.scroll_to_end(view)\nScrolls to the end of the buffer without moving the caret.\n@param view A view.
scroll_to_start view.scroll_to_start(view)\nScrolls to the beginning of the buffer without moving the caret.\n@param view A view.
-scroll_width view.scroll_width (number)\nThe horizontal scrolling pixel width.\nFor performance, the view does not measure the display width of the buffer\nto determine the properties of the horizontal scroll bar, but uses an\nassumed width instead. To ensure the width of the currently visible lines\ncan be scrolled use `view.scroll_width_tracking`.\nThe default value is `2000`.
-scroll_width_tracking view.scroll_width_tracking (bool)\nContinuously update the horizontal scrolling width to match the maximum\nwidth of a displayed line beyond `view.scroll_width`.\nThe default value is `false`.
-search_anchor buffer.search_anchor(buffer)\nAnchors the position that `buffer.search_next()` and `buffer.search_prev()`\nstart at to the beginning of the current selection or caret position.\n@param buffer A buffer.
-search_flags buffer.search_flags (number)\nThe bit-mask of search flags used by `buffer.search_in_target()`.\n\n* `buffer.FIND_WHOLEWORD`\n Match search text only when it is surrounded by non-word characters.\n* `buffer.FIND_MATCHCASE`\n Match search text case sensitively.\n* `buffer.FIND_WORDSTART`\n Match search text only when the previous character is a non-word\n character.\n* `buffer.FIND_REGEXP`\n Interpret search text as a regular expression.\n\nThe default value is `0`.
-search_in_target buffer.search_in_target(buffer, text)\nSearches for the first occurrence of string *text* in the target range\nbounded by `buffer.target_start` and `buffer.target_end` using search flags\n`buffer.search_flags` and, if found, sets the new target range to that\noccurrence, returning its position or `-1` if *text* was not found.\n@param buffer A buffer.\n@param text The text to search the target range for.\n@return number\n@see search_flags
-search_next buffer.search_next(buffer, flags, text)\nSearches for and selects the first occurrence of string *text* starting at\nthe search anchor using search flags *flags*, returning that occurrence's\nposition or `-1` if *text* was not found.\nSelected text is not scrolled into view.\n@param buffer A buffer.\n@param flags The search flags to use. See `buffer.search_flags`.\n@param text The text to search for.\n@return number\n@see search_flags
-search_prev buffer.search_prev(buffer, flags, text)\nSearches for and selects the last occurrence of string *text* before the\nsearch anchor using search flags *flags*, returning that occurrence's\nposition or `-1` if *text* was not found.\n@param buffer A buffer.\n@param flags The search flags to use. See `buffer.search_flags`.\n@param text The text to search for.\n@return number\n@see search_flags
-secure_inputbox ui.dialogs.secure_inputbox(options)\nPrompts the user with a masked inputbox dialog defined by dialog options\ntable *options*, returning the selected button's index along with the user's\ninput text (the latter as a string or table, depending on the type of\n*options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the user's input text.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a\n table, the first table value is the main message text and any subsequent\n values are used as the labels for multiple entry boxes. Providing a\n single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the\n table values are used to populate the multiple entry boxes defined by\n `informative_text`.\n * `button1`: The right-most button's label. The default value is\n `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code, input text
-secure_standard_inputbox ui.dialogs.secure_standard_inputbox(options)\nPrompts the user with a masked inputbox dialog defined by dialog options\ntable *options* and with localized "Ok" and "Cancel" buttons, returning the\nselected button's index along with the user's input text (the latter as a\nstring or table, depending on the type of *options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the user's input text.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a\n table, the first table value is the main message text and any subsequent\n values are used as the labels for multiple entry boxes. Providing a\n single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the\n table values are used to populate the multiple entry boxes defined by\n `informative_text`.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code, input text
-sel_alpha view.sel_alpha (number)\nThe selection's alpha value, ranging from `0` (transparent) to `255`\n(opaque).\nThe default value is `view.ALPHA_NOALPHA`, for no alpha.
+scroll_width view.scroll_width (number)\nThe horizontal scrolling pixel width.\nFor performance, the view does not measure the display width of the buffer to determine\nthe properties of the horizontal scroll bar, but uses an assumed width instead. To ensure\nthe width of the currently visible lines can be scrolled use `view.scroll_width_tracking`.\nThe default value is `2000`.
+scroll_width_tracking view.scroll_width_tracking (bool)\nContinuously update the horizontal scrolling width to match the maximum width of a displayed\nline beyond `view.scroll_width`.\nThe default value is `false`.
+search_anchor buffer.search_anchor(buffer)\nAnchors the position that `buffer.search_next()` and `buffer.search_prev()` start at to the\nbeginning of the current selection or caret position.\n@param buffer A buffer.
+search_flags buffer.search_flags (number)\nThe bit-mask of search flags used by `buffer.search_in_target()`.\n\n* `buffer.FIND_WHOLEWORD`\n Match search text only when it is surrounded by non-word characters.\n* `buffer.FIND_MATCHCASE`\n Match search text case sensitively.\n* `buffer.FIND_WORDSTART`\n Match search text only when the previous character is a non-word character.\n* `buffer.FIND_REGEXP`\n Interpret search text as a regular expression.\n\nThe default value is `0`.
+search_in_target buffer.search_in_target(buffer, text)\nSearches for the first occurrence of string *text* in the target range bounded by\n`buffer.target_start` and `buffer.target_end` using search flags `buffer.search_flags`\nand, if found, sets the new target range to that occurrence, returning its position or `-1`\nif *text* was not found.\n@param buffer A buffer.\n@param text The text to search the target range for.\n@return number\n@see search_flags
+search_next buffer.search_next(buffer, flags, text)\nSearches for and selects the first occurrence of string *text* starting at the search\nanchor using search flags *flags*, returning that occurrence's position or `-1` if *text*\nwas not found.\nSelected text is not scrolled into view.\n@param buffer A buffer.\n@param flags The search flags to use. See `buffer.search_flags`.\n@param text The text to search for.\n@return number\n@see search_flags
+search_prev buffer.search_prev(buffer, flags, text)\nSearches for and selects the last occurrence of string *text* before the search anchor using\nsearch flags *flags*, returning that occurrence's position or `-1` if *text* was not found.\n@param buffer A buffer.\n@param flags The search flags to use. See `buffer.search_flags`.\n@param text The text to search for.\n@return number\n@see search_flags
+secure_inputbox ui.dialogs.secure_inputbox(options)\nPrompts the user with a masked inputbox dialog defined by dialog options table *options*,\nreturning the selected button's index along with the user's input text (the latter as a\nstring or table, depending on the type of *options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label along with the\nuser's input text. If the dialog timed out, returns `0` or `"timeout"`. If the user canceled\nthe dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a table, the first\n table value is the main message text and any subsequent values are used as the labels\n for multiple entry boxes. Providing a single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the table values are\n used to populate the multiple entry boxes defined by `informative_text`.\n * `button1`: The right-most button's label. The default value is `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2` to be set.\n * `string_output`: Return the selected button's label (instead of its index) or the dialog's\n exit status instead of the button's index (instead of its exit code). The default value is\n `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@return selected button or exit code, input text
+secure_standard_inputbox ui.dialogs.secure_standard_inputbox(options)\nPrompts the user with a masked inputbox dialog defined by dialog options table *options*\nand with localized "Ok" and "Cancel" buttons, returning the selected button's index along\nwith the user's input text (the latter as a string or table, depending on the type of\n*options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label along with the\nuser's input text. If the dialog timed out, returns `0` or `"timeout"`. If the user canceled\nthe dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a table, the first\n table value is the main message text and any subsequent values are used as the labels\n for multiple entry boxes. Providing a single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the table values are\n used to populate the multiple entry boxes defined by `informative_text`.\n * `no_cancel`: Do not display the "Cancel" button. The default value is `false`.\n * `string_output`: Return the selected button's label (instead of its index) or the dialog's\n exit status instead of the button's index (instead of its exit code). The default value is\n `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@return selected button or exit code, input text
+sel_alpha view.sel_alpha (number)\nThe selection's alpha value, ranging from `0` (transparent) to `255` (opaque).\nThe default value is `view.ALPHA_NOALPHA`, for no alpha.
sel_eol_filled view.sel_eol_filled (bool)\nExtend the selection to the view's right margin.\nThe default value is `false`.
-select textadept.snippets.select()\nPrompts the user to select a snippet to insert from a list of global and\nlanguage-specific snippets.
+select textadept.snippets.select()\nPrompts the user to select a snippet to insert from a list of global and language-specific\nsnippets.
select_all buffer.select_all(buffer)\nSelects all of the buffer's text without scrolling the view.\n@param buffer A buffer.
select_command textadept.menu.select_command()\nPrompts the user to select a menu command to run.
-select_enclosed textadept.editing.select_enclosed(left, right)\nSelects the text between strings *left* and *right* that enclose the caret.\nIf that range is already selected, toggles between selecting *left* and\n*right* as well.\nIf *left* and *right* are not provided, they are assumed to be one of the\ndelimiter pairs specified in `auto_pairs` and are inferred from the current\nposition or selection.\n@param left Optional left part of the enclosure.\n@param right Optional right part of the enclosure.\n@see auto_pairs
+select_enclosed textadept.editing.select_enclosed(left, right)\nSelects the text between strings *left* and *right* that enclose the caret.\nIf that range is already selected, toggles between selecting *left* and *right* as well.\nIf *left* and *right* are not provided, they are assumed to be one of the delimiter pairs\nspecified in `auto_pairs` and are inferred from the current position or selection.\n@param left Optional left part of the enclosure.\n@param right Optional right part of the enclosure.\n@see auto_pairs
select_lexer textadept.file_types.select_lexer()\nPrompts the user to select a lexer for the current buffer.\n@see buffer.set_lexer
select_line textadept.editing.select_line()\nSelects the current line.
select_paragraph textadept.editing.select_paragraph()\nSelects the current paragraph.\nParagraphs are surrounded by one or more blank lines.
-select_word textadept.editing.select_word(all)\nSelects the current word or, if *all* is `true`, all occurrences of the\ncurrent word.\nIf a word is already selected, selects the next occurrence as a multiple\nselection.\n@param all Whether or not to select all occurrences of the current word.\n The default value is `false`.\n@see buffer.word_chars
+select_word textadept.editing.select_word(all)\nSelects the current word or, if *all* is `true`, all occurrences of the current word.\nIf a word is already selected, selects the next occurrence as a multiple selection.\n@param all Whether or not to select all occurrences of the current word. The default value is\n `false`.\n@see buffer.word_chars
selection_duplicate buffer.selection_duplicate(buffer)\nDuplicates the selected text to its right.\nIf no text is selected, duplicates the current line on a new line below.\n@param buffer A buffer.
selection_empty buffer.selection_empty (bool, Read-only)\nWhether or not no text is selected.
selection_end buffer.selection_end (number)\nThe position of the end of the selected text.\nWhen set, becomes the current position, but is not scrolled into view.
selection_is_rectangle buffer.selection_is_rectangle (bool, Read-only)\nWhether or not the selection is a rectangular selection.
-selection_mode buffer.selection_mode (number)\nThe selection mode.\n\n* `buffer.SEL_STREAM`\n Character selection.\n* `buffer.SEL_RECTANGLE`\n Rectangular selection.\n* `buffer.SEL_LINES`\n Line selection.\n* `buffer.SEL_THIN`\n Thin rectangular selection. This is the mode after a rectangular\n selection has been typed into and ensures that no characters are\n selected.\n\nWhen set, caret movement alters the selected text until this field is set\nagain to the same value or until `buffer.cancel()` is called.
-selection_n_anchor buffer.selection_n_anchor (table)\nTable of positions at the beginning of existing selections numbered from\n`1`, the main selection.
-selection_n_anchor_virtual_space buffer.selection_n_anchor_virtual_space (table)\nTable of positions at the beginning of virtual space selected in existing\nselections numbered from `1`, the main selection.
-selection_n_caret buffer.selection_n_caret (table)\nTable of positions at the end of existing selections numbered from `1`,\nthe main selection.
-selection_n_caret_virtual_space buffer.selection_n_caret_virtual_space (table)\nTable of positions at the end of virtual space selected in existing\nselections numbered from `1`, the main selection.
-selection_n_end buffer.selection_n_end (table)\nTable of positions at the end of existing selections numbered from `1`,\nthe main selection.
-selection_n_end_virtual_space buffer.selection_n_end_virtual_space (number, Read-only)\nTable of positions at the end of virtual space selected in existing\nselections numbered from `1`, the main selection.
-selection_n_start buffer.selection_n_start (table)\nTable of positions at the beginning of existing selections numbered from\n`1`, the main selection.
-selection_n_start_virtual_space buffer.selection_n_start_virtual_space (number, Read-only)\nTable of positions at the beginning of virtual space selected in existing\nselections numbered from `1`, the main selection.
+selection_mode buffer.selection_mode (number)\nThe selection mode.\n\n* `buffer.SEL_STREAM`\n Character selection.\n* `buffer.SEL_RECTANGLE`\n Rectangular selection.\n* `buffer.SEL_LINES`\n Line selection.\n* `buffer.SEL_THIN`\n Thin rectangular selection. This is the mode after a rectangular selection has been\n typed into and ensures that no characters are selected.\n\nWhen set, caret movement alters the selected text until this field is set again to the\nsame value or until `buffer.cancel()` is called.
+selection_n_anchor buffer.selection_n_anchor (table)\nTable of positions at the beginning of existing selections numbered from `1`, the main\nselection.
+selection_n_anchor_virtual_space buffer.selection_n_anchor_virtual_space (table)\nTable of positions at the beginning of virtual space selected in existing selections\nnumbered from `1`, the main selection.
+selection_n_caret buffer.selection_n_caret (table)\nTable of positions at the end of existing selections numbered from `1`, the main selection.
+selection_n_caret_virtual_space buffer.selection_n_caret_virtual_space (table)\nTable of positions at the end of virtual space selected in existing selections numbered from\n`1`, the main selection.
+selection_n_end buffer.selection_n_end (table)\nTable of positions at the end of existing selections numbered from `1`, the main selection.
+selection_n_end_virtual_space buffer.selection_n_end_virtual_space (number, Read-only)\nTable of positions at the end of virtual space selected in existing selections numbered from\n`1`, the main selection.
+selection_n_start buffer.selection_n_start (table)\nTable of positions at the beginning of existing selections numbered from `1`, the main\nselection.
+selection_n_start_virtual_space buffer.selection_n_start_virtual_space (number, Read-only)\nTable of positions at the beginning of virtual space selected in existing selections\nnumbered from `1`, the main selection.
selection_start buffer.selection_start (number)\nThe position of the beginning of the selected text.\nWhen set, becomes the anchor, but is not scrolled into view.
selections buffer.selections (number, Read-only)\nThe number of active selections. There is always at least one selection.
session textadept.session (module)\nSession support for Textadept.
-set_arguments textadept.run.set_arguments(filename, run, compile)\nAppends the command line argument strings *run* and *compile* to their\nrespective run and compile commands for file *filename* or the current file.\nIf either is `nil`, prompts the user for missing the arguments. Each filename\nhas its own set of compile and run arguments.\n@param filename Optional path to the file to set run/compile arguments for.\n@param run Optional string run arguments to set. If `nil`, the user is\n prompted for them. Pass the empty string for no run arguments.\n@param compile Optional string compile arguments to set. If `nil`, the user\n is prompted for them. Pass the empty string for no compile arguments.\n@see run_commands\n@see compile_commands
-set_chars_default buffer.set_chars_default(buffer)\nResets `buffer.word_chars`, `buffer.whitespace_chars`, and\n`buffer.punctuation_chars` to their respective defaults.\n@param buffer A buffer.\n@see word_chars\n@see whitespace_chars\n@see punctuation_chars
+set_arguments textadept.run.set_arguments(filename, run, compile)\nAppends the command line argument strings *run* and *compile* to their respective run and\ncompile commands for file *filename* or the current file.\nIf either is `nil`, prompts the user for missing the arguments. Each filename has its own\nset of compile and run arguments.\n@param filename Optional path to the file to set run/compile arguments for.\n@param run Optional string run arguments to set. If `nil`, the user is prompted for them. Pass\n the empty string for no run arguments.\n@param compile Optional string compile arguments to set. If `nil`, the user is prompted\n for them. Pass the empty string for no compile arguments.\n@see run_commands\n@see compile_commands
+set_chars_default buffer.set_chars_default(buffer)\nResets `buffer.word_chars`, `buffer.whitespace_chars`, and `buffer.punctuation_chars` to\ntheir respective defaults.\n@param buffer A buffer.\n@see word_chars\n@see whitespace_chars\n@see punctuation_chars
set_default_fold_display_text view.set_default_fold_display_text(view, text)\nSets the default fold display text to string *text*.\n@param view A view.\n@param text The text to display by default next to folded lines.\n@see toggle_fold_show_text
-set_empty_selection buffer.set_empty_selection(buffer, pos)\nMoves the caret to position *pos* without scrolling the view and removes any\nselections.\n@param buffer A buffer\n@param pos The position in *buffer* to move to.
-set_encoding buffer.set_encoding(buffer, encoding)\nConverts the buffer's contents to encoding *encoding*.\n@param buffer A buffer.\n@param encoding The string encoding to set. Valid encodings are ones that GNU\n iconv accepts. If `nil`, assumes a binary encoding.\n@usage buffer:set_encoding('CP1252')
-set_fold_margin_color view.set_fold_margin_color(view, use_setting, color)\nOverrides the fold margin's default color with color *color*, in "0xBBGGRR"\nformat,\nif *use_setting* is `true`.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
-set_fold_margin_hi_color view.set_fold_margin_hi_color(view, use_setting, color)\nOverrides the fold margin's default highlight color with color *color*, in\n"0xBBGGRR" format, if *use_setting* is `true`.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
-set_lexer buffer.set_lexer(buffer, name)\nAssociates string lexer name *name* or the auto-detected lexer name with the\nbuffer and then loads the appropriate language module if that module exists.\n@param buffer A buffer.\n@param name Optional string lexer name to set. If `nil`, attempts to\n auto-detect the buffer's lexer.\n@usage buffer:set_lexer('lexer_name')
+set_empty_selection buffer.set_empty_selection(buffer, pos)\nMoves the caret to position *pos* without scrolling the view and removes any selections.\n@param buffer A buffer\n@param pos The position in *buffer* to move to.
+set_encoding buffer.set_encoding(buffer, encoding)\nConverts the buffer's contents to encoding *encoding*.\n@param buffer A buffer.\n@param encoding The string encoding to set. Valid encodings are ones that GNU iconv accepts. If\n `nil`, assumes a binary encoding.\n@usage buffer:set_encoding('CP1252')
+set_fold_margin_color view.set_fold_margin_color(view, use_setting, color)\nOverrides the fold margin's default color with color *color*, in "0xBBGGRR" format, if\n*use_setting* is `true`.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
+set_fold_margin_hi_color view.set_fold_margin_hi_color(view, use_setting, color)\nOverrides the fold margin's default highlight color with color *color*, in "0xBBGGRR" format,\nif *use_setting* is `true`.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
+set_lexer buffer.set_lexer(buffer, name)\nAssociates string lexer name *name* or the auto-detected lexer name with the buffer and then\nloads the appropriate language module if that module exists.\n@param buffer A buffer.\n@param name Optional string lexer name to set. If `nil`, attempts to auto-detect the\n buffer's lexer.\n@usage buffer:set_lexer('lexer_name')
set_save_point buffer.set_save_point(buffer)\nIndicates the buffer has no unsaved changes.\n@param buffer A buffer.
-set_sel buffer.set_sel(buffer, start_pos, end_pos)\nSelects the range of text between positions *start_pos* and *end_pos*,\nscrolling the selected text into view.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to\n select. If negative, it means the end of the buffer.\n@param end_pos The end position of the range of text in *buffer* to select.\n If negative, it means remove any selection (i.e. set the `anchor` to the\n same position as `current_pos`).
-set_sel_back view.set_sel_back(view, use_setting, color)\nOverrides the selection's default background color with color *color*, in\n"0xBBGGRR" format, if *use_setting* is `true`.\nOverwrites any existing `view.additional_sel_back` color.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
-set_sel_fore view.set_sel_fore(view, use_setting, color)\nOverrides the selection's default foreground color with color *color*, in\n"0xBBGGRR" format, if *use_setting* is `true`.\nOverwrites any existing `view.additional_sel_fore` color.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
-set_selection buffer.set_selection(buffer, end_pos, start_pos)\nSelects the range of text between positions *start_pos* to *end_pos*,\nremoving all other selections.\n@param buffer A buffer.\n@param end_pos The caret position of the range of text to select in *buffer*.\n@param start_pos The anchor position of the range of text to select in\n *buffer*.
-set_styling buffer.set_styling(buffer, length, style)\nAssigns style number *style*, in the range from `1` to `256`, to the next\n*length* characters, starting from the current styling position, and\nincrements the styling position by *length*.\n`buffer:start_styling` should be called before `buffer:set_styling()`.\n@param buffer A buffer.\n@param length The number of characters to style.\n@param style The style number to set.
-set_target_range buffer.set_target_range(buffer, start_pos, end_pos)\nDefines the target range's beginning and end positions as *start_pos* and\n*end_pos*, respectively.\n@param buffer A buffer.\n@param start_pos The position of the beginning of the target range.\n@param end_pos The position of the end of the target range.
+set_sel buffer.set_sel(buffer, start_pos, end_pos)\nSelects the range of text between positions *start_pos* and *end_pos*, scrolling the selected\ntext into view.\n@param buffer A buffer.\n@param start_pos The start position of the range of text in *buffer* to select. If negative,\n it means the end of the buffer.\n@param end_pos The end position of the range of text in *buffer* to select. If negative,\n it means remove any selection (i.e. set the `anchor` to the same position as `current_pos`).
+set_sel_back view.set_sel_back(view, use_setting, color)\nOverrides the selection's default background color with color *color*, in "0xBBGGRR" format,\nif *use_setting* is `true`.\nOverwrites any existing `view.additional_sel_back` color.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
+set_sel_fore view.set_sel_fore(view, use_setting, color)\nOverrides the selection's default foreground color with color *color*, in "0xBBGGRR" format,\nif *use_setting* is `true`.\nOverwrites any existing `view.additional_sel_fore` color.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
+set_selection buffer.set_selection(buffer, end_pos, start_pos)\nSelects the range of text between positions *start_pos* to *end_pos*, removing all other\nselections.\n@param buffer A buffer.\n@param end_pos The caret position of the range of text to select in *buffer*.\n@param start_pos The anchor position of the range of text to select in *buffer*.
+set_styling buffer.set_styling(buffer, length, style)\nAssigns style number *style*, in the range from `1` to `256`, to the next *length* characters,\nstarting from the current styling position, and increments the styling position by *length*.\n`buffer:start_styling` should be called before `buffer:set_styling()`.\n@param buffer A buffer.\n@param length The number of characters to style.\n@param style The style number to set.
+set_target_range buffer.set_target_range(buffer, start_pos, end_pos)\nDefines the target range's beginning and end positions as *start_pos* and *end_pos*,\nrespectively.\n@param buffer A buffer.\n@param start_pos The position of the beginning of the target range.\n@param end_pos The position of the end of the target range.
set_text buffer.set_text(buffer, text)\nReplaces the buffer's text with string *text*.\n@param buffer A buffer.\n@param text The text to set.
-set_theme view.set_theme(view, name, env)\nSets the view's color theme to be string *name*, with the contents of table\n*env* available as global variables.\nUser themes override Textadept's default themes when they have the same name.\nIf *name* contains slashes, it is assumed to be an absolute path to a theme\ninstead of a theme name.\n@param view A view.\n@param name The name or absolute path of a theme to set.\n@param env Optional table of global variables themes can utilize to override\n default settings such as font and size.\n@usage view:set_theme('light', {font = 'Monospace', size = 12})\n@see _G.lexer.colors\n@see _G.lexer.styles
-set_visible_policy view.set_visible_policy(view, policy, y)\nDefines scrolling policy bit-mask *policy* as the policy for keeping the\ncaret *y* number of lines away from the vertical margins as\n`view.ensure_visible_enforce_policy()` redisplays hidden or folded lines.\nIt is similar in operation to `view.set_y_caret_policy()`.\n@param view A view.\n@param policy The combination of `view.VISIBLE_SLOP` and\n `view.VISIBLE_STRICT` policy flags to set.\n@param y The number of lines from the vertical margins to keep the caret.
-set_whitespace_back view.set_whitespace_back(view, use_setting, color)\nOverrides the background color of whitespace with color *color*, in\n"0xBBGGRR" format, if *use_setting* is `true`.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
-set_whitespace_fore view.set_whitespace_fore(view, use_setting, color)\nOverrides the foreground color of whitespace with color *color*, in\n"0xBBGGRR" format, if *use_setting* is `true`.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
-set_x_caret_policy view.set_x_caret_policy(view, policy, x)\nDefines scrolling policy bit-mask *policy* as the policy for keeping the\ncaret *x* number of pixels away from the horizontal margins.\n@param view A view.\n@param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`,\n `view.CARET_EVEN`, and `view.CARET_JUMPS` policy flags to set.\n@param x The number of pixels from the horizontal margins to keep the caret.
-set_y_caret_policy view.set_y_caret_policy(view, policy, y)\nDefines scrolling policy bit-mask *policy* as the policy for keeping the\ncaret *y* number of lines away from the vertical margins.\n@param view A view.\n@param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`,\n `view.CARET_EVEN`, and `view.CARET_JUMPS` policy flags to set.\n@param y The number of lines from the vertical margins to keep the caret.
-show_documentation textadept.editing.show_documentation(pos, ignore_case)\nDisplays a call tip with documentation for the symbol under or directly\nbehind position *pos* or the caret position.\nDocumentation is read from API files in the `api_files` table.\nIf a call tip is already shown, cycles to the next one if it exists.\nSymbols are determined by using `buffer.word_chars`.\n@param pos Optional position of the symbol to show documentation for. If\n omitted, the caret position is used.\n@param ignore_case Optional flag that indicates whether or not to search\n API files case-insensitively for symbols. The default value is `false`.\n@see api_files\n@see buffer.word_chars
-show_lines view.show_lines(view, start_line, end_line)\nShows the range of lines between line numbers *start_line* to *end_line*.\nThis has no effect on fold levels or fold flags and the first line cannot be\nhidden.\n@param view A view.\n@param start_line The start line of the range of lines in *view* to show.\n@param end_line The end line of the range of lines in *view* to show.
-silent_print ui.silent_print (bool)\nWhether or not to print messages to buffers silently.\nThis is not guaranteed to be a constant value, as Textadept may change it\nfor the editor's own purposes. This flag should be used only in conjunction\nwith a group of `ui.print()` and `ui._print()` function calls.\nThe default value is `false`, and focuses buffers when messages are printed\nto them.
+set_theme view.set_theme(view, name, env)\nSets the view's color theme to be string *name*, with the contents of table *env* available\nas global variables.\nUser themes override Textadept's default themes when they have the same name. If *name*\ncontains slashes, it is assumed to be an absolute path to a theme instead of a theme name.\n@param view A view.\n@param name The name or absolute path of a theme to set.\n@param env Optional table of global variables themes can utilize to override default settings\n such as font and size.\n@usage view:set_theme('light', {font = 'Monospace', size = 12})\n@see _G.lexer.colors\n@see _G.lexer.styles
+set_visible_policy view.set_visible_policy(view, policy, y)\nDefines scrolling policy bit-mask *policy* as the policy for keeping the caret *y* number\nof lines away from the vertical margins as `view.ensure_visible_enforce_policy()` redisplays\nhidden or folded lines.\nIt is similar in operation to `view.set_y_caret_policy()`.\n@param view A view.\n@param policy The combination of `view.VISIBLE_SLOP` and `view.VISIBLE_STRICT` policy flags\n to set.\n@param y The number of lines from the vertical margins to keep the caret.
+set_whitespace_back view.set_whitespace_back(view, use_setting, color)\nOverrides the background color of whitespace with color *color*, in "0xBBGGRR" format,\nif *use_setting* is `true`.\n@param view A view.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
+set_whitespace_fore view.set_whitespace_fore(view, use_setting, color)\nOverrides the foreground color of whitespace with color *color*, in "0xBBGGRR" format,\nif *use_setting* is `true`.\n@param use_setting Whether or not to use *color*.\n@param color The color in "0xBBGGRR" format.
+set_x_caret_policy view.set_x_caret_policy(view, policy, x)\nDefines scrolling policy bit-mask *policy* as the policy for keeping the caret *x* number\nof pixels away from the horizontal margins.\n@param view A view.\n@param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`, `view.CARET_EVEN`,\n and `view.CARET_JUMPS` policy flags to set.\n@param x The number of pixels from the horizontal margins to keep the caret.
+set_y_caret_policy view.set_y_caret_policy(view, policy, y)\nDefines scrolling policy bit-mask *policy* as the policy for keeping the caret *y* number\nof lines away from the vertical margins.\n@param view A view.\n@param policy The combination of `view.CARET_SLOP`, `view.CARET_STRICT`, `view.CARET_EVEN`,\n and `view.CARET_JUMPS` policy flags to set.\n@param y The number of lines from the vertical margins to keep the caret.
+show_documentation textadept.editing.show_documentation(pos, ignore_case)\nDisplays a call tip with documentation for the symbol under or directly behind position *pos*\nor the caret position.\nDocumentation is read from API files in the `api_files` table.\nIf a call tip is already shown, cycles to the next one if it exists.\nSymbols are determined by using `buffer.word_chars`.\n@param pos Optional position of the symbol to show documentation for. If omitted, the caret\n position is used.\n@param ignore_case Optional flag that indicates whether or not to search API files\n case-insensitively for symbols. The default value is `false`.\n@see api_files\n@see buffer.word_chars
+show_lines view.show_lines(view, start_line, end_line)\nShows the range of lines between line numbers *start_line* to *end_line*.\nThis has no effect on fold levels or fold flags and the first line cannot be hidden.\n@param view A view.\n@param start_line The start line of the range of lines in *view* to show.\n@param end_line The end line of the range of lines in *view* to show.
+silent_print ui.silent_print (bool)\nWhether or not to print messages to buffers silently.\nThis is not guaranteed to be a constant value, as Textadept may change it for the editor's\nown purposes. This flag should be used only in conjunction with a group of `ui.print()`\nand `ui._print()` function calls.\nThe default value is `false`, and focuses buffers when messages are printed to them.
size ui.size (table)\nA table containing the width and height pixel values of Textadept's window.
size view.size (number)\nThe split resizer's pixel position if the view is a split one.
snippet textadept.editing.autocompleters.snippet (function)\nAutocompleter function for snippet trigger words.
-snippets _G.snippets (table)\nMap of snippet triggers with their snippet text or functions that return such\ntext, with language-specific snippets tables assigned to a lexer name key.
+snippets _G.snippets (table)\nMap of snippet triggers with their snippet text or functions that return such text, with\nlanguage-specific snippets tables assigned to a lexer name key.
snippets textadept.snippets (module)\nSnippets for Textadept.
-space lexer.space (pattern)\nA pattern that matches any whitespace character ('\t', '\v', '\f', '\\n',\n'\r', space).
-spawn os.spawn(cmd, cwd, env, stdout_cb, stderr_cb, exit_cb)\nSpawns an interactive child process *cmd* in a separate thread, returning\na handle to that process.\nOn Windows, *cmd* is passed to `cmd.exe`: `%COMSPEC% /c [cmd]`.\nAt the moment, only the Windows terminal version spawns processes in the same\nthread.\n@param cmd A command line string that contains the program's name followed by\n arguments to pass to it. `PATH` is searched for program names.\n@param cwd Optional current working directory (cwd) for the child\n process. When omitted, the parent's cwd is used.\n@param env Optional map of environment variables for the child process.\n When omitted, Textadept's environment is used.\n@param stdout_cb Optional Lua function that accepts a string parameter for a\n block of standard output read from the child. Stdout is read asynchronously\n in 1KB or 0.5KB blocks (depending on the platform), or however much data is\n available at the time.\n At the moment, only the Win32 terminal version sends all output, whether it\n be stdout or stderr, to this callback after the process finishes.\n@param stderr_cb Optional Lua function that accepts a string parameter for a\n block of standard error read from the child. Stderr is read asynchronously\n in 1KB or 0.5kB blocks (depending on the platform), or however much data is\n available at the time.\n@param exit_cb Optional Lua function that is called when the child process\n finishes. The child's exit status is passed.\n@usage os.spawn('lua ' .. buffer.filename, print)\n@usage proc = os.spawn('lua -e "print(io.read())"', print)\n proc:write('foo\\n')\n@return proc or nil plus an error message on failure
-split view.split(view, vertical)\nSplits the view into top and bottom views (unless *vertical* is `true`),\nfocuses the new view, and returns both the old and new views.\nIf *vertical* is `false`, splits the view vertically into left and\nright views.\nEmits a `VIEW_NEW` event.\n@param view The view to split.\n@param vertical Optional flag indicating whether or not to split the view\n vertically. The default value is `false`, for horizontal.\n@return old view and new view.\n@see events.VIEW_NEW
-standard_dropdown ui.dialogs.standard_dropdown(options)\nPrompts the user with a drop-down item selection dialog defined by dialog\noptions table *options* and with localized "Ok" and "Cancel" buttons,\nreturning the selected button's index along with the selected item's index.\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the selected item's text.\nIf the dialog closed due to *options*.`exit_onchange`, returns `4` along with\neither the selected item's index or its text. If the dialog timed out,\nreturns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or\n`"delete"`.\n@param options Table of key-value option pairs for the drop-down dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string items to show in the drop-down.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `exit_onchange`: Close the dialog after selecting a new item. The default\n value is `false`.\n * `select`: The index of the initially selected list item. The default\n value is `1`.\n * `string_output`: Return the selected button's label (instead of its\n index) and the selected item's text (instead of its index). If no item\n was selected, returns the dialog's exit status (instead of its exit\n code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code, selected item
-standard_inputbox ui.dialogs.standard_inputbox(options)\nPrompts the user with an inputbox dialog defined by dialog options table\n*options* and with localized "Ok" and "Cancel" buttons, returning the\nselected button's index along with the user's input text (the latter as a\nstring or table, depending on the type of *options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label\nalong with the user's input text.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a\n table, the first table value is the main message text and any subsequent\n values are used as the labels for multiple entry boxes. Providing a\n single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the\n table values are used to populate the multiple entry boxes defined by\n `informative_text`.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code, input text
-start_styling buffer.start_styling(buffer, position, unused)\nBegins styling at position *position* with styling bit-mask *style_mask*.\n*style_mask* specifies which style bits can be set with\n`buffer.set_styling()`.\n@param buffer A buffer.\n@param position The position in *buffer* to start styling at.\n@param unused Unused number. `0` can be safely used.\n@usage buffer:start_styling(1, 0)\n@see set_styling
-starts_line lexer.starts_line(patt)\nCreates and returns a pattern that matches pattern *patt* only at the\nbeginning of a line.\n@param patt The LPeg pattern to match on the beginning of a line.\n@usage local preproc = token(lexer.PREPROCESSOR,\n lexer.starts_line(lexer.to_eol('#')))\n@return pattern
-status spawn_proc:status()\nReturns the status of process *spawn_proc*, which is either "running" or\n"terminated".\n@return "running" or "terminated"
+space lexer.space (pattern)\nA pattern that matches any whitespace character ('\t', '\v', '\f', '\\n', '\r', space).
+spawn os.spawn(cmd, cwd, env, stdout_cb, stderr_cb, exit_cb)\nSpawns an interactive child process *cmd* in a separate thread, returning a handle to that\nprocess.\nOn Windows, *cmd* is passed to `cmd.exe`: `%COMSPEC% /c [cmd]`.\nAt the moment, only the Windows terminal version spawns processes in the same thread.\n@param cmd A command line string that contains the program's name followed by arguments to\n pass to it. `PATH` is searched for program names.\n@param cwd Optional current working directory (cwd) for the child process. When omitted,\n the parent's cwd is used.\n@param env Optional map of environment variables for the child process. When omitted,\n Textadept's environment is used.\n@param stdout_cb Optional Lua function that accepts a string parameter for a block of standard\n output read from the child. Stdout is read asynchronously in 1KB or 0.5KB blocks (depending\n on the platform), or however much data is available at the time.\n At the moment, only the Win32 terminal version sends all output, whether it be stdout or\n stderr, to this callback after the process finishes.\n@param stderr_cb Optional Lua function that accepts a string parameter for a block of\n standard error read from the child. Stderr is read asynchronously in 1KB or 0.5kB blocks\n (depending on the platform), or however much data is available at the time.\n@param exit_cb Optional Lua function that is called when the child process finishes. The\n child's exit status is passed.\n@usage os.spawn('lua ' .. buffer.filename, print)\n@usage proc = os.spawn('lua -e "print(io.read())"', print)\n proc:write('foo\\n')\n@return proc or nil plus an error message on failure
+split view.split(view, vertical)\nSplits the view into top and bottom views (unless *vertical* is `true`), focuses the new view,\nand returns both the old and new views.\nIf *vertical* is `false`, splits the view vertically into left and right views.\nEmits a `VIEW_NEW` event.\n@param view The view to split.\n@param vertical Optional flag indicating whether or not to split the view vertically. The\n default value is `false`, for horizontal.\n@return old view and new view.\n@see events.VIEW_NEW
+standard_dropdown ui.dialogs.standard_dropdown(options)\nPrompts the user with a drop-down item selection dialog defined by dialog options table\n*options* and with localized "Ok" and "Cancel" buttons, returning the selected button's\nindex along with the selected item's index.\nIf *options*.`string_output` is `true`, returns the selected button's label along with the\nselected item's text. If the dialog closed due to *options*.`exit_onchange`, returns `4`\nalong with either the selected item's index or its text. If the dialog timed out, returns\n`0` or `"timeout"`. If the user canceled the dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the drop-down dialog.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `items`: The list of string items to show in the drop-down.\n * `no_cancel`: Do not display the "Cancel" button. The default value is `false`.\n * `exit_onchange`: Close the dialog after selecting a new item. The default value is `false`.\n * `select`: The index of the initially selected list item. The default value is `1`.\n * `string_output`: Return the selected button's label (instead of its index) and the selected\n item's text (instead of its index). If no item was selected, returns the dialog's exit\n status (instead of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@return selected button or exit code, selected item
+standard_inputbox ui.dialogs.standard_inputbox(options)\nPrompts the user with an inputbox dialog defined by dialog options table *options* and\nwith localized "Ok" and "Cancel" buttons, returning the selected button's index along\nwith the user's input text (the latter as a string or table, depending on the type of\n*options*.`informative_text`).\nIf *options*.`string_output` is `true`, returns the selected button's label along with the\nuser's input text. If the dialog timed out, returns `0` or `"timeout"`. If the user canceled\nthe dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the inputbox.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text. If the value is a table, the first\n table value is the main message text and any subsequent values are used as the labels\n for multiple entry boxes. Providing a single label has no effect.\n * `text`: The dialog's initial input text. If the value is a table, the table values are\n used to populate the multiple entry boxes defined by `informative_text`.\n * `no_cancel`: Do not display the "Cancel" button. The default value is `false`.\n * `string_output`: Return the selected button's label (instead of its index) or the dialog's\n exit status instead of the button's index (instead of its exit code). The default value is\n `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@return selected button or exit code, input text
+start_styling buffer.start_styling(buffer, position, unused)\nBegins styling at position *position* with styling bit-mask *style_mask*.\n*style_mask* specifies which style bits can be set with `buffer.set_styling()`.\n@param buffer A buffer.\n@param position The position in *buffer* to start styling at.\n@param unused Unused number. `0` can be safely used.\n@usage buffer:start_styling(1, 0)\n@see set_styling
+starts_line lexer.starts_line(patt)\nCreates and returns a pattern that matches pattern *patt* only at the beginning of a line.\n@param patt The LPeg pattern to match on the beginning of a line.\n@usage local preproc = token(lexer.PREPROCESSOR, lexer.starts_line(lexer.to_eol('#')))\n@return pattern
+status spawn_proc:status()\nReturns the status of process *spawn_proc*, which is either "running" or "terminated".\n@return "running" or "terminated"
statusbar_text ui.statusbar_text (string, Write-only)\nThe text displayed in the statusbar.
stop textadept.run.stop()\nStops the currently running process, if any.
string _G.string (module)\nExtends Lua's `string` library to provide character set conversions.
-strip_trailing_spaces textadept.editing.strip_trailing_spaces (bool)\nStrip trailing whitespace before saving files. (Does not apply to binary\nfiles.)\nThe default value is `false`.
-stuttered_page_down buffer.stuttered_page_down(buffer)\nMoves the caret to the bottom of the page or, if already there, down one\npage.\n@param buffer A buffer.
-stuttered_page_down_extend buffer.stuttered_page_down_extend(buffer)\nLike `buffer.stuttered_page_down()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
+strip_trailing_spaces textadept.editing.strip_trailing_spaces (bool)\nStrip trailing whitespace before saving files. (Does not apply to binary files.)\nThe default value is `false`.
+stuttered_page_down buffer.stuttered_page_down(buffer)\nMoves the caret to the bottom of the page or, if already there, down one page.\n@param buffer A buffer.
+stuttered_page_down_extend buffer.stuttered_page_down_extend(buffer)\nLike `buffer.stuttered_page_down()`, but extends the selected text to the new position.\n@param buffer A buffer.
stuttered_page_up buffer.stuttered_page_up(buffer)\nMoves the caret to the top of the page or, if already there, up one page.\n@param buffer A buffer.
-stuttered_page_up_extend buffer.stuttered_page_up_extend(buffer)\nLike `buffer.stuttered_page_up()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
+stuttered_page_up_extend buffer.stuttered_page_up_extend(buffer)\nLike `buffer.stuttered_page_up()`, but extends the selected text to the new position.\n@param buffer A buffer.
style_at buffer.style_at (table, Read-only)\nTable of style numbers per position.
style_at lexer.style_at (table, Read-only)\nTable of style names at positions in the buffer starting from 1.
-style_back view.style_back (table)\nTable of background colors, in "0xBBGGRR" format, of text for style numbers\nfrom `1` to `256`.
-style_bold view.style_bold (table)\nTable of flags that indicate whether or not text is bold for style numbers\nfrom `1` to `256`.\nThe default values are `false`.
+style_back view.style_back (table)\nTable of background colors, in "0xBBGGRR" format, of text for style numbers from `1` to `256`.
+style_bold view.style_bold (table)\nTable of flags that indicate whether or not text is bold for style numbers from `1` to `256`.\nThe default values are `false`.
style_case view.style_case (table)\nTable of letter case modes of text for style numbers from `1` to `256`.\n\n* `view.CASE_MIXED`\n Display text in normally.\n* `view.CASE_UPPER`\n Display text in upper case.\n* `view.CASE_LOWER`\n Display text in lower case.\n* `view.CASE_CAMEL`\n Display text in camel case.\n\nThe default values are `view.CASE_MIXED`.
-style_changeable view.style_changeable (table)\nTable of flags that indicate whether or not text is changeable for style\nnumbers from `1` to `256`.\nThe default values are `true`.\nRead-only styles do not allow the caret into the range of text.
+style_changeable view.style_changeable (table)\nTable of flags that indicate whether or not text is changeable for style numbers from `1`\nto `256`.\nThe default values are `true`.\nRead-only styles do not allow the caret into the range of text.
style_clear_all view.style_clear_all(view)\nReverts all styles to having the same properties as `view.STYLE_DEFAULT`.\n@param view A view.
-style_eol_filled view.style_eol_filled (table)\nTable of flags that indicate whether or not the background colors of styles\nwhose characters occur last on lines extend all the way to the view's right\nmargin for style numbers from `1` to `256`.\nThe default values are `false`.
+style_eol_filled view.style_eol_filled (table)\nTable of flags that indicate whether or not the background colors of styles whose characters\noccur last on lines extend all the way to the view's right margin for style numbers from\n`1` to `256`.\nThe default values are `false`.
style_font view.style_font (table)\nTable of string font names of text for style numbers from `1` to `256`.
-style_fore view.style_fore (table)\nTable of foreground colors, in "0xBBGGRR" format, of text for style numbers\nfrom `1` to `256`.
-style_italic view.style_italic (table)\nTable of flags that indicate whether or not text is italic for style\nnumbers from `1` to `256`.\nThe default values are `false`.
-style_of_name buffer.style_of_name(buffer, style_name, string)\nReturns the style number associated with string *style_name*, or\n`view.STYLE_DEFAULT` if *style_name* is not in use.\n@param buffer A buffer.\n@param string The style name to get the number of.\n@return style number, between `1` and `256`.\n@see name_of_style
+style_fore view.style_fore (table)\nTable of foreground colors, in "0xBBGGRR" format, of text for style numbers from `1` to `256`.
+style_italic view.style_italic (table)\nTable of flags that indicate whether or not text is italic for style numbers from `1` to\n`256`.\nThe default values are `false`.
+style_of_name buffer.style_of_name(buffer, style_name, string)\nReturns the style number associated with string *style_name*, or `view.STYLE_DEFAULT` if\n*style_name* is not in use.\n@param buffer A buffer.\n@param string The style name to get the number of.\n@return style number, between `1` and `256`.\n@see name_of_style
style_reset_default view.style_reset_default(view)\nResets `view.STYLE_DEFAULT` to its initial state.\n@param view A view.
style_size view.style_size (table)\nTable of font sizes of text for style numbers from `1` to `256`.
-style_underline view.style_underline (table)\nTable of flags that indicate whether or not text is underlined for style\nnumbers from `1` to `256`.\nThe default values are `false`.
-style_visible view.style_visible (table)\nTable of flags that indicate whether or not text is visible for style\nnumbers from `1` to `256`.\nThe default values are `true`.
-styles lexer.styles (table)\nMap of style names to style definition tables.\n\nStyle names consist of the following default names as well as the token names\ndefined by lexers.\n\n* `default`: The default style all others are based on.\n* `line_number`: The line number margin style.\n* `control_char`: The style of control character blocks.\n* `indent_guide`: The style of indentation guides.\n* `call_tip`: The style of call tip text. Only the `font`, `size`, `fore`,\n and `back` style definition fields are supported.\n* `fold_display_text`: The style of text displayed next to folded lines.\n* `class`, `comment`, `constant`, `embedded`, `error`, `function`,\n `identifier`, `keyword`, `label`, `number`, `operator`, `preprocessor`,\n `regex`, `string`, `type`, `variable`, `whitespace`: Some token names used\n by lexers. Some lexers may define more token names, so this list is not\n exhaustive.\n* *`lang`*`_whitespace`: A special style for whitespace tokens in lexer name\n *lang*. It inherits from `whitespace`, and is used in place of it for all\n lexers.\n\nStyle definition tables may contain the following fields:\n\n* `font`: String font name.\n* `size`: Integer font size.\n* `bold`: Whether or not the font face is bold. The default value is `false`.\n* `weight`: Integer weight or boldness of a font, between 1 and 999.\n* `italics`: Whether or not the font face is italic. The default value is\n `false`.\n* `underlined`: Whether or not the font face is underlined. The default value\n is `false`.\n* `fore`: Font face foreground color in `0xBBGGRR` or `"#RRGGBB"` format.\n* `back`: Font face background color in `0xBBGGRR` or `"#RRGGBB"` format.\n* `eolfilled`: Whether or not the background color extends to the end of the\n line. The default value is `false`.\n* `case`: Font case, `'u'` for upper, `'l'` for lower, and `'m'` for normal,\n mixed case. The default value is `'m'`.\n* `visible`: Whether or not the text is visible. The default value is `true`.\n* `changeable`: Whether the text is changeable instead of read-only. The\n default value is `true`.
+style_underline view.style_underline (table)\nTable of flags that indicate whether or not text is underlined for style numbers from `1`\nto `256`.\nThe default values are `false`.
+style_visible view.style_visible (table)\nTable of flags that indicate whether or not text is visible for style numbers from `1` to\n`256`.\nThe default values are `true`.
+styles lexer.styles (table)\nMap of style names to style definition tables.\n\nStyle names consist of the following default names as well as the token names defined by lexers.\n\n* `default`: The default style all others are based on.\n* `line_number`: The line number margin style.\n* `control_char`: The style of control character blocks.\n* `indent_guide`: The style of indentation guides.\n* `call_tip`: The style of call tip text. Only the `font`, `size`, `fore`, and `back` style\n definition fields are supported.\n* `fold_display_text`: The style of text displayed next to folded lines.\n* `class`, `comment`, `constant`, `embedded`, `error`, `function`, `identifier`, `keyword`,\n `label`, `number`, `operator`, `preprocessor`, `regex`, `string`, `type`, `variable`,\n `whitespace`: Some token names used by lexers. Some lexers may define more token names,\n so this list is not exhaustive.\n* *`lang`*`_whitespace`: A special style for whitespace tokens in lexer name *lang*. It\n inherits from `whitespace`, and is used in place of it for all lexers.\n\nStyle definition tables may contain the following fields:\n\n* `font`: String font name.\n* `size`: Integer font size.\n* `bold`: Whether or not the font face is bold. The default value is `false`.\n* `weight`: Integer weight or boldness of a font, between 1 and 999.\n* `italics`: Whether or not the font face is italic. The default value is `false`.\n* `underlined`: Whether or not the font face is underlined. The default value is `false`.\n* `fore`: Font face foreground color in `0xBBGGRR` or `"#RRGGBB"` format.\n* `back`: Font face background color in `0xBBGGRR` or `"#RRGGBB"` format.\n* `eolfilled`: Whether or not the background color extends to the end of the line. The\n default value is `false`.\n* `case`: Font case: `'u'` for upper, `'l'` for lower, and `'m'` for normal, mixed case. The\n default value is `'m'`.\n* `visible`: Whether or not the text is visible. The default value is `true`.\n* `changeable`: Whether the text is changeable instead of read-only. The default value is\n `true`.
swap_main_anchor_caret buffer.swap_main_anchor_caret(buffer)\nSwaps the main selection's beginning and end positions.\n@param buffer A buffer.
-switch_buffer ui.switch_buffer(zorder)\nPrompts the user to select a buffer to switch to.\nBuffers are listed in the order they were opened unless `zorder` is `true`,\nin which case buffers are listed by their z-order (most recently viewed to\nleast recently viewed).\n@param zorder Flag that indicates whether or not to list buffers by their\n z-order. The default value is `false`.
-tab buffer.tab(buffer)\nIndents the text on the selected lines or types a Tab character ("\t") at\nthe caret position.\n@param buffer A buffer.
-tab_context_menu textadept.menu.tab_context_menu (table)\nThe default tabbar context menu.\nSubmenus, and menu items can be retrieved by name in addition to table index\nnumber.
+switch_buffer ui.switch_buffer(zorder)\nPrompts the user to select a buffer to switch to.\nBuffers are listed in the order they were opened unless `zorder` is `true`, in which case\nbuffers are listed by their z-order (most recently viewed to least recently viewed).\n@param zorder Flag that indicates whether or not to list buffers by their z-order. The\n default value is `false`.
+tab buffer.tab(buffer)\nIndents the text on the selected lines or types a Tab character ("\t") at the caret position.\n@param buffer A buffer.
+tab_context_menu textadept.menu.tab_context_menu (table)\nThe default tabbar context menu.\nSubmenus, and menu items can be retrieved by name in addition to table index number.
tab_context_menu ui.tab_context_menu (userdata)\nThe context menu for the buffer's tab, a `ui.menu()`.\nThis is a low-level field. You probably want to use the higher-level\n`textadept.menu.tab_context_menu`.
tab_draw_mode view.tab_draw_mode (number)\nThe draw mode of visible tabs.\n\n* `view.TD_LONGARROW`\n An arrow that stretches until the tabstop.\n* `view.TD_STRIKEOUT`\n A horizontal line that stretches until the tabstop.\n\nThe default value is `view.TD_LONGARROW`.
tab_indents buffer.tab_indents (bool)\nIndent text when tabbing within indentation.\nThe default value is `false`.
tab_label buffer.tab_label (string)\nThe buffer's tab label in the tab bar.
tab_width buffer.tab_width (number)\nThe number of space characters represented by a tab character.\nThe default value is `8`.
-tabs ui.tabs (bool)\nWhether or not to display the tab bar when multiple buffers are open.\nThe default value is `true`.\nA third option, `ui.SHOW_ALL_TABS` may be used to always show the tab bar,\neven if only one buffer is open.
+tabs ui.tabs (bool)\nWhether or not to display the tab bar when multiple buffers are open.\nThe default value is `true`.\nA third option, `ui.SHOW_ALL_TABS` may be used to always show the tab bar, even if only\none buffer is open.
tag buffer.tag (table, Read-only)\nList of capture text for capture numbers from a regular expression search.
-tags _M.ansi_c.tags (table)\nList of ctags files to use for autocompletion in addition to the current\nproject's top-level *tags* file or the current directory's *tags* file.
-tags _M.lua.tags (table)\nList of "fake" ctags files (or functions that return such files) to use for\nautocompletion.\nThe kind 'm' is recognized as a module, 'f' as a function, 't' as a table and\n'F' as a module or table field.\nThe *modules/lua/tadoc.lua* script can generate *tags* and\n*api* files for Lua modules via LuaDoc.
+tags _M.ansi_c.tags (table)\nList of ctags files to use for autocompletion in addition to the current project's top-level\n*tags* file or the current directory's *tags* file.
+tags _M.lua.tags (table)\nList of "fake" ctags files (or functions that return such files) to use for autocompletion.\nThe kind 'm' is recognized as a module, 'f' as a function, 't' as a table and 'F' as a module\nor table field.\nThe *modules/lua/tadoc.lua* script can generate *tags* and *api*\nfiles for Lua modules via LuaDoc.
target_end buffer.target_end (number)\nThe position of the end of the target range.\nThis is also set by a successful `buffer.search_in_target()`.
-target_end_virtual_space buffer.target_end_virtual_space (number)\nThe position of the end of virtual space in the target range.\nThis is set to `1` when `buffer.target_start` or\n`buffer.target_end` is set, or when `buffer.set_target_range()` is\ncalled.
-target_from_selection buffer.target_from_selection(buffer)\nDefines the target range's beginning and end positions as the beginning and\nend positions of the main selection, respectively.\n@param buffer A buffer.
+target_end_virtual_space buffer.target_end_virtual_space (number)\nThe position of the end of virtual space in the target range.\nThis is set to `1` when `buffer.target_start` or `buffer.target_end` is set,\nor when `buffer.set_target_range()` is called.
+target_from_selection buffer.target_from_selection(buffer)\nDefines the target range's beginning and end positions as the beginning and end positions\nof the main selection, respectively.\n@param buffer A buffer.
target_start buffer.target_start (number)\nThe position of the beginning of the target range.\nThis is also set by a successful `buffer.search_in_target()`.
-target_start_virtual_space buffer.target_start_virtual_space (number)\nThe position of the beginning of virtual space in the target range.\nThis is set to `1` when `buffer.target_start` or\n`buffer.target_end` is set, or when `buffer.set_target_range()` is\ncalled.
+target_start_virtual_space buffer.target_start_virtual_space (number)\nThe position of the beginning of virtual space in the target range.\nThis is set to `1` when `buffer.target_start` or `buffer.target_end` is set,\nor when `buffer.set_target_range()` is called.
target_text buffer.target_text (string, Read-only)\nThe text in the target range.
-target_whole_document buffer.target_whole_document(buffer)\nDefines the target range's beginning and end positions as the beginning and\nend positions of the document, respectively.\n@param buffer A buffer.
-test textadept.run.test(root_directory)\nRuns tests for the project whose root path is *root_directory* or the current\nproject using the shell command from the `test_commands` table.\nThe current project is determined by either the buffer's filename or the\ncurrent working directory.\nEmits `TEST_OUTPUT` events.\n@param root_directory The path to the project to run tests for. The default\n value is the current project.\n@see test_commands\n@see _G.events
-test_commands textadept.run.test_commands (table)\nMap of project root paths to their associated "test" shell command line\nstrings or functions that return such strings.\nFunctions may also return a working directory and process environment table\nto operate in. By default, the working directory is the project's root\ndirectory and the environment is Textadept's environment.
+target_whole_document buffer.target_whole_document(buffer)\nDefines the target range's beginning and end positions as the beginning and end positions\nof the document, respectively.\n@param buffer A buffer.
+test textadept.run.test(root_directory)\nRuns tests for the project whose root path is *root_directory* or the current project using\nthe shell command from the `test_commands` table.\nThe current project is determined by either the buffer's filename or the current working\ndirectory.\nEmits `TEST_OUTPUT` events.\n@param root_directory The path to the project to run tests for. The default value is the\n current project.\n@see test_commands\n@see _G.events
+test_commands textadept.run.test_commands (table)\nMap of project root paths to their associated "test" shell command line strings or functions\nthat return such strings.\nFunctions may also return a working directory and process environment table to operate\nin. By default, the working directory is the project's root directory and the environment\nis Textadept's environment.
text_height view.text_height(view, line)\nReturns the pixel height of line number *line*.\n@param view A view.\n@param line The line number in *view* to get the pixel height of.\n@return number
text_length buffer.text_length (number, Read-only)\nThe number of bytes in the buffer.
text_range buffer.text_range(buffer, start_pos, end_pos)\nReturns the range of text between positions *start_pos* and *end_pos*.\n@param buffer A buffer.\n@param start_pos The start position of the range of text to get in *buffer*.\n@param end_pos The end position of the range of text to get in *buffer*.
-text_width view.text_width(view, style_num, text)\nReturns the pixel width string *text* would have when styled with style\nnumber *style_num*, in the range of `1` to `256`.\n@param view A view.\n@param style_num The style number between `1` and `256` to use.\n@param text The text to measure the width of.\n@return number
+text_width view.text_width(view, style_num, text)\nReturns the pixel width string *text* would have when styled with style number *style_num*,\nin the range of `1` to `256`.\n@param view A view.\n@param style_num The style number between `1` and `256` to use.\n@param text The text to measure the width of.\n@return number
textadept _G.textadept (module)\nThe textadept module.\nIt provides utilities for editing text in Textadept.
-textbox ui.dialogs.textbox(options)\nPrompts the user with a multiple-line textbox dialog defined by dialog\noptions table *options*, returning the selected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label.\nIf *options*.`editable` is `true`, also returns the textbox's text. If the\ndialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the dialog.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text.\n * `text`: The dialog's initial textbox text.\n * `text_from_file`: The filename whose contents are loaded into the\n textbox. This option has no effect when `text` is given.\n * `button1`: The right-most button's label. The default value is\n `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2`\n to be set.\n * `editable`: Allows the user to edit the textbox's text. The default value\n is `false`.\n * `focus_textbox`: Focus the textbox instead of the buttons. The default\n value is `false`.\n * `scroll_to`: Where to scroll the textbox's text.\n The available values are `"top"` and `"bottom"`. The default value is\n `"top"`.\n * `selected`: Select all of the textbox's text. The default value is\n `false`.\n * `monospaced_font`: Use a monospaced font in the textbox instead of a\n proportional one. The default value is `false`.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.textbox{title = 'License Agreement',\n informative_text = 'You agree to:', text_from_file = _HOME..'/LICENSE'}\n@return selected button or exit code, textbox text
-timeout _G.timeout(interval, f, ...)\nCalls function *f* with the given arguments after *interval* seconds.\nIf *f* returns `true`, calls *f* repeatedly every *interval* seconds as long\nas *f* returns `true`. A `nil` or `false` return value stops repetition.\n@param interval The interval in seconds to call *f* after.\n@param f The function to call.\n@param ... Additional arguments to pass to *f*.
+textbox ui.dialogs.textbox(options)\nPrompts the user with a multiple-line textbox dialog defined by dialog options table *options*,\nreturning the selected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label. If\n*options*.`editable` is `true`, also returns the textbox's text. If the dialog timed out,\nreturns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the dialog.\n\n * `title`: The dialog's title text.\n * `informative_text`: The dialog's main message text.\n * `text`: The dialog's initial textbox text.\n * `text_from_file`: The filename whose contents are loaded into the textbox. This option\n has no effect when `text` is given.\n * `button1`: The right-most button's label. The default value is `_L['OK']`.\n * `button2`: The middle button's label.\n * `button3`: The left-most button's label. This option requires `button2` to be set.\n * `editable`: Allows the user to edit the textbox's text. The default value is `false`.\n * `focus_textbox`: Focus the textbox instead of the buttons. The default value is `false`.\n * `scroll_to`: Where to scroll the textbox's text. The available values are `"top"` and\n `"bottom"`. The default value is `"top"`.\n * `selected`: Select all of the textbox's text. The default value is `false`.\n * `monospaced_font`: Use a monospaced font in the textbox instead of a proportional one. The\n default value is `false`.\n * `string_output`: Return the selected button's label (instead of its index) or the dialog's\n exit status instead of the button's index (instead of its exit code). The default value is\n `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@usage ui.dialogs.textbox{title = 'License Agreement', informative_text = 'You agree to:',\n text_from_file = _HOME..'/LICENSE'}\n@return selected button or exit code, textbox text
+timeout _G.timeout(interval, f, ...)\nCalls function *f* with the given arguments after *interval* seconds.\nIf *f* returns `true`, calls *f* repeatedly every *interval* seconds as long as *f* returns\n`true`. A `nil` or `false` return value stops repetition.\n@param interval The interval in seconds to call *f* after.\n@param f The function to call.\n@param ... Additional arguments to pass to *f*.
title ui.title (string, Write-only)\nThe title text of Textadept's window.
-to_eol lexer.to_eol(prefix, escape)\nCreates and returns a pattern that matches from string or pattern *prefix*\nuntil the end of the line.\n*escape* indicates whether the end of the line can be escaped with a '\'\ncharacter.\n@param prefix String or pattern prefix to start matching at.\n@param escape Optional flag indicating whether or not newlines can be escaped\n by a '\' character. The default value is `false`.\n@usage local line_comment = lexer.to_eol('//')\n@usage local line_comment = lexer.to_eol(S('#;'))\n@return pattern
+to_eol lexer.to_eol(prefix, escape)\nCreates and returns a pattern that matches from string or pattern *prefix* until the end of\nthe line.\n*escape* indicates whether the end of the line can be escaped with a '\' character.\n@param prefix String or pattern prefix to start matching at.\n@param escape Optional flag indicating whether or not newlines can be escaped by a '\'\n character. The default value is `false`.\n@usage local line_comment = lexer.to_eol('//')\n@usage local line_comment = lexer.to_eol(S('#;'))\n@return pattern
toggle textadept.bookmarks.toggle()\nToggles a bookmark on the current line.
-toggle_caret_sticky buffer.toggle_caret_sticky(buffer)\nCycles between `buffer.caret_sticky` option settings `buffer.CARETSTICKY_ON`\nand `buffer.CARETSTICKY_OFF`.\n@param buffer A buffer.\n@see caret_sticky
+toggle_caret_sticky buffer.toggle_caret_sticky(buffer)\nCycles between `buffer.caret_sticky` option settings `buffer.CARETSTICKY_ON` and\n`buffer.CARETSTICKY_OFF`.\n@param buffer A buffer.\n@see caret_sticky
toggle_comment textadept.editing.toggle_comment()\nComments or uncomments the selected lines based on the current language.\nAs long as any part of a line is selected, the entire line is eligible for\ncommenting/uncommenting.\n@see comment_string
-toggle_fold view.toggle_fold(view, line)\nToggles the fold point on line number *line* between expanded (where all of\nits child lines are displayed) and contracted (where all of its child lines\nare hidden).\n@param view A view.\n@param line The line number in *view* to toggle the fold on.\n@see set_default_fold_display_text
-toggle_fold_show_text view.toggle_fold_show_text(view, line, text)\nToggles a fold point on line number *line* between expanded (where all of\nits child lines are displayed) and contracted (where all of its child lines\nare hidden), and shows string *text* next to that line.\n*text* is drawn with style number `view.STYLE_FOLDDISPLAYTEXT`.\n@param view A view.\n@param line The line number in *view* to toggle the fold on and display\n *text* after.\n@param text The text to display after the line.
-token lexer.token(name, patt)\nCreates and returns a token pattern with token name *name* and pattern\n*patt*.\nIf *name* is not a predefined token name, its style must be defined via\n`lexer.add_style()`.\n@param name The name of token. If this name is not a predefined token name,\n then a style needs to be assiciated with it via `lexer.add_style()`.\n@param patt The LPeg pattern associated with the token.\n@usage local ws = token(lexer.WHITESPACE, lexer.space^1)\n@usage local annotation = token('annotation', '@' * lexer.word)\n@return pattern
-transpose_chars textadept.editing.transpose_chars()\nTransposes characters intelligently.\nIf the caret is at the end of a line, transposes the two characters before\nthe caret. Otherwise, the characters to the left and right are.
-typeover_chars textadept.editing.typeover_chars (table)\nTable of characters to move over when typed.\nThe ASCII values of characters are keys and are assigned non-`nil` values.\nThe default characters are ')', ']', '}', ''', and '"'.
+toggle_fold view.toggle_fold(view, line)\nToggles the fold point on line number *line* between expanded (where all of its child lines\nare displayed) and contracted (where all of its child lines are hidden).\n@param view A view.\n@param line The line number in *view* to toggle the fold on.\n@see set_default_fold_display_text
+toggle_fold_show_text view.toggle_fold_show_text(view, line, text)\nToggles a fold point on line number *line* between expanded (where all of its child lines are\ndisplayed) and contracted (where all of its child lines are hidden), and shows string *text*\nnext to that line.\n*text* is drawn with style number `view.STYLE_FOLDDISPLAYTEXT`.\n@param view A view.\n@param line The line number in *view* to toggle the fold on and display *text* after.\n@param text The text to display after the line.
+token lexer.token(name, patt)\nCreates and returns a token pattern with token name *name* and pattern *patt*.\nIf *name* is not a predefined token name, its style must be defined via `lexer.add_style()`.\n@param name The name of token. If this name is not a predefined token name, then a style\n needs to be assiciated with it via `lexer.add_style()`.\n@param patt The LPeg pattern associated with the token.\n@usage local ws = token(lexer.WHITESPACE, lexer.space^1)\n@usage local annotation = token('annotation', '@' * lexer.word)\n@return pattern
+transpose_chars textadept.editing.transpose_chars()\nTransposes characters intelligently.\nIf the caret is at the end of a line, transposes the two characters before the caret. Otherwise,\nthe characters to the left and right are.
+typeover_chars textadept.editing.typeover_chars (table)\nTable of characters to move over when typed.\nThe ASCII values of characters are keys and are assigned non-`nil` values. The default\ncharacters are ')', ']', '}', ''', and '"'.
ui _G.ui (module)\nUtilities for interacting with Textadept's user interface.
undo buffer.undo(buffer)\nUndoes the most recent action.\n@param buffer A buffer.
unsplit view.unsplit(view)\nUnsplits the view if possible, returning `true` on success.\n@param view The view to unsplit.\n@return boolean if the view was unsplit or not.
update ui.update()\nProcesses pending GTK events, including reading from spawned processes.\nThis function is primarily used in unit tests.
upper lexer.upper (pattern)\nA pattern that matches any upper case character ('A'-'Z').
upper_case buffer.upper_case(buffer)\nConverts the selected text to upper case letters.\n@param buffer A buffer.
-use_tabs buffer.use_tabs (bool)\nUse tabs instead of spaces in indentation. Changing the current setting\ndoes not convert any of the buffer's existing indentation. Use\n`textadept.editing.convert_indentation()` to do so.\nThe default value is `true`.
-user_list_show buffer.user_list_show(buffer, id, items)\nDisplays a user list identified by list identifier number *id* and\nconstructed from string *items* (whose items are delimited by\n`buffer.auto_c_separator` characters).\nThe sorted order of *items* (`buffer.auto_c_order`) must have already been\ndefined. When the user selects an item, *id* is sent in a\n`USER_LIST_SELECTION` event along with the selection.\n@param buffer A buffer.\n@param id The list identifier number greater than zero to use.\n@param items The sorted string of words to show, separated by\n `buffer.auto_c_separator` characters (initially spaces).\n@see _SCINTILLA.next_user_list_type\n@see events.USER_LIST_SELECTION
+use_tabs buffer.use_tabs (bool)\nUse tabs instead of spaces in indentation.\nChanging the current setting does not convert any of the buffer's existing indentation. Use\n`textadept.editing.convert_indentation()` to do so.\nThe default value is `true`.
+user_list_show buffer.user_list_show(buffer, id, items)\nDisplays a user list identified by list identifier number *id* and constructed from string\n*items* (whose items are delimited by `buffer.auto_c_separator` characters).\nThe sorted order of *items* (`buffer.auto_c_order`) must have already been defined. When the\nuser selects an item, *id* is sent in a `USER_LIST_SELECTION` event along with the selection.\n@param buffer A buffer.\n@param id The list identifier number greater than zero to use.\n@param items The sorted string of words to show, separated by `buffer.auto_c_separator`\n characters (initially spaces).\n@see _SCINTILLA.next_user_list_type\n@see events.USER_LIST_SELECTION
v_scroll_bar view.v_scroll_bar (bool)\nDisplay the vertical scroll bar.\nThe default value is `true`.
-vc_home buffer.vc_home(buffer)\nMoves the caret to the first visible character on the current line or, if\nalready there, to the beginning of the current line.\n@param buffer A buffer.
-vc_home_display buffer.vc_home_display(buffer)\nMoves the caret to the first visible character on the current wrapped line\nor, if already there, to the beginning of the current wrapped line.\n@param buffer A buffer.
-vc_home_display_extend buffer.vc_home_display_extend(buffer)\nLike `buffer.vc_home_display()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
+vc_home buffer.vc_home(buffer)\nMoves the caret to the first visible character on the current line or, if already there,\nto the beginning of the current line.\n@param buffer A buffer.
+vc_home_display buffer.vc_home_display(buffer)\nMoves the caret to the first visible character on the current wrapped line or, if already\nthere, to the beginning of the current wrapped line.\n@param buffer A buffer.
+vc_home_display_extend buffer.vc_home_display_extend(buffer)\nLike `buffer.vc_home_display()`, but extends the selected text to the new position.\n@param buffer A buffer.
vc_home_extend buffer.vc_home_extend(buffer)\nLike `buffer.vc_home()`, but extends the selected text to the new position.\n@param buffer A buffer.
-vc_home_rect_extend buffer.vc_home_rect_extend(buffer)\nLike `buffer.vc_home()`, but extends the rectangular selection to the new\nposition.\n@param buffer A buffer.
-vc_home_wrap buffer.vc_home_wrap(buffer)\nMoves the caret to the first visible character on the current wrapped line\nor, if already there, to the beginning of the actual line.\n@param buffer A buffer.
-vc_home_wrap_extend buffer.vc_home_wrap_extend(buffer)\nLike `buffer.vc_home_wrap()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
+vc_home_rect_extend buffer.vc_home_rect_extend(buffer)\nLike `buffer.vc_home()`, but extends the rectangular selection to the new position.\n@param buffer A buffer.
+vc_home_wrap buffer.vc_home_wrap(buffer)\nMoves the caret to the first visible character on the current wrapped line or, if already\nthere, to the beginning of the actual line.\n@param buffer A buffer.
+vc_home_wrap_extend buffer.vc_home_wrap_extend(buffer)\nLike `buffer.vc_home_wrap()`, but extends the selected text to the new position.\n@param buffer A buffer.
vertical_center_caret view.vertical_center_caret(view)\nCenters current line in the view.\n@param view A view.
-view _G.view (module)\nA Textadept view object.\nConstants are documented in the fields they apply to.\nWhile you can work with individual view instances, it is often useful to work\nwith just the global one.\nMany of these functions and fields are derived from view-specific\nfunctionality of the Scintilla editing component, and additional information\ncan be found on the\nScintilla website.\nNote that with regard to Scintilla-specific functionality, this API is a\n_suggestion_, not a hard requirement. All of that functionality also exists\nin `buffer`, even if undocumented.\nAny view fields set on startup (e.g. in *~/.textadept/init.lua*) will be the\ndefault, initial values for all views.
+view _G.view (module)\nA Textadept view object.\nConstants are documented in the fields they apply to.\nWhile you can work with individual view instances, it is often useful to work with just the\nglobal one.\nMany of these functions and fields are derived from view-specific functionality of the\nScintilla editing component, and additional information can be found on the [Scintilla\nwebsite](https://scintilla.org/ScintillaDoc.html). Note that with regard to Scintilla-specific\nfunctionality, this API is a _suggestion_, not a hard requirement. All of that functionality\nalso exists in `buffer`, even if undocumented.\nAny view fields set on startup (e.g. in *~/.textadept/init.lua*) will be the default,\ninitial values for all views.
view _G.view (table)\nThe current view.
view_eol view.view_eol (bool)\nDisplay end of line characters.\nThe default value is `false`.
view_ws view.view_ws (number)\nThe whitespace visibility mode.\n\n* `view.WS_INVISIBLE`\n Whitespace is invisible.\n* `view.WS_VISIBLEALWAYS`\n Display all space characters as dots and tab characters as arrows.\n* `view.WS_VISIBLEAFTERINDENT`\n Display only non-indentation spaces and tabs as dots and arrows.\n* `view.WS_VISIBLEONLYININDENT`\n Display only indentation spaces and tabs as dots and arrows.\n\nThe default value is `view.WS_INVISIBLE`.
-virtual_space_options buffer.virtual_space_options (number)\nThe virtual space mode.\n\n* `buffer.VS_NONE`\n Disable virtual space.\n* `buffer.VS_RECTANGULARSELECTION`\n Enable virtual space only for rectangular selections.\n* `buffer.VS_USERACCESSIBLE`\n Enable virtual space.\n* `buffer.VS_NOWRAPLINESTART`\n Prevent the caret from wrapping to the previous line via\n `buffer:char_left()` and `buffer:char_left_extend()`. This option is not\n restricted to virtual space and should be added to any of the above\n options.\n\nWhen virtual space is enabled, the caret may move into the space past end\nof line characters.\nThe default value is `buffer.VS_NONE`.
-visible_from_doc_line view.visible_from_doc_line(view, line)\nReturns the displayed line number of actual line number *line*, taking\nwrapped, annotated, and hidden lines into account, or `-1` if *line* is\noutside the range of lines in the buffer.\nLines can occupy more than one display line if they wrap.\n@param view A view.\n@param line The line number in *view* to use.\n@return number
-wait spawn_proc:wait()\nBlocks until process *spawn_proc* finishes (if it has not already done so)\nand returns its status code.\n@return integer status code
-walk lfs.walk(dir, filter, n, include_dirs)\nReturns an iterator that iterates over all files and sub-directories (up to\n*n* levels deep) in directory *dir* and yields each file found.\nString or list *filter* determines which files to yield, with the default\nfilter being `lfs.default_filter`. A filter consists of Lua patterns that\nmatch file and directory paths to include or exclude. Exclusive patterns\nbegin with a '!'. If no inclusive patterns are given, any path is initially\nconsidered. As a convenience, file extensions can be specified literally\ninstead of as a Lua pattern (e.g. '.lua' vs. '%.lua$'), and '/' also matches\nthe Windows directory separator ('[/\\]' is not needed).\n@param dir The directory path to iterate over.\n@param filter Optional filter for files and directories to include and\n exclude. The default value is `lfs.default_filter`.\n@param n Optional maximum number of directory levels to descend into.\n The default value is `nil`, which indicates no limit.\n@param include_dirs Optional flag indicating whether or not to yield\n directory names too. Directory names are passed with a trailing '/' or '\',\n depending on the current platform.\n The default value is `false`.\n@see filter
-whitespace_chars buffer.whitespace_chars (string)\nThe string set of characters recognized as whitespace characters.\nSet this only after setting `buffer.word_chars`.\nThe default value is a string that contains all non-newline characters less\nthan ASCII value 33.
-whitespace_size view.whitespace_size (number)\nThe pixel size of the dots that represent space characters when whitespace\nis visible.\nThe default value is `1`.
-whole_word ui.find.whole_word (bool)\nMatch search text only when it is surrounded by non-word characters in\nsearches.\nThe default value is `false`.
+virtual_space_options buffer.virtual_space_options (number)\nThe virtual space mode.\n\n* `buffer.VS_NONE`\n Disable virtual space.\n* `buffer.VS_RECTANGULARSELECTION`\n Enable virtual space only for rectangular selections.\n* `buffer.VS_USERACCESSIBLE`\n Enable virtual space.\n* `buffer.VS_NOWRAPLINESTART`\n Prevent the caret from wrapping to the previous line via `buffer:char_left()` and\n `buffer:char_left_extend()`. This option is not restricted to virtual space and should\n be added to any of the above options.\n\nWhen virtual space is enabled, the caret may move into the space past end of line characters.\nThe default value is `buffer.VS_NONE`.
+visible_from_doc_line view.visible_from_doc_line(view, line)\nReturns the displayed line number of actual line number *line*, taking wrapped, annotated,\nand hidden lines into account, or `-1` if *line* is outside the range of lines in the buffer.\nLines can occupy more than one display line if they wrap.\n@param view A view.\n@param line The line number in *view* to use.\n@return number
+wait spawn_proc:wait()\nBlocks until process *spawn_proc* finishes (if it has not already done so) and returns its\nstatus code.\n@return integer status code
+walk lfs.walk(dir, filter, n, include_dirs)\nReturns an iterator that iterates over all files and sub-directories (up to *n* levels deep)\nin directory *dir* and yields each file found.\nString or list *filter* determines which files to yield, with the default filter being\n`lfs.default_filter`. A filter consists of Lua patterns that match file and directory paths\nto include or exclude. Exclusive patterns begin with a '!'. If no inclusive patterns are\ngiven, any path is initially considered. As a convenience, file extensions can be specified\nliterally instead of as a Lua pattern (e.g. '.lua' vs. '%.lua$'), and '/' also matches the\nWindows directory separator ('[/\\]' is not needed).\n@param dir The directory path to iterate over.\n@param filter Optional filter for files and directories to include and exclude. The default\n value is `lfs.default_filter`.\n@param n Optional maximum number of directory levels to descend into. The default value is\n `nil`, which indicates no limit.\n@param include_dirs Optional flag indicating whether or not to yield directory names too.\n Directory names are passed with a trailing '/' or '\', depending on the current platform.\n The default value is `false`.\n@see filter
+whitespace_chars buffer.whitespace_chars (string)\nThe string set of characters recognized as whitespace characters.\nSet this only after setting `buffer.word_chars`.\nThe default value is a string that contains all non-newline characters less than ASCII\nvalue 33.
+whitespace_size view.whitespace_size (number)\nThe pixel size of the dots that represent space characters when whitespace is visible.\nThe default value is `1`.
+whole_word ui.find.whole_word (bool)\nMatch search text only when it is surrounded by non-word characters in searches.\nThe default value is `false`.
whole_word_label_text ui.find.whole_word_label_text (string, Write-only)\nThe text of the "Whole word" label.\nThis is primarily used for localization.
-word lexer.word (pattern)\nA pattern that matches a typical word. Words begin with a letter or\nunderscore and consist of alphanumeric and underscore characters.
-word_chars buffer.word_chars (string)\nThe string set of characters recognized as word characters.\nThe default value is a string that contains alphanumeric characters, an\nunderscore, and all characters greater than ASCII value 127.
-word_end_position buffer.word_end_position(buffer, pos, only_word_chars)\nReturns the position of the end of the word at position *pos*.\n`buffer.word_chars` contains the set of characters that constitute words. If\n*pos* has a non-word character to its right and *only_word_chars* is `false`,\nreturns the first word character's position.\n@param buffer A buffer.\n@param pos The position in *buffer* of the word.\n@param only_word_chars If `true`, stops searching at the first non-word\n character in the search direction. Otherwise, the first character in the\n search direction sets the type of the search as word or non-word and the\n search stops at the first non-matching character. Searches are also\n terminated by the start or end of the buffer.
+word lexer.word (pattern)\nA pattern that matches a typical word. Words begin with a letter or underscore and consist\nof alphanumeric and underscore characters.
+word_chars buffer.word_chars (string)\nThe string set of characters recognized as word characters.\nThe default value is a string that contains alphanumeric characters, an underscore, and\nall characters greater than ASCII value 127.
+word_end_position buffer.word_end_position(buffer, pos, only_word_chars)\nReturns the position of the end of the word at position *pos*.\n`buffer.word_chars` contains the set of characters that constitute words. If *pos* has a\nnon-word character to its right and *only_word_chars* is `false`, returns the first word\ncharacter's position.\n@param buffer A buffer.\n@param pos The position in *buffer* of the word.\n@param only_word_chars If `true`, stops searching at the first non-word character in\n the search direction. Otherwise, the first character in the search direction sets the\n type of the search as word or non-word and the search stops at the first non-matching\n character. Searches are also terminated by the start or end of the buffer.
word_left buffer.word_left(buffer)\nMoves the caret left one word.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_left_end buffer.word_left_end(buffer)\nMoves the caret left one word, positioning it at the end of the previous\nword.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_left_end_extend buffer.word_left_end_extend(buffer)\nLike `buffer.word_left_end()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
-word_left_extend buffer.word_left_extend(buffer)\nMoves the caret left one word, extending the selected text to the new\nposition.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_match lexer.word_match(words, case_insensitive, word_chars)\nCreates and returns a pattern that matches any single word in string *words*.\n*case_insensitive* indicates whether or not to ignore case when matching\nwords.\nThis is a convenience function for simplifying a set of ordered choice word\npatterns.\nIf *words* is a multi-line string, it may contain Lua line comments (`--`)\nthat will ultimately be ignored.\n@param words A string list of words separated by spaces.\n@param case_insensitive Optional boolean flag indicating whether or not the\n word match is case-insensitive. The default value is `false`.\n@param word_chars Unused legacy parameter.\n@usage local keyword = token(lexer.KEYWORD, word_match[[foo bar baz]])\n@usage local keyword = token(lexer.KEYWORD, word_match([[foo-bar foo-baz\n bar-foo bar-baz baz-foo baz-bar]], true))\n@return pattern
-word_part_left buffer.word_part_left(buffer)\nMoves the caret to the previous part of the current word.\nWord parts are delimited by underscore characters or changes in\ncapitalization.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_part_left_extend buffer.word_part_left_extend(buffer)\nMoves the caret to the previous part of the current word, extending the\nselected text to the new position.\nWord parts are delimited by underscore characters or changes in\ncapitalization.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_part_right buffer.word_part_right(buffer)\nMoves the caret to the next part of the current word.\nWord parts are delimited by underscore characters or changes in\ncapitalization.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_part_right_extend buffer.word_part_right_extend(buffer)\nMoves the caret to the next part of the current word, extending the selected\ntext to the new position.\nWord parts are delimited by underscore characters or changes in\ncapitalization.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+word_left_end buffer.word_left_end(buffer)\nMoves the caret left one word, positioning it at the end of the previous word.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+word_left_end_extend buffer.word_left_end_extend(buffer)\nLike `buffer.word_left_end()`, but extends the selected text to the new position.\n@param buffer A buffer.
+word_left_extend buffer.word_left_extend(buffer)\nMoves the caret left one word, extending the selected text to the new position.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+word_match lexer.word_match(word_list, case_insensitive, word_chars)\nCreates and returns a pattern that matches any single word in list or string *words*.\n*case_insensitive* indicates whether or not to ignore case when matching words.\nThis is a convenience function for simplifying a set of ordered choice word patterns.\n@param word_list A list of words or a string list of words separated by spaces.\n@param case_insensitive Optional boolean flag indicating whether or not the word match is\n case-insensitive. The default value is `false`.\n@param word_chars Unused legacy parameter.\n@usage local keyword = token(lexer.KEYWORD, word_match{'foo', 'bar', 'baz'})\n@usage local keyword = token(lexer.KEYWORD, word_match({'foo-bar', 'foo-baz', 'bar-foo',\n 'bar-baz', 'baz-foo', 'baz-bar'}, true))\n@usage local keyword = token(lexer.KEYWORD, word_match('foo bar baz'))\n@return pattern
+word_part_left buffer.word_part_left(buffer)\nMoves the caret to the previous part of the current word.\nWord parts are delimited by underscore characters or changes in capitalization.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+word_part_left_extend buffer.word_part_left_extend(buffer)\nMoves the caret to the previous part of the current word, extending the selected text to\nthe new position.\nWord parts are delimited by underscore characters or changes in capitalization.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+word_part_right buffer.word_part_right(buffer)\nMoves the caret to the next part of the current word.\nWord parts are delimited by underscore characters or changes in capitalization.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+word_part_right_extend buffer.word_part_right_extend(buffer)\nMoves the caret to the next part of the current word, extending the selected text to the\nnew position.\nWord parts are delimited by underscore characters or changes in capitalization.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
word_right buffer.word_right(buffer)\nMoves the caret right one word.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_right_end buffer.word_right_end(buffer)\nMoves the caret right one word, positioning it at the end of the current\nword.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_right_end_extend buffer.word_right_end_extend(buffer)\nLike `buffer.word_right_end()`, but extends the selected text to the new\nposition.\n@param buffer A buffer.
-word_right_extend buffer.word_right_extend(buffer)\nMoves the caret right one word, extending the selected text to the new\nposition.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
-word_start_position buffer.word_start_position(buffer, pos, only_word_chars)\nReturns the position of the beginning of the word at position *pos*.\n`buffer.word_chars` contains the set of characters that constitute words. If\n*pos* has a non-word character to its left and *only_word_chars* is `false`,\nreturns the last word character's position.\n@param buffer A buffer.\n@param pos The position in *buffer* of the word.\n@param only_word_chars If `true`, stops searching at the first non-word\n character in the search direction. Otherwise, the first character in the\n search direction sets the type of the search as word or non-word and the\n search stops at the first non-matching character. Searches are also\n terminated by the start or end of the buffer.
-wrap_count view.wrap_count(view, line)\nReturns the number of wrapped lines needed to fully display line number\n*line*.\n@param view A view.\n@param line The line number in *view* to use.\n@return number
+word_right_end buffer.word_right_end(buffer)\nMoves the caret right one word, positioning it at the end of the current word.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+word_right_end_extend buffer.word_right_end_extend(buffer)\nLike `buffer.word_right_end()`, but extends the selected text to the new position.\n@param buffer A buffer.
+word_right_extend buffer.word_right_extend(buffer)\nMoves the caret right one word, extending the selected text to the new position.\n`buffer.word_chars` contains the set of characters that constitute words.\n@param buffer A buffer.
+word_start_position buffer.word_start_position(buffer, pos, only_word_chars)\nReturns the position of the beginning of the word at position *pos*.\n`buffer.word_chars` contains the set of characters that constitute words. If *pos* has\na non-word character to its left and *only_word_chars* is `false`, returns the last word\ncharacter's position.\n@param buffer A buffer.\n@param pos The position in *buffer* of the word.\n@param only_word_chars If `true`, stops searching at the first non-word character in\n the search direction. Otherwise, the first character in the search direction sets the\n type of the search as word or non-word and the search stops at the first non-matching\n character. Searches are also terminated by the start or end of the buffer.
+wrap_count view.wrap_count(view, line)\nReturns the number of wrapped lines needed to fully display line number *line*.\n@param view A view.\n@param line The line number in *view* to use.\n@return number
wrap_indent_mode view.wrap_indent_mode (number)\nThe wrapped line indent mode.\n\n* `view.WRAPINDENT_FIXED`\n Indent wrapped lines by `view.wrap_start_indent`.\n* `view.WRAPINDENT_SAME`\n Indent wrapped lines the same amount as the first line.\n* `view.WRAPINDENT_INDENT`\n Indent wrapped lines one more level than the level of the first line.\n* `view.WRAPINDENT_DEEPINDENT`\n Indent wrapped lines two more levels than the level of the first line.\n\nThe default value is `view.WRAPINDENT_FIXED`.
wrap_mode view.wrap_mode (number)\nLong line wrap mode.\n\n* `view.WRAP_NONE`\n Long lines are not wrapped.\n* `view.WRAP_WORD`\n Wrap long lines at word (and style) boundaries.\n* `view.WRAP_CHAR`\n Wrap long lines at character boundaries.\n* `view.WRAP_WHITESPACE`\n Wrap long lines at word boundaries (ignoring style boundaries).\n\nThe default value is `view.WRAP_NONE`.
wrap_start_indent view.wrap_start_indent (number)\nThe number of spaces of indentation to display wrapped lines with if\n`view.wrap_indent_mode` is `view.WRAPINDENT_FIXED`.\nThe default value is `0`.
wrap_visual_flags view.wrap_visual_flags (number)\nThe wrapped line visual flag display mode.\n\n* `view.WRAPVISUALFLAG_NONE`\n No visual flags.\n* `view.WRAPVISUALFLAG_END`\n Show a visual flag at the end of a wrapped line.\n* `view.WRAPVISUALFLAG_START`\n Show a visual flag at the beginning of a sub-line.\n* `view.WRAPVISUALFLAG_MARGIN`\n Show a visual flag in the sub-line's line number margin.\n\nThe default value is `view.WRAPVISUALFLAG_NONE`.
wrap_visual_flags_location view.wrap_visual_flags_location (number)\nThe wrapped line visual flag location.\n\n* `view.WRAPVISUALFLAGLOC_DEFAULT`\n Draw a visual flag near the view's right margin.\n* `view.WRAPVISUALFLAGLOC_END_BY_TEXT`\n Draw a visual flag near text at the end of a wrapped line.\n* `view.WRAPVISUALFLAGLOC_START_BY_TEXT`\n Draw a visual flag near text at the beginning of a subline.\n\nThe default value is `view.WRAPVISUALFLAGLOC_DEFAULT`.
-write spawn_proc:write(...)\nWrites string input to the stdin of process *spawn_proc*.\nNote: On Linux, if more than 65536 bytes (64K) are to be written, it is\npossible those bytes need to be written in 65536-byte (64K) chunks, or the\nprocess may not receive all input. However, it is also possible that there is\na limit on how many bytes can be written in a short period of time, perhaps\n196608 bytes (192K).\n@param ... Standard input for *spawn_proc*.
-x_offset view.x_offset (number)\nThe horizontal scroll pixel position.\nA value of `0` is the normal position with the first text column visible at\nthe left of the view.
+write spawn_proc:write(...)\nWrites string input to the stdin of process *spawn_proc*.\nNote: On Linux, if more than 65536 bytes (64K) are to be written, it is possible those\nbytes need to be written in 65536-byte (64K) chunks, or the process may not receive all\ninput. However, it is also possible that there is a limit on how many bytes can be written\nin a short period of time, perhaps 196608 bytes (192K).\n@param ... Standard input for *spawn_proc*.
+x_offset view.x_offset (number)\nThe horizontal scroll pixel position.\nA value of `0` is the normal position with the first text column visible at the left of\nthe view.
xdigit lexer.xdigit (pattern)\nA pattern that matches any hexadecimal digit ('0'-'9', 'A'-'F', 'a'-'f').
-yesno_msgbox ui.dialogs.yesno_msgbox(options)\nPrompts the user with a generic message box dialog defined by dialog options\ntable *options* and with localized "Yes", "No", and "Cancel" buttons,\nreturning the selected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label.\nIf the dialog timed out, returns `0` or `"timeout"`. If the user canceled the\ndialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the message box.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `informative_text`: The dialog's extra informative text.\n * `icon`: The dialog's GTK stock icon name. Examples are\n "gtk-dialog-error", "gtk-dialog-info", "gtk-dialog-question", and\n "gtk-dialog-warning". The dialog does not display an icon by default.\n * `icon_file`: The dialog's icon file path. This option has no effect when\n `icon` is set.\n * `no_cancel`: Do not display the "Cancel" button. The default value is\n `false`.\n * `string_output`: Return the selected button's label (instead of its\n index) or the dialog's exit status instead of the button's index (instead\n of its exit code). The default value is `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value\n is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to\n select a button before timing out. Dialogs do not time out by default.\n@return selected button or exit code
+yesno_msgbox ui.dialogs.yesno_msgbox(options)\nPrompts the user with a generic message box dialog defined by dialog options table *options*\nand with localized "Yes", "No", and "Cancel" buttons, returning the selected button's index.\nIf *options*.`string_output` is `true`, returns the selected button's label. If the dialog timed\nout, returns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or `"delete"`.\n@param options Table of key-value option pairs for the message box.\n\n * `title`: The dialog's title text.\n * `text`: The dialog's main message text.\n * `informative_text`: The dialog's extra informative text.\n * `icon`: The dialog's GTK stock icon name. Examples are "gtk-dialog-error",\n "gtk-dialog-info", "gtk-dialog-question", and "gtk-dialog-warning". The dialog does not\n display an icon by default.\n * `icon_file`: The dialog's icon file path. This option has no effect when `icon` is set.\n * `no_cancel`: Do not display the "Cancel" button. The default value is `false`.\n * `string_output`: Return the selected button's label (instead of its index) or the dialog's\n exit status instead of the button's index (instead of its exit code). The default value is\n `false`.\n * `width`: The dialog's pixel width.\n * `height`: The dialog's pixel height.\n * `float`: Show the dialog on top of all desktop windows. The default value is `false`.\n * `timeout`: The integer number of seconds the dialog waits for the user to select a button\n before timing out. Dialogs do not time out by default.\n@return selected button or exit code
zoom view.zoom (number)\nThe number of points to add to the size of all fonts.\nNegative values are allowed, down to `-10`.\nThe default value is `0`.
zoom_in view.zoom_in(view)\nIncreases the size of all fonts by one point, up to 20.\n@param view A view.
zoom_out view.zoom_out(view)\nDecreases the size of all fonts by one point, down to -10.\n@param view A view. \ No newline at end of file
diff --git a/modules/lua/ta_tags b/modules/lua/ta_tags
index 3ba2dd81..09696545 100644
--- a/modules/lua/ta_tags
+++ b/modules/lua/ta_tags
@@ -301,14 +301,14 @@ _CHARSET _HOME/core/init.lua /^module('_G')]]$/;" F
_G _HOME/core/init.lua /^module('_G')]]$/;" m
_HOME _HOME/core/init.lua /^module('_G')]]$/;" F
_L _HOME/core/locale.lua /^module('_L')]]$/;" m
-_M _HOME/core/._M.luadoc /^module('_M')]]$/;" m
+_M _HOME/core/._M.luadoc /^module('_M')$/;" m
_M.ansi_c _HOME/modules/ansi_c/init.lua /^module('_M.ansi_c')]]$/;" m
_M.lua _HOME/modules/lua/init.lua /^module('_M.lua')]]$/;" m
_RELEASE _HOME/core/init.lua /^module('_G')]]$/;" F
_SCINTILLA _HOME/core/iface.lua /^module('_SCINTILLA')]]$/;" m
_USERHOME _HOME/core/init.lua /^module('_G')]]$/;" F
_VIEWS _HOME/core/init.lua /^local _VIEWS$/;" t
-_print _HOME/core/ui.lua /^function ui._print(buffer_type, ...)$/;" f class:ui
+_print _HOME/core/ui.lua /^function ui._print(buffer_type, ...) _print(assert_type(buffer_type, 'string', 1), ...) end$/;" f class:ui
abspath _HOME/core/lfs_ext.lua /^function lfs.abspath(filename, prefix)$/;" f class:lfs
active _HOME/modules/textadept/command_entry.lua /^module('ui.command_entry')]]$/;" F class:ui.command_entry
active _HOME/modules/textadept/find.lua /^module('ui.find')]]$/;" F class:ui.find
@@ -335,7 +335,7 @@ annotation_text _HOME/core/.buffer.luadoc /^module('buffer')$/;" F class:buffer
annotation_visible _HOME/core/.view.luadoc /^module('view')$/;" F class:view
ansi_c _HOME/modules/ansi_c/init.lua /^module('_M.ansi_c')]]$/;" m class:_M
any _HOME/lexers/lexer.lua /^module('lexer')]=]$/;" F class:lexer
-api_files _HOME/modules/textadept/editing.lua /^M.api_files = setmetatable({}, {__index = function(t, k)$/;" t class:textadept.editing
+api_files _HOME/modules/textadept/editing.lua /^M.api_files = setmetatable({}, {$/;" t class:textadept.editing
append_history _HOME/modules/textadept/command_entry.lua /^function M.append_history(f, text)$/;" f class:ui.command_entry
append_text _HOME/core/.buffer.luadoc /^function append_text(buffer, text) end$/;" f class:buffer
arg _HOME/core/init.lua /^local arg$/;" t
@@ -424,7 +424,7 @@ char_right_rect_extend _HOME/core/.buffer.luadoc /^function char_right_rect_exte
choose_caret_x _HOME/core/.buffer.luadoc /^function choose_caret_x(buffer) end$/;" f class:buffer
clear _HOME/core/.buffer.luadoc /^function clear(buffer) end$/;" f class:buffer
clear _HOME/modules/textadept/bookmarks.lua /^function M.clear() buffer:marker_delete_all(M.MARK_BOOKMARK) end$/;" f class:textadept.bookmarks
-clear _HOME/modules/textadept/history.lua /^function M.clear()$/;" f class:textadept.history
+clear _HOME/modules/textadept/history.lua /^function M.clear() for view in pairs(view_history) do view_history[view] = {pos = 0} end end$/;" f class:textadept.history
clear_all _HOME/core/.buffer.luadoc /^function clear_all(buffer) end$/;" f class:buffer
clear_document_style _HOME/core/.buffer.luadoc /^function clear_document_style(buffer) end$/;" f class:buffer
clear_registered_images _HOME/core/.view.luadoc /^function clear_registered_images(view) end$/;" f class:view
@@ -1009,7 +1009,7 @@ word_left _HOME/core/.buffer.luadoc /^function word_left(buffer) end$/;" f class
word_left_end _HOME/core/.buffer.luadoc /^function word_left_end(buffer) end$/;" f class:buffer
word_left_end_extend _HOME/core/.buffer.luadoc /^function word_left_end_extend(buffer) end$/;" f class:buffer
word_left_extend _HOME/core/.buffer.luadoc /^function word_left_extend(buffer) end$/;" f class:buffer
-word_match _HOME/lexers/lexer.lua /^function M.word_match(words, case_insensitive, word_chars)$/;" f class:lexer
+word_match _HOME/lexers/lexer.lua /^function M.word_match(word_list, case_insensitive, word_chars)$/;" f class:lexer
word_part_left _HOME/core/.buffer.luadoc /^function word_part_left(buffer) end$/;" f class:buffer
word_part_left_extend _HOME/core/.buffer.luadoc /^function word_part_left_extend(buffer) end$/;" f class:buffer
word_part_right _HOME/core/.buffer.luadoc /^function word_part_right(buffer) end$/;" f class:buffer
diff --git a/modules/lua/tadoc.lua b/modules/lua/tadoc.lua
index f4ba1b93..8404364f 100644
--- a/modules/lua/tadoc.lua
+++ b/modules/lua/tadoc.lua
@@ -1,11 +1,10 @@
-- Copyright 2007-2021 Mitchell. See LICENSE.
-- Textadept autocompletions and API documentation doclet for LuaDoc.
--- This module is used by LuaDoc to create Lua autocompletion and API
--- documentation files that Textadept can read.
--- To preserve formatting, the included *luadoc.patch* file must be applied to
--- your instance of LuaDoc. It will not affect the look of HTML web pages, only
--- the look of plain-text output.
+-- This module is used by LuaDoc to create Lua autocompletion and API documentation files that
+-- Textadept can read.
+-- To preserve formatting, the included *luadoc.patch* file must be applied to your instance
+-- of LuaDoc. It will not affect the look of HTML web pages, only the look of plain-text output.
-- Also requires LuaFileSystem (lfs) to be installed.
-- @usage luadoc -d [output_path] -doclet path/to/tadoc [file(s)]
local M = {}
@@ -14,13 +13,16 @@ local CTAG = '%s\t%s\t/^%s$/;"\t%s\t%s'
local string_format = string.format
local lfs = require('lfs')
--- As a special case for Textadept API tags, do not store the local path, but
--- use a `_HOME` prefix that will be filled in by consumers. Do this by making
--- use of a custom command line switch: --ta-home="path/to/ta/home".
+-- As a special case for Textadept API tags, do not store the local path, but use a `_HOME`
+-- prefix that will be filled in by consumers. Do this by making use of a custom command line
+-- switch: --ta-home="path/to/ta/home".
local _HOME
for i = 1, #arg do
_HOME = arg[i]:match('^%-%-ta%-home=(.+)$')
- if _HOME then _HOME = _HOME:gsub('%p', '%%%0') break end
+ if _HOME then
+ _HOME = _HOME:gsub('%p', '%%%0')
+ break
+ end
end
-- Writes a ctag.
@@ -28,8 +30,8 @@ end
-- @param name The name of the tag.
-- @param filename The filename the tag occurs in.
-- @param code The line of code the tag occurs on.
--- @param k The kind of ctag. The Lua module recognizes 4 kinds: m Module, f
--- Function, t Table, and F Field.
+-- @param k The kind of ctag. The Lua module recognizes 4 kinds: m Module, f Function, t Table,
+-- and F Field.
-- @param ext_fields The ext_fields for the ctag.
local function write_tag(file, name, filename, code, k, ext_fields)
if _HOME then filename = filename:gsub(_HOME, '_HOME') end
@@ -37,16 +39,16 @@ local function write_tag(file, name, filename, code, k, ext_fields)
file[#file + 1] = string_format(CTAG, name, filename, code, k, ext_fields)
end
--- Sanitizes Markdown from the given documentation string by stripping links and
--- replacing HTML entities.
+-- Sanitizes Markdown from the given documentation string by stripping links and replacing
+-- HTML entities.
-- @param s String to sanitize Markdown from.
-- @return string
local function sanitize_markdown(s)
return s:gsub('%[([^%]\r\n]+)%]%b[]', '%1') -- [foo][]
- :gsub('%[([^%]\r\n]+)%]%b()', '%1') -- [foo](bar)
- :gsub('\r?\n\r?\n%[([^%]\r\n]+)%]:[^\r\n]+', '') -- [foo]: bar
- :gsub('\r?\n%[([^%]\r\n]+)%]:[^\r\n]+', '') -- [foo]: bar
- :gsub('&([%a]+);', {quot = '"', apos = "'"})
+ :gsub('%[([^%]\r\n]+)%]%b()', '%1') -- [foo](bar)
+ :gsub('\r?\n\r?\n%[([^%]\r\n]+)%]:[^\r\n]+', '') -- [foo]: bar
+ :gsub('\r?\n%[([^%]\r\n]+)%]:[^\r\n]+', '') -- [foo]: bar
+ :gsub('&([%a]+);', {quot = '"', apos = "'"})
end
-- Writes a function or field apidoc.
@@ -63,8 +65,7 @@ local function write_apidoc(file, m, b)
local class = b.class
local header = name
if class == 'function' then
- header = header ..
- (b.param and string.format('(%s)', table.concat(b.param, ', ')) or '')
+ header = header .. (b.param and string.format('(%s)', table.concat(b.param, ', ')) or '')
elseif class == 'field' and b.description:find('^%s*%b()') then
header = string.format('%s %s', header, b.description:match('^%s*(%b())'))
elseif class == 'module' or class == 'table' then
@@ -74,8 +75,8 @@ local function write_apidoc(file, m, b)
-- Function or field description.
local description = b.description
if class == 'module' then
- -- Modules usually have additional Markdown documentation so just grab the
- -- documentation before a Markdown header.
+ -- Modules usually have additional Markdown documentation so just grab the documentation
+ -- before a Markdown header.
description = description:match('^(.-)[\r\n]+#') or description
elseif class == 'field' then
-- Type information is already in the header; discard it in the description.
@@ -83,17 +84,14 @@ local function write_apidoc(file, m, b)
-- Strip consistent leading whitespace.
local indent
indent, description = description:match('^(%s*)(.*)$')
- if indent ~= '' then
- description = description:gsub('\n' .. indent, '\n')
- end
+ if indent ~= '' then description = description:gsub('\n' .. indent, '\n') end
end
doc[#doc + 1] = sanitize_markdown(description)
-- Function parameters (@param).
if class == 'function' and b.param then
for _, p in ipairs(b.param) do
if b.param[p] and #b.param[p] > 0 then
- doc[#doc + 1] = string.format(
- '@param %s %s', p, sanitize_markdown(b.param[p]))
+ doc[#doc + 1] = string.format('@param %s %s', p, sanitize_markdown(b.param[p]))
end
end
end
@@ -141,9 +139,9 @@ end
-- Called by LuaDoc to process a doc object.
-- @param doc The LuaDoc doc object.
function M.start(doc)
--- require('luarocks.require')
--- local profiler = require('profiler')
--- profiler.start()
+ -- require('luarocks.require')
+ -- local profiler = require('profiler')
+ -- profiler.start()
local modules, files = doc.modules, doc.files
@@ -156,8 +154,7 @@ function M.start(doc)
-- Add a module's fields to its LuaDoc.
for _, filename in ipairs(files) do
local module_doc = files[filename].doc[1]
- if module_doc and module_doc.class == 'module' and
- modules[module_doc.name] then
+ if module_doc and module_doc.class == 'module' and modules[module_doc.name] then
modules[module_doc.name].fields = module_doc.field
elseif module_doc then
print(string.format('[WARN] %s has no module declaration', filename))
@@ -172,9 +169,7 @@ function M.start(doc)
local module_name = func.name:match('^([^%.:]+)[%.:]') or '_G'
if not modules[module_name] then
modules[#modules + 1] = module_name
- modules[module_name] = {
- name = module_name, functions = {}, doc = {{code = func.code}}
- }
+ modules[module_name] = {name = module_name, functions = {}, doc = {{code = func.code}}}
files[modules[module_name].doc] = abspath(files[1])
-- For functions like file:read(), 'file' is not a module; fake it.
if func.name:find(':') then modules[module_name].fake = true end
@@ -206,8 +201,7 @@ function M.start(doc)
if m.name:find('%.') then
-- Tag the last part of the module as a table of the first part.
local parent, child = m.name:match('^(.-)%.([^%.]+)$')
- write_tag(
- ctags, child, filename, m.doc[1].code[1], 'm', 'class:' .. parent)
+ write_tag(ctags, child, filename, m.doc[1].code[1], 'm', 'class:' .. parent)
end
m.class = 'module'
write_apidoc(apidoc, {name = '_G'}, m)
@@ -217,8 +211,7 @@ function M.start(doc)
local module_name, name = function_name:match('^(.-)[%.:]?([^.:]+)$')
if module_name == '' then module_name = m.name end
local func = m.functions[function_name]
- write_tag(
- ctags, name, filename, func.code[1], 'f', 'class:' .. module_name)
+ write_tag(ctags, name, filename, func.code[1], 'f', 'class:' .. module_name)
write_apidoc(apidoc, m, func)
end
if m.tables then
@@ -234,21 +227,15 @@ function M.start(doc)
module_name = '_G' -- _G.keys or _G.snippets
end
end
- write_tag(
- ctags, table_name, filename, table.code[1], 't',
- 'class:' .. module_name)
+ write_tag(ctags, table_name, filename, table.code[1], 't', 'class:' .. module_name)
write_apidoc(apidoc, m, table)
if table.field then
-- Tag and document the table's fields.
table_name = string.format('%s.%s', module_name, table_name)
for _, field_name in ipairs(table.field) do
- write_tag(
- ctags, field_name, filename, table.code[1], 'F',
- 'class:' .. table_name)
+ write_tag(ctags, field_name, filename, table.code[1], 'F', 'class:' .. table_name)
write_apidoc(apidoc, {name = table_name}, {
- name = field_name,
- description = table.field[field_name],
- class = 'table'
+ name = field_name, description = table.field[field_name], class = 'table'
})
end
end
@@ -265,12 +252,9 @@ function M.start(doc)
print('[ERROR] Cannot determine module name for ' .. field.name)
end
end
- write_tag(
- ctags, field_name, filename, m.doc[1].code[1], 'F',
- 'class:' .. module_name)
+ write_tag(ctags, field_name, filename, m.doc[1].code[1], 'F', 'class:' .. module_name)
write_apidoc(apidoc, {name = field_name}, {
- name = string.format('%s.%s', module_name, field_name),
- description = field,
+ name = string.format('%s.%s', module_name, field_name), description = field,
class = 'field'
})
end
@@ -285,7 +269,7 @@ function M.start(doc)
f:write(table.concat(apidoc, '\n'))
f:close()
--- profiler.stop()
+ -- profiler.stop()
end
return M