aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--modules/lua/api22
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/lua/api b/modules/lua/api
index cd82c3f3..f4a15322 100644
--- a/modules/lua/api
+++ b/modules/lua/api
@@ -341,7 +341,7 @@ _RELEASE _G._RELEASE (string)\nThe Textadept release version string.
_RULES lexer.lexer._RULES (table)\nA map of rule name keys with their associated LPeg pattern\n values for the lexer.\n This is constructed from the lexer's `_rules` table and accessible to other\n lexers for embedded lexer applications like modifying parent or child\n rules.
_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 Mac OSX\nmachines *~/* is the value of "$HOME" (typically */home/username/* and\n*/Users/username/* respectively).
-_VERSION _G._VERSION (string)\nA global variable (not a function) that holds a string containing the\ncurrent interpreter version. The current value of this variable is\n"`Lua 5.3`".
+_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.3`".
_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
_cancel_current textadept.snippets._cancel_current()\nCancels the active snippet, removing all inserted text.
_fold lexer.lexer._fold (table)\nIf this function exists in the lexer, it is called for folding\n the document instead of using `_foldsymbols` or indentation.
@@ -435,7 +435,7 @@ buffer view.buffer (table)\nThe buffer the view contains. (Read-only)
buffered_draw buffer.buffered_draw (bool)\nBuffer drawing to avoid flickering.\nBuffering draws each line of text into a bitmap buffer before drawing the\nbitmap to the screen.\nThe default value is `true`.
bufstatusbar_text ui.bufstatusbar_text (string, Write-only)\nThe text displayed in the buffer statusbar.
build textadept.run.build()\nBuilds the current project (based on the buffer's filename or the current\nworking directory) using 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.\nEmits `BUILD_OUTPUT` events.\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.
+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 to operate in. By default, it\nis the project's root directory.
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.
call_tip_active buffer.call_tip_active(buffer)\nReturns whether or not a call tip is visible.\n@param buffer A buffer.\n@return bool
call_tip_cancel buffer.call_tip_cancel(buffer)\nRemoves a call tip from view.\n@param buffer A buffer.
@@ -495,7 +495,7 @@ column buffer.column (table, Read-only)\nTable of column numbers (taking tab wid
command_entry ui.command_entry (module)\nTextadept's Command Entry.
comment_string textadept.editing.comment_string (table)\nMap of lexer names to line comment strings for programming languages, used by\nthe `block_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 block_comment
compile textadept.run.compile()\nCompiles the current file based on its extension or language using the\nshell command from the `compile_commands` table.\nEmits `COMPILE_OUTPUT` events.\n@see compile_commands\n@see _G.events
-compile_commands textadept.run.compile_commands (table)\nMap of file extensions or 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.
+compile_commands textadept.run.compile_commands (table)\nMap of file extensions or 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 to operate in. By default, it\nis the current file's parent directory.
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.
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
@@ -524,7 +524,7 @@ currentdir lfs.currentdir()\nReturns a string with the current working directory
cursor buffer.cursor (number)\nThe display cursor type.\n\n* `buffer.CURSORNORMAL`\n The text insert cursor.\n* `buffer.CURSORARROW`\n The arrow cursor.\n* `buffer.CURSORWAIT`\n The wait cursor.\n* `buffer.CURSORREVERSEARROW`\n The reversed arrow cursor.\n\nThe default value is `buffer.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.
cwd textadept.run.cwd (string, Read-only)\nThe most recently executed compile or run shell command's working\ndirectory.\nIt is used for going to error messages with relative file paths.
-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` (four\ndigits), `month` (1-12), `day` (1-31), `hour` (0-23), `min` (0-59), `sec`\n(0-61), `wday` (weekday, Sunday is 1), `yday` (day of the year), and `isdst`\n(daylight saving flag, a boolean). This last field may be absent if the\ninformation 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\nWhen called without arguments, `date` returns a reasonable date and time\nrepresentation that depends on the host system and on the current locale\n(that is, `os.date()` is equivalent to `os.date("%c")`).\n\nOn non-POSIX systems, this function may be not thread safe because of its\nreliance on C function `gmtime` and C function `localtime`.
+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),\n`wday` (weekday, Sunday is 1), `yday` (day of the year), and `isdst`\n(daylight saving flag, a boolean). This last field may be absent if the\ninformation 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\nWhen called without arguments, `date` returns a reasonable date and time\nrepresentation that depends on the host system and on the current locale.\n(More specifically, `os.date()` is equivalent to `os.date("%c")`.)\n\nOn non-POSIX systems, this function may be not thread safe because of its\nreliance on C function `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.
dec_num lexer.dec_num (pattern)\nA pattern that matches a decimal number.
@@ -625,7 +625,7 @@ fold_level lexer.fold_level (table, Read-only)\nTable of fold level bit-masks fo
fold_line buffer.fold_line(buffer, line, action)\nContracts, expands, or toggles the fold point on line number *line*,\ndepending on *action*.\n@param buffer A buffer.\n@param line The line number in *buffer* to set the fold state for.\n@param action The fold action to perform. Valid values are:\n * `buffer.FOLDACTION_CONTRACT`\n * `buffer.FOLDACTION_EXPAND`\n * `buffer.FOLDACTION_TOGGLE`
fold_line_comments lexer.fold_line_comments(prefix)\nReturns a fold function (to be used within the lexer's `_foldsymbols` table)\nthat folds consecutive line comments that start with string *prefix*.\n@param prefix The prefix string defining a line comment.\n@usage [l.COMMENT] = {['--'] = l.fold_line_comments('--')}\n@usage [l.COMMENT] = {['//'] = l.fold_line_comments('//')}
fold_parent buffer.fold_parent (table, Read-only)\nTable of fold point line numbers for child line numbers starting from zero.\nA line number of `-1` means no line was found.
-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 options/modifiers `*`, `h`, `L`, `l`, `n`, and `p`\nare not supported and that there is an extra option, `q`. The `q` option\nformats a string between double quotes, using escape sequences when necessary\nto ensure that it can safely be read back by the Lua interpreter. For\ninstance, 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\nOptions `A` and `a` (when available), `E`, `e`, `f`, `G`, and `g` all expect\na number as argument. Options `c`, `d`, `i`, `o`, `u`, `X`, and `x` expect an\ninteger. Option `q` expects a string; option `s` expects a string without\nembedded zeros. If the argument to option `s` is not a string, it is\nconverted to one following the same rules of `tostring`.
+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 options/modifiers `*`, `h`, `L`, `l`, `n`, and `p`\nare not supported and that there is an extra option, `q`. The `q` option\nformats a string between double quotes, using escape sequences when necessary\nto ensure that it can safely be read back by the Lua interpreter. For\ninstance, 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\nOptions `A` and `a` (when available), `E`, `e`, `f`, `G`, and `g` all expect\na number as argument. Options `c`, `d`, `i`, `o`, `u`, `X`, and `x` expect an\ninteger. Option `q` expects a string. Option `s` expects a string; if its\nargument is not a string, it is converted to one following the same rules of\n`tostring`. If the option has any modifier (flags, width, length), the string\nargument should not contain zeros.
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.
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.
get_cur_line buffer.get_cur_line(buffer)\nReturns the current line's text and the caret's position on that line,\nstarting from zero.\n@param buffer A buffer.\n@return string, number
@@ -753,7 +753,7 @@ line_up_extend buffer.line_up_extend(buffer)\nMoves the caret up one line, exten
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 buffer.line_visible (table, Read-only)\nTable of flags that indicate whether or not lines are visible for line\nnumbers starting from zero.
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.\n\nIn case of errors this function raises the error, instead of returning an\nerror code.
-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\ndetects -- the end of file, it returns no values (to finish the loop) and\nautomatically closes the file.\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 this function raises the error, instead of returning an\nerror code.
+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\ndetects -- the end of file, it returns no values (to finish the loop) and\nautomatically closes the file.\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 this function raises the error, instead of returning an\nerror code.
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.
lines_on_screen buffer.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.
@@ -909,7 +909,7 @@ python _G.snippets.python (table)\nContainer for Python-specific snippets.
python _M.python (module)\nThe python module.\nIt provides utilities for editing Python code.
quit _G.quit()\nEmits a `QUIT` event, and unless any handler returns `false`, quits\nTextadept.\n@see events.QUIT
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 value `m-n` cannot be negative and must fit in a Lua\ninteger.) The call `math.random(n)` is equivalent to `math.random(1, n)`.\n\nThis function is an interface to the underling pseudo-random generator\nfunction provided by C. No guarantees can be given for its statistical\nproperties.
+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 value `n-m` cannot be negative and must fit in a Lua\ninteger.) The call `math.random(n)` is equivalent to `math.random(1, n)`.\n\nThis function is an interface to the underling pseudo-random generator\nfunction provided by C.
randomseed math.randomseed(x)\nSets `x` as the "seed" for the pseudo-random generator: equal seeds\nproduce equal sequences of numbers.
rawequal _G.rawequal(v1, v2)\nChecks whether `v1` is equal to `v2`, without invoking any\nmetamethod. Returns a boolean.
rawget _G.rawget(table, index)\nGets the real value of `table[index]`, without invoking any\nmetamethod. `table` must be a table; `index` may be any value.
@@ -933,7 +933,7 @@ reload_file io.reload_file()\nReloads the current buffer's file contents, discar
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`; in those cases, the function erases the element `list[pos]`.\n\nThe default value for `pos` is `#list`, so that a call `table.remove(l)`\nremoves the last element of 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.
+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.
replace ui.find.replace()\nMimics pressing the "Replace" button.
replace_all ui.find.replace_all()\nMimics pressing the "Replace All" button.
@@ -964,7 +964,7 @@ ruby _G.snippets.ruby (table)\nContainer for Ruby-specific snippets.
ruby _M.ruby (module)\nThe ruby module.\nIt provides utilities for editing Ruby code.
run textadept.run (module)\nCompile, run, and check the syntax of source code files with Textadept.\nLanguage modules may tweak the `compile_commands`,\n`run_commands`, `error_patterns`, `syntax_commands`, and\n`syntax_error_patterns` tables for particular languages.\nThe user may tweak `build_commands` for particular projects.
run textadept.run.run()\nRuns the current file based on its extension or language using the shell\ncommand from the `run_commands` table.\nEmits `RUN_OUTPUT` events.\n@see run_commands\n@see _G.events
-run_commands textadept.run.run_commands (table)\nMap of file extensions or 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.
+run_commands textadept.run.run_commands (table)\nMap of file extensions or 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 to operate in. By default, it\nis the current file's parent directory.
running coroutine.running()\nReturns the running coroutine plus a boolean, true when the running coroutine\nis the main one.
save textadept.session.save(filename)\nSaves the session to file *filename* or the user-selected file.\nSaves split views, opened buffers, cursor information, and recent files.\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)\n@see DEFAULT_SESSION
save_all_files io.save_all_files()\nSaves all unsaved buffers to their respective files.\n@see io.save_file
@@ -1037,7 +1037,7 @@ sethook debug.sethook([thread, ] hook, mask [, count])\nSets the given 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. (You cannot change the metatable\nof other types from Lua, only from C.) 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`.
+setmetatable _G.setmetatable(table, metatable)\nSets the metatable for the given table. (To change the metatable of other\ntypes from Lua code, you must use the debug library.) If `metatable` is nil,\nremoves the metatable of the given table. If the original metatable has a\n`"__metatable"` field, raises an error.\n\nThis function returns `table`.
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\ntext. Returns the previous mode string for the file. This function is only\navailable in Windows, so you may want to make sure that lfs.setmode exists\nbefore using it.
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.
@@ -1053,7 +1053,7 @@ snapopen io.snapopen(paths, filter, exclude_FILTER, opts)\nPrompts the user to s
snapopen_filters io.snapopen_filters (table)\nMap of file paths to filters used by `io.snapopen()`.\n@see snapopen
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.\nThis table also contains the `textadept.snippets` module.
snippets textadept.snippets (module)\nSnippets for Textadept.
-sort table.sort(list [, comp])\nSorts 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 `not comp(list[i+1],list[i])` will be\ntrue after the sort). If `comp` is not given, then the standard Lua operator\n`<` is used instead.\n\nThe sort algorithm is not stable; that is, elements considered equal by the\ngiven order may have their relative positions changed by the sort.
+sort table.sort(list [, comp])\nSorts 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.
space lexer.space (pattern)\nA pattern that matches any whitespace character ('\t', '\v', '\f', '\n',\n'\r', space).
spawn _G.spawn(argv, cwd, env, stdout_cb, stderr_cb, exit_cb)\nSpawns an interactive child process *argv* in a separate thread, returning\na handle to that process.\nAt the moment, only the Win32 terminal version spawns processes in the same\nthread.\n@param argv A command line string containing 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. The default value is `nil`, which inherits the parent's cwd.\n@param env Optional list of environment variables for the child process.\n Each element in the list is a 'KEY=VALUE' string. The default value is\n `nil`, which inherits the parent's environment.\n This parameter should be omitted completely instead of specifying `nil`.\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 spawn('lua buffer.filename', nil, print)\n@usage proc = spawn('lua -e "print(io.read())"', nil, 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