aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-10-31 23:26:09 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-10-31 23:26:09 -0400
commit59181f096a84ca4e1ebbefd03f73250ec9066eb0 (patch)
treed995760646cbbd424cacac2d4263dd657159cba3
parentca33c39f7edf53e3c9c730f9f58ababf04f62532 (diff)
Updated Lua Adeptsense apidoc; modules/lua/api
-rw-r--r--modules/lua/api74
1 files changed, 37 insertions, 37 deletions
diff --git a/modules/lua/api b/modules/lua/api
index fc39e735..b330e6e4 100644
--- a/modules/lua/api
+++ b/modules/lua/api
@@ -92,7 +92,7 @@ INDIC_STRIKE _SCINTILLA.constants.INDIC_STRIKE\n4
INDIC_TT _SCINTILLA.constants.INDIC_TT\n2
INVALID_POSITION _SCINTILLA.constants.INVALID_POSITION\n-1
KEYPRESS events.KEYPRESS (string)\nCalled when a key is pressed.\nIf any handler returns `true`, the key is not inserted into the buffer.\nArguments:\n\n* `code`: The key code.\n* `shift`: The "Shift" modifier key is held down.\n* `ctrl`: The "Control"/"Command" modifier key is held down.\n* `alt`: The "Alt"/"Option" modifier key is held down.\n* `meta`: The "Control" modifier key on Mac OSX is held down.
-KEYSYMS keys.KEYSYMS (table)\nLookup table for string representations of GDK key codes higher than 255.\nKey codes can be identified by temporarily uncommenting the `print()`\nstatements in *core/keys.lua*
+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*
KEYWORD lexer.KEYWORD (string)\nToken name for keyword tokens.
KEYWORDSET_MAX _SCINTILLA.constants.KEYWORDSET_MAX\n8
LABEL lexer.LABEL (string)\nToken name for label tokens.
@@ -791,9 +791,9 @@ additional_sel_back buffer.additional_sel_back (number)\nThe background color of
additional_sel_fore buffer.additional_sel_fore (number)\nThe foreground color of additional selections in "0xBBGGRR" format.\n`buffer:set_sel_fore(true, ...)` must have been called previously for this\nto have an effect.
additional_selection_typing buffer.additional_selection_typing (bool)\nWhether typing can be performed into multiple selections.
adeptsense _M.textadept.adeptsense (module)\nCode autocompletion and documentation support for programming languages.
-allocate buffer.allocate(buffer, bytes)\nEnlarge the document to a particular size of text bytes.\nThe document will not be made smaller than its current contents.\n@param buffer The global buffer.
-alnum lexer.alnum (pattern)\nMatches any alphanumeric character (`A-Z`, `a-z`, `0-9`).
-alpha lexer.alpha (pattern)\nMatches any alphabetic character (`A-Z`, `a-z`).
+allocate buffer.allocate(buffer, bytes)\nEnlarge the document to a particular size of text bytes.\nThe document will not be made smaller than its current contents.\n@param buffer The global buffer.\n@param bytes The number of bytes the document can store.
+alnum lexer.alnum (pattern)\nMatches any alphanumeric character ('A' to 'Z', 'a' to 'z', '0' to '9').
+alpha lexer.alpha (pattern)\nMatches any alphabetic character ('A' to 'Z', 'a' to 'z').
always_show_globals _M.textadept.adeptsense.always_show_globals (bool)\nInclude globals in the list of completions offered.\nGlobals are classes, functions, and fields that do not belong to another\nclass. They are contained in `completions['']`.\nThe default value is `true`.
anchor buffer.anchor (number)\nThe position of the opposite end of the selection to the caret.
annotation_clear_all buffer.annotation_clear_all(buffer)\nClear the annotations from all lines.\n@param buffer The global buffer.
@@ -809,13 +809,13 @@ append_text buffer.append_text(buffer, text)\nAppend a string to the end of the
arg _G.arg (table)\nCommand line parameters passed to Textadept.\n@see _G.args
args _G.args (module)\nProcesses command line arguments for Textadept.
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).
-ascii lexer.ascii (pattern)\nMatches any ASCII character (`0`..`127`).
+ascii lexer.ascii (pattern)\nMatches any ASCII character (value 0 to 127).
asin math.asin(x)\nReturns the arc sine of `x` (in radians).
assert _G.assert(v [, message])\nIssues an error when the value of its argument `v` is false (i.e.,\nnil or false); otherwise, returns all its arguments. `message` is an error\nmessage; when absent, it defaults to "assertion failed!"
atan math.atan(x)\nReturns the arc tangent of `x` (in radians).
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.)
attributes lfs.attributes(filepath [, aname])\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, then only the value of the named attribute is returned\n(this use is equivalent to lfs.attributes(filepath).aname, but the table is\nnot created and only one attribute is retrieved from the O.S.). The\nattributes are described as follows; attribute mode is a string, all the\nothers are numbers, and the time related attributes use the same time\nreference 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 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.
-auto_c_active buffer.auto_c_active(buffer)\nIs there an auto-completion list visible?\n@return bool
+auto_c_active buffer.auto_c_active(buffer)\nIs there an auto-completion list visible?\n@param buffer The global buffer.\n@return bool
auto_c_auto_hide buffer.auto_c_auto_hide (bool)\nWhether or not autocompletion is hidden automatically when nothing matches.\nBy default, the list is cancelled if there are no viable matches (the user\nhas typed characters that no longer match a list entry).
auto_c_cancel buffer.auto_c_cancel(buffer)\nRemove the auto-completion list from the screen.\nA set of characters that will cancel autocompletion can be specified with\n`buffer:auto_c_stops()`.\n@param buffer The global buffer.
auto_c_cancel_at_start buffer.auto_c_cancel_at_start (bool)\nWhether auto-completion is cancelled by backspacing to a position before\nwhere the box was created.\nIf `false`, the list is not cancelled until the caret moves at least one\ncharacter before the word being completed. If `true`, cancel if the user\nbackspaces to a position before where it was created.
@@ -830,7 +830,7 @@ auto_c_ignore_case buffer.auto_c_ignore_case (bool)\nWhether case is significant
auto_c_max_height buffer.auto_c_max_height (number)\nThe maximum height, in rows, of auto-completion and user lists.\nThe default is 5 rows.
auto_c_max_width buffer.auto_c_max_width (number)\nThe maximum width, in characters, of auto-completion and user lists.\nSet to `0` to autosize to fit longest item, which is the default.
auto_c_pos_start buffer.auto_c_pos_start(buffer)\nRetrieve the position of the caret when the auto-completion list was\ndisplayed.\n@param buffer The global buffer.\n@return number
-auto_c_select buffer.auto_c_select(buffer, string)\nSelect the item in the auto-completion list that starts with a string.\nBy default, comparisons are case sensitive, but this can change with\n`buffer.auto_c_ignore_case`.\n@param buffer The global buffer.
+auto_c_select buffer.auto_c_select(buffer, string)\nSelect the item in the auto-completion list that starts with a string.\nBy default, comparisons are case sensitive, but this can change with\n`buffer.auto_c_ignore_case`.\n@param buffer The global buffer.\n@param string The item in the list to select.
auto_c_separator buffer.auto_c_separator (number)\nThe auto-completion list separator character byte.\nThe default is the space character.
auto_c_show buffer.auto_c_show(buffer, len_entered, item_list)\nDisplay an auto-completion list.\n@param buffer The global buffer.\n@param len_entered The number of characters before the caret used to provide\n the context.\n@param item_list List of words separated by separator characters (initially\n spaces). The list of words should be in sorted order.
auto_c_stops buffer.auto_c_stops(buffer, chars)\nDefine a set of characters that when typed cancel the auto-completion list.\n@param buffer The global buffer.\n@param chars String list of characters. This list is empty by default.
@@ -846,7 +846,7 @@ bnot bit32.bnot(x)\nReturns the bitwise negation of `x`. For any integer `x`, th
boms io.boms (table)\nList of byte-order marks (BOMs) for identifying unicode file types.
bookmarks _M.textadept.bookmarks (module)\nBookmarks for Textadept.
bor bit32.bor(...)\nReturns the bitwise "or" of its operands.
-brace_bad_light buffer.brace_bad_light(buffer, pos)\nHighlight the character at a position indicating there is no matching brace.\n@param buffer The global buffer.\n@param pos The position or -1 to remove the highlight.
+brace_bad_light buffer.brace_bad_light(buffer, pos)\nHighlight the character at a position indicating there is no matching brace.\n@param buffer The global buffer.\n@param pos The position or `-1` to remove the highlight.
brace_bad_light_indicator buffer.brace_bad_light_indicator(buffer, use_indicator, indic_num)\nUse specified indicator to highlight non matching brace instead of changing\nits style.\n@param buffer The global buffer.\n@param use_indicator Use an indicator.\n@param indic_num The indicator number.
brace_highlight buffer.brace_highlight(buffer, pos1, pos2)\nHighlight the characters at two positions.\nIf indent guides are enabled, the indent that corresponds with the brace can\nbe highlighted by locating the column with `buffer.column` and highlight the\nindent with `buffer.highlight_guide`.\n@param buffer The global buffer.\n@param pos1 The first position.\n@param pos2 The second position.
brace_highlight_indicator buffer.brace_highlight_indicator(buffer, use_indicator, indic_num)\nUse specified indicator to highlight matching braces instead of changing\ntheir style.\n@param buffer The global buffer.\n@param use_indicator Use an indicator.\n@param indic_num The indicator number.
@@ -888,8 +888,8 @@ char_left buffer.char_left(buffer)\nMove caret left one character.\n@param buffe
char_left_extend buffer.char_left_extend(buffer)\nMove caret left one character extending selection to new caret position.\n@param buffer The global buffer.
char_left_rect_extend buffer.char_left_rect_extend(buffer)\nMove caret left one character, extending rectangular selection to new caret\nposition.\n@param buffer The global buffer.
char_matches _M.textadept.editing.char_matches (table)\nAuto-matched characters.\nUsed for auto-matching parentheses, brackets, braces, quotes, etc. Keys are\nlexer language names and values are tables of character match pairs. A pair's\nkey is an ASCII value and the value is the string character match. The\ndefaults are "()", "[]", "{}", "''", and """".\nThis table can be populated by language-specific modules.\n@see AUTOPAIR
-char_position_from_point buffer.char_position_from_point(buffer, x, y)\nFind the position of a character from a point within the window.\n@param buffer The global buffer.\n@return number
-char_position_from_point_close buffer.char_position_from_point_close(buffer, x, y)\nFind the position of a character from a point within the window.\nReturn `-1` if not close to text.\n@param buffer The global buffer.\n@return number
+char_position_from_point buffer.char_position_from_point(buffer, x, y)\nFind the position of a character from a point within the window.\n@param buffer The global buffer.\n@param x The x-coordinate in the window.\n@param y The y-coordinate in the window.\n@return number
+char_position_from_point_close buffer.char_position_from_point_close(buffer, x, y)\nFind the position of a character from a point within the window.\nReturn `-1` if not close to text.\n@param buffer The global buffer.\n@param x The x-coordinate in the window.\n@param y The y-coordinate in the window.\n@return number
char_right buffer.char_right(buffer)\nMove caret right one character.\n@param buffer The global buffer.
char_right_extend buffer.char_right_extend(buffer)\nMove caret right one character extending selection to new caret position.\n@param buffer The global buffer.
char_right_rect_extend buffer.char_right_rect_extend(buffer)\nMove caret right one character, extending rectangular selection to new caret\nposition.\n@param buffer The global buffer.
@@ -911,7 +911,7 @@ close buffer.close(buffer)\nCloses the current buffer.\n@param buffer The global
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.
close_all io.close_all()\nCloses all open buffers.\nIf any buffer is dirty, the user is prompted to continue. No buffers are\nsaved automatically. They must be saved manually.\n@usage io.close_all()\n@return `true` if user did not cancel.\n@see buffer.close
-cntrl lexer.cntrl (pattern)\nMatches any control character (`0`..`31`).
+cntrl lexer.cntrl (pattern)\nMatches any control character (value 0 to 31).
code_page buffer.code_page (number)\nThe code page used to interpret the bytes of the document as characters.\nThe `_SCINTILLA.constants.SC_CP_UTF8` value can be used to enter Unicode\nmode.
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) and a second\n value with the total memory in bytes modulo 1024. The first value\n has a fractional part, so the following equality is always true:\n\n k, b = collectgarbage("count")\n assert(k*1024 == math.floor(k)*1024 + b)\n\n (The second result is useful when Lua is compiled with a non\n floating-point type for numbers.)\n "step": performs a garbage-collection step. The step "size" is controlled\n by `arg` (larger values mean more steps) in a non-specified way. If\n you want to control the step size you must experimentally tune the\n value of `arg`. Returns true if the step finished a collection\n cycle.\n "setpause": sets `arg` as the new value for the *pause* of the collector\n (see §2.5). Returns the previous value for *pause*.\n "setstepmul": sets `arg` as the new value for the *step multiplier*\n of the collector (see §2.5). Returns the previous value for\n *step*.\n "isrunning": returns a boolean that tells whether the collector is running\n (i.e., not stopped).\n "generational": changes the collector to generational mode. This is an\n experimental feature (see §2.5).\n "incremental": changes the collector to incremental mode. This is the\n default mode.
color lexer.color(r, g, b)\nCreates a Scintilla color.\n@param r The string red hexadecimal component of the color.\n@param g The string green hexadecimal component of the color.\n@param b The string blue hexadecimal component of the color.\n@usage local red = color('FF', '00', '00')\n@return integer color for Scintilla.
@@ -936,14 +936,14 @@ control_structure_patterns _M.lua.control_structure_patterns (table)\nPatterns f
control_structure_patterns _M.ruby.control_structure_patterns (table)\nPatterns for auto `end` completion for control structures.\n@see try_to_autocomplete_end
convert_eo_ls buffer.convert_eo_ls(buffer, mode)\nConverts all line endings in the document to one mode.\n@param buffer The global buffer.\n@param mode The line ending mode. Valid values are:\n * `_SCINTILLA.constants.SC_EOL_CRLF` (0)\n * `_SCINTILLA.constants.SC_EOL_CR` (1)\n * `_SCINTILLA.constants.SC_EOL_LF` (2)
convert_indentation _M.textadept.editing.convert_indentation()\nConverts indentation between tabs and spaces.\nIf `buffer.use_tabs` is `true`, all indenting spaces are converted to tabs.\nOtherwise, all indenting tabs are converted to spaces.\n@see buffer.use_tabs
-copy buffer.copy(buffer)\nCopy the selection to the clipboard.\n@param buffer The buffer
+copy buffer.copy(buffer)\nCopy the selection to the clipboard.\n@param buffer The global buffer.
copy_allow_line buffer.copy_allow_line(buffer)\nCopy the selection, if selection empty copy the line with the caret.\n@param buffer The global buffer.
copy_range buffer.copy_range(buffer, start_pos, end_pos)\nCopy a range of text to the clipboard. Positions are clipped into the\ndocument.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position.
copy_text buffer.copy_text(buffer, text)\nCopy argument text to the clipboard.\n@param buffer The global buffer.\n@param text The text.
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`.
-count_characters buffer.count_characters(buffer, start_pos, end_pos)\nCount characters between two positions.\n@return number
+count_characters buffer.count_characters(buffer, start_pos, end_pos)\nCount characters between two positions.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position.\n@return number
cpath package.cpath (string)\nThe 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_2`\nor the environment variable `LUA_CPATH` or a default path defined in\n`luaconf.h`.
cpp _G.keys.cpp (table)\nContainer for C/C++-specific key bindings.
cpp _G.snippets.cpp (table)\nContainer for C/C++-specific snippets.
@@ -974,7 +974,7 @@ delete_range buffer.delete_range(buffer, pos, length)\nDelete a range of text in
delimited_range lexer.delimited_range(chars, escape, end_optional, balanced, forbidden)\nCreates and returns a pattern that matches a range of characters delimited by\nthe given character(s).\nThis is a convenience function for matching more complicated delimited ranges\nlike strings with escape characters and balanced parentheses.\n@param chars The character(s) that bound the matched range.\n@param escape Optional escape character. This parameter may `nil` or the\n empty string to indicate no escape character.\n@param end_optional Optional flag indicating whether or not an ending\n delimiter is optional or not. If `true`, the range begun by the start\n delimiter matches until an end delimiter or the end of the input is\n reached.\n@param balanced Optional flag indicating whether or not a balanced range is\n matched, like the "%b" Lua pattern. This flag only applies if `chars`\n consists of two different characters (e.g. "()").\n@param forbidden Optional string of characters forbidden in a delimited\n range. Each character is part of the set. This is particularly useful for\n disallowing newlines in delimited ranges.\n@usage local sq_str_noescapes = delimited_range("'", nil, true)\n@usage local sq_str_escapes = delimited_range("'", '\\', true)\n@usage local unbalanced_parens = delimited_range('()', '\\')\n@usage local balanced_parens = delimited_range('()', '\\', false, true)\n@return pattern\n@see nested_pair
dialog gui.dialog(kind, ...)\nDisplays a gtdialog of a specified type with the given string arguments.\nEach argument is like a string in Lua's `arg` table. Tables of strings are\nallowed as arguments and are expanded in place. This is useful for\nfiltered list dialogs with many items.\nFor more information on gtdialog, see http://foicica.com/gtdialog.\n@param kind The kind of gtdialog.\n@param ... Parameters to the gtdialog.\n@return string gtdialog result.
difftime os.difftime(t2, t1)\nReturns the number of seconds from time `t1` to time `t2`. In POSIX,\nWindows, and some other systems, this value is exactly `t2`*-*`t1`.
-digit lexer.digit (pattern)\nMatches any digit (`0-9`).
+digit lexer.digit (pattern)\nMatches any digit ('0' to '9').
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.
direct_function buffer.direct_function (number, Read-only)\nA pointer to a function that processes messages for this view.
direct_pointer buffer.direct_pointer (number, Read-only)\nA pointer value to use as the first argument when calling the function\nreturned by direct_function.
@@ -1013,7 +1013,7 @@ events _G.events (module)\nTextadept's core event structure and handlers.
execute os.execute([command])\nThis function is equivalent to the 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 and 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 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.
exp math.exp(x)\nReturns the value *e^x*.
-extend lexer.extend (pattern)\nMatches any ASCII extended character (`0`..`255`).
+extend lexer.extend (pattern)\nMatches any ASCII extended character (value 0 to 255).
extensions _M.textadept.mime_types.extensions (table)\nTable of file extensions with their associated lexers.\nIf the file type is not recognized by shebang words or first-line patterns,\neach file extension is matched against the file's extension.
extra_ascent buffer.extra_ascent (number)\nThe extra ascent, the maximum that any style extends above the baseline,\nadded to each line.
extra_descent buffer.extra_descent (number)\nThe extra descent, the maximum that any style extends below the baseline,\nadded to each line.
@@ -1062,7 +1062,7 @@ get_fold_level lexer.get_fold_level(line_number)\nReturns the fold level for a g
get_hotspot_active_back buffer.get_hotspot_active_back(buffer)\nGet the back color for active hotspots in "0xBBGGRR" format.\n@param buffer The global buffer.\n@return number
get_hotspot_active_fore buffer.get_hotspot_active_fore(buffer)\nGet the fore color for active hotspots.\n@param buffer The global buffer.\n@return number
get_indent_amount lexer.get_indent_amount(line)\nReturns the indent amount of text for a given line.\n@param line The line number to get the indent amount of.\n@return integer indent amount
-get_last_child buffer.get_last_child(buffer, header_line, level)\nFind the last child line of a header line.\n@param buffer The global buffer.\n@param header_line The line number of a header line.\n@param level The level or `-1` for the level of header_line.
+get_last_child buffer.get_last_child(buffer, header_line, level)\nFind the last child line of a header line.\n@param buffer The global buffer.\n@param header_line The line number of a header line.\n@param level The level or `-1` for the level of `header_line`.
get_lexer buffer.get_lexer(buffer, current)\nReplacement for `buffer.lexer_language`.\n@param buffer The global buffer.\n@param current Whether to get the lexer at the current caret position in\n multi-language lexers. The default is `false` and returns the parent lexer.
get_line buffer.get_line(buffer, line)\nRetrieve the contents of a line.\nAlso returns the length of the line.\n@param buffer The global buffer.\n@param line The line number.\n@return string, number
get_line_sel_end_position buffer.get_line_sel_end_position(buffer, line)\nRetrieve the position of the end of the selection at the given line (`-1` if\nno selection on this line).\n@param buffer The global buffer.\n@param line The line number.
@@ -1097,7 +1097,7 @@ goto_pos buffer.goto_pos(buffer, pos)\nSet caret to a position and ensure it is
goto_prev _M.textadept.bookmarks.goto_prev()\nGoes to the previous bookmark in the current buffer.
goto_view gui.goto_view(n, relative)\nGoes to the specified view.\nEmits `VIEW_BEFORE_SWITCH` and `VIEW_AFTER_SWITCH` events.\n@param n A relative or absolute view index in `_G._VIEWS`.\n@param relative Flag indicating if n is a relative index or not. The default\n value is `false`.\n@see _G._G._VIEWS\n@see events.VIEW_BEFORE_SWITCH\n@see events.VIEW_AFTER_SWITCH
grab_focus buffer.grab_focus(buffer)\nSet the focus to this view.\n@param buffer The global buffer.
-graph lexer.graph (pattern)\nMatches any graphical character (`!` to `~`).
+graph lexer.graph (pattern)\nMatches any graphical character ('!' to '~').
grow_selection _M.textadept.editing.grow_selection(amount)\nGrows the selection by the given number of characters on either end.\n@param amount The number of characters to grow the selection by on either\n end.
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` have been replaced by a replacement string\nspecified by `repl`, which can be a string, a table, or a function. `gsub`\nalso returns, as its second value, the total number of matches that occurred.\nThe 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 (see below). The sequence `%0` stands for the whole match. The\nsequence `%%` stands for a single `%`.\n\nIf `repl` is a table, then the table is queried for every match, using\nthe first capture as the key; if the pattern specifies no captures, then\nthe whole match is used as the key.\nIf `repl` is a function, then this function is called every time a match\noccurs, with all captured substrings passed as arguments, in order; if\nthe pattern specifies no captures, then the whole match is passed as a\nsole argument.\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.2"}\n x = string.gsub("$name-$version.tar.gz", "%$(%w+)", t)\n --> x="lua-5.2.tar.gz"
gui _G.gui (module)\nUtilities for Textadept's user interface.
@@ -1137,7 +1137,7 @@ indicator_all_on_for buffer.indicator_all_on_for(buffer, pos)\nRetrieve a bitmap
indicator_clear_range buffer.indicator_clear_range(buffer, pos, clear_length)\nTurn a indicator off over a range.\n@param buffer The global buffer.\n@param pos The start position.\n@param clear_length The length.
indicator_current buffer.indicator_current (number)\nThe indicator in the range of `0` to `31` used for\n`buffer:indicator_fill_range()` and `buffer:indicator_clear_range()`.
indicator_end buffer.indicator_end(buffer, indicator, pos)\nFind the position where a particular indicator ends.\n@param buffer The global buffer.\n@param indicator An indicator number in the range of `0` to `31`.\n@param pos The position of the indicator.
-indicator_fill_range buffer.indicator_fill_range(buffer, pos, fill_length)\nTurn a indicator on over a range.\nThis function fills with the current indicator value.\n@param buffer The global buffer.\n@param pos the start position.\n@param fill_length The length.
+indicator_fill_range buffer.indicator_fill_range(buffer, pos, fill_length)\nTurn a indicator on over a range.\nThis function fills with the current indicator value.\n@param buffer The global buffer.\n@param pos The start position.\n@param fill_length The length.
indicator_start buffer.indicator_start(buffer, indicator, pos)\nFind the position where a particular indicator starts.\n@param buffer The global buffer.\n@param indicator An indicator number in the range of `0` to `31`.\n@param pos The position of the indicator.
indicator_value buffer.indicator_value (number)\nThe indicator value used for `buffer:indicator_fill_range()`.\nCurrently all values are drawn the same.
indicator_value_at buffer.indicator_value_at(buffer, indicator, pos)\nRetrieve the value of a particular indicator at a position.\nCurrently all values are drawn the same.\n@param buffer The global buffer.\n@param indicator The indicator number in the range of `0` to `31`.\n@param pos The position.\n@return number
@@ -1215,7 +1215,7 @@ locations _M.textadept.adeptsense.locations (table)\nContains the locations of k
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 it 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`).
-lower lexer.lower (pattern)\nMatches any lowercase character (`a-z`).
+lower lexer.lower (pattern)\nMatches any lower case character ('a' to 'z').
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_case buffer.lower_case(buffer)\nTransform the selection to lower case.\n@param buffer The global buffer.
lpeg _G.lpeg (module)\nLua lpeg module.
@@ -1250,7 +1250,7 @@ marker_define_rgba_image buffer.marker_define_rgba_image(buffer, marker_num, pix
marker_delete buffer.marker_delete(buffer, line, marker_num)\nDelete a marker from a line.\n@param buffer The global buffer.\n@param line The line number.\n@param marker_num A marker number in the range of `0` to `31` or `-1` to\n delete all markers from the line.
marker_delete_all buffer.marker_delete_all(buffer, marker_num)\nDelete all markers with a particular number from all lines.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of `0` to `31` or `-1` to\n delete all markers from the line.
marker_delete_handle buffer.marker_delete_handle(buffer, handle)\nDelete a marker.\n@param buffer The global buffer.\n@param handle The identifier of a marker returned by `buffer:marker_add()`.
-marker_enable_highlight buffer.marker_enable_highlight(buffer, enabled)\nEnable/disable highlight for current folding block (smallest one that\ncontains the caret)\n@param buffer The global buffer.
+marker_enable_highlight buffer.marker_enable_highlight(buffer, enabled)\nEnable/disable highlight for current folding block (smallest one that\ncontains the caret)\n@param buffer The global buffer.\n@param enabled Whether to enable highlight.
marker_fore buffer.marker_fore (table, Write-only)\nTable of the foreground colors used for particular marker numbers.\nMarker numbers are in the range of `0` to `31`. Colors are in "0xBBGGRR"\nformat.
marker_get buffer.marker_get(buffer, line)\nGet a bit mask of all the markers set on a line.\nBit 0 is set if marker 0 is present, bit 1 for marker 1 and so on.\n@param buffer The global buffer.\n@param line The line number.\n@return number.
marker_line_from_handle buffer.marker_line_from_handle(buffer, handle)\nRetrieve the line number at which a particular marker is located.\nReturns `-1` if it not found.\n@param buffer The global buffer.\n@param handle The identifier of a marker returned by `buffer:marker_add()`.\n@return number
@@ -1328,13 +1328,13 @@ position_after buffer.position_after(buffer, pos)\nGiven a valid document positi
position_before buffer.position_before(buffer, pos)\nGiven a valid document position, return the previous position taking code\npage into account. Returns `0` if passed `0`.\n@param buffer The global buffer.\n@param pos The position.\n@return number
position_cache buffer.position_cache (number)\nThe number of entries in the position cache.\nThe position cache stores position information for short runs of text so\nthat their layout can be determined more quickly if the run recurs.
position_from_line buffer.position_from_line(buffer, line)\nRetrieve the position at the start of a line.\nIf line is greater than the lines in the document, returns `-1`.\n@param buffer The global buffer.\n@param line The line.\n@return number
-position_from_point buffer.position_from_point(buffer, x, y)\nFind the position from a point within the window.\n@param buffer The global buffer.\n@return number
-position_from_point_close buffer.position_from_point_close(buffer, x, y)\nReturns the position from a point within the window, but return `-1` if not\nclose to text.\n@param buffer The global buffer.\n@return number
+position_from_point buffer.position_from_point(buffer, x, y)\nFind the position from a point within the window.\n@param buffer The global buffer.\n@param x The x-coordinate in the window.\n@param y The y-coordinate in the window.\n@return number
+position_from_point_close buffer.position_from_point_close(buffer, x, y)\nReturns the position from a point within the window, but return `-1` if not\nclose to text.\n@param buffer The global buffer.\n@param x The x-coordinate in the window.\n@param y The y-coordinate in the window.\n@return number
pow math.pow(x, y)\nReturns *x^y*. (You can also use the expression `x^y` to compute this\nvalue.)
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`, using\nthe `tostring` function to convert each argument to a string. `print` is not\nintended for formatted output, but only as a quick way to show a value,\nfor instance for debugging. For complete control over the output, use\n`string.format` and `io.write`.
print gui.print(...)\nPrints messages to the Textadept message buffer.\nOpens a new buffer if one has not already been opened for printing messages.\n@param ... Message strings.
-print lexer.print (pattern)\nMatches any printable character (space to `~`).
+print lexer.print (pattern)\nMatches any printable character (' ' to '~').
print_colour_mode buffer.print_colour_mode (number)\nThe print color mode.\n\n* `_SCINTILLA.constants.SC_PRINT_NORMAL` (0)\n Print using the current screen colors.\n This is the default.\n* `_SCINTILLA.constants.SC_PRINT_INVERTLIGHT` (1)\n If you use a dark screen background this saves ink by inverting the light\n value of all colors and printing on a white background.\n* `_SCINTILLA.constants.SC_PRINT_BLACKONWHITE` (2)\n Print all text as black on a white background.\n* `_SCINTILLA.constants.SC_PRINT_COLOURONWHITE` (3)\n Everything prints in its own color on a white background.\n* `_SCINTILLA.constants.SC_PRINT_COLOURONWHITEDEFAULTBG` (4)\n Everything prints in its own color on a white background except that line\n numbers use their own background color.
print_magnification buffer.print_magnification (number)\nThe print magnification added to the point size of each style for printing.
print_wrap_mode buffer.print_wrap_mode (number)\nPrinting line wrap mode.\n\n* `_SCINTILLA.constants.SC_WRAP_NONE` (0)\n Each line of text generates one line of output and the line is truncated\n if it is too long to fit into the print area.\n* `_SCINTILLA.constants.SC_WRAP_WORD` (1)\n Wraps printed output so that all characters fit into the print rectangle.\n Tries to wrap only between words as indicated by white space or style\n changes although if a word is longer than a line, it will be wrapped\n before the line end. This is the default.\n* `_SCINTILLA.constants.SC_WRAP_CHAR` (2).
@@ -1344,7 +1344,7 @@ properties _SCINTILLA.properties (table)\nScintilla properties.\nEach key is a S
property buffer.property (table)\nTable of keyword:value string pairs used by a lexer for some optional\nfeatures.
property_expanded buffer.property_expanded (table)\nTable of keyword:value string pairs used by a lexer for some optional\nfeatures with `$()` variable replacement on returned string.
property_int buffer.property_int (table, Read-only)\nInterprets `buffer.property[keyword]` as an integer if found or returns\n`0`.
-punct lexer.punct (pattern)\nMatches any punctuation character not alphanumeric (`!` to `/`, `:` to `@`,\n`[` to `'`, `{` to `~`).
+punct lexer.punct (pattern)\nMatches any punctuation character not alphanumeric ('!' to '/', ':' to '@',\n'[' to ''', '{' to '~').
punctuation_chars buffer.punctuation_chars (string)\nThe set of characters making up punctuation characters.\nUse after setting `buffer.word_chars`.
python _G.keys.python (table)\nContainer for Python-specific key bindings.
python _G.snippets.python (table)\nContainer for Python-specific snippets.
@@ -1386,8 +1386,8 @@ replace_button_text gui.find.replace_button_text (string, Write-only)\nThe text
replace_entry_text gui.find.replace_entry_text (string)\nThe text in the replace entry.
replace_label_text gui.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)\nReplace the selected text with the argument text.\nThe caret is positioned after the inserted text and the caret is scrolled\ninto view.\n@param buffer The global buffer.\n@param text The text.
-replace_target buffer.replace_target(buffer, text)\nReplace the target text with the argument text.\nAfter replacement, the target range refers to the replacement text.\nReturns the length of the replacement text.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number
-replace_target_re buffer.replace_target_re(buffer, text)\nReplace the target text with the argument text after `\d` processing.\nLooks for `\d` where `d` is between `1` and `9` and replaces these with the\nstrings matched in the last search operation which were surrounded by `\(`\nand `\)`. Returns the length of the replacement text including any change\ncaused by processing the `\d` patterns.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number
+replace_target buffer.replace_target(buffer, text)\nReplace the target text with the argument text.\nAfter replacement, the target range refers to the replacement text.\nReturns the length of the replacement text.\n@param buffer The global buffer.\n@param text The text (can contain null bytes).\n@return number
+replace_target_re buffer.replace_target_re(buffer, text)\nReplace the target text with the argument text after `\d` processing.\nLooks for `\d` where `d` is between `1` and `9` and replaces these with the\nstrings matched in the last search operation which were surrounded by `\(`\nand `\)`. Returns the length of the replacement text including any change\ncaused by processing the `\d` patterns.\n@param buffer The global buffer.\n@param text The text (can contain null bytes).\n@return number
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\nloaded. If it is, then `require` returns the value stored at\n`package.loaded[modname]`. Otherwise, it tries to find a *loader* for\nthe module.\n\nTo find a loader, `require` is guided by the `package.searchers` sequence. By\nchanging this sequence, we can change how `require` looks for a module. The\nfollowing 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 should 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 dependent on how it got the loader. (If the\nloader came from a file, this extra value is the file name.) 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 <b>true</b> to this entry. In any case, `require` returns the final\nvalue of `package.loaded[modname]`.\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.
reset _G.reset()\nResets the Lua state by reloading all init scripts.\nLanguage-specific modules for opened files are NOT reloaded. Re-opening the\nfiles that use 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. `_G.RESETTING` is set to `true`\nwhen re-initing the Lua State. Any scripts that need to differentiate between\nstartup and reset can utilize this variable.\n@see RESETTING
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` (if the coroutine yields) or any values returned\nby the body function (if the coroutine terminates). If there is any error,\n`resume` returns false plus the error message.
@@ -1420,9 +1420,9 @@ scroll_width buffer.scroll_width (number)\nThe document width assumed for scroll
scroll_width_tracking buffer.scroll_width_tracking (bool)\nWhether the maximum width line displayed is used to set scroll width.
search_anchor buffer.search_anchor(buffer)\nSets the current caret position to be the search anchor.\nAlways call this before calling either of `buffer:search_next()` or\n`buffer:search_prev()`.\n@param buffer The global buffer.
search_flags buffer.search_flags (number)\nThe search flags used by `buffer:search_in_target()`.\n\n* `_SCINTILLA.constants.SCFIND_WHOLEWORD` (2)\n A match only occurs with text that matches the case of the search string.\n* `_SCINTILLA.constants.SCFIND_MATCHCASE` (4)\n A match only occurs if the characters before and after are not word\n characters.\n* `_SCINTILLA.constants.SCFIND_WORDSTART` (0x00100000)\n A match only occurs if the character before is not a word character.\n* `_SCINTILLA.constants.SCFIND_REGEXP` (0x00200000)\n The search string should be interpreted as a regular expression.\n* `_SCINTILLA.constants.SCFIND_POSIX` (0x00400000)\n Treat regular expression in a more POSIX compatible manner by\n interpreting bare '(' and ')' for tagged sections rather than "\\(" and\n "\\)".
-search_in_target buffer.search_in_target(buffer, text)\nSearch for a counted string in the target and set the target to the found\nrange.\nReturns length of range or `-1` for failure in which case target is not\nmoved.\n@param buffer The global buffer.\n@param text The text (can contain NULs).\n@return number
-search_next buffer.search_next(buffer, flags, text)\nFind some text starting at the search anchor.\nThe return value is `-1` if nothing is found, otherwise the return value is\nthe start position of the matching text. The selection is updated to show the\nmatched text, but is not scrolled into view.\n@param buffer The global buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number
-search_prev buffer.search_prev(buffer, flags, text)\nFind some text starting at the search anchor and moving backwards.\nThe return value is `-1` if nothing is found, otherwise the return value is\nthe start position of the matching text. The selection is updated to show the\nmatched text, but is not scrolled into view.\n@param buffer The global buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number
+search_in_target buffer.search_in_target(buffer, text)\nSearch for a counted string in the target and set the target to the found\nrange.\nReturns length of range or `-1` for failure in which case target is not\nmoved.\n@param buffer The global buffer.\n@param text The text (can contain null bytes).\n@return number
+search_next buffer.search_next(buffer, flags, text)\nFind some text starting at the search anchor.\nThe return value is `-1` if nothing is found, otherwise the return value is\nthe start position of the matching text. The selection is updated to show the\nmatched text, but is not scrolled into view.\n@param buffer The global buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number\n@see search_flags
+search_prev buffer.search_prev(buffer, flags, text)\nFind some text starting at the search anchor and moving backwards.\nThe return value is `-1` if nothing is found, otherwise the return value is\nthe start position of the matching text. The selection is updated to show the\nmatched text, but is not scrolled into view.\n@param buffer The global buffer.\n@param flags Search flags. See `buffer.search_flags`.\n@param text The text.\n@return number\n@see search_flags
searchers package.searchers (table)\nA table used by `require` to control how to load 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 parameter.\nThe function can return another function (the module *loader*) plus an\nextra value that will be passed to that loader, or a string explaining why\nit did not find that module (or nil if it has nothing to say).\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 prefix up to (and including) the first hyphen is removed. For instance,\nif the module name is `a.v1-b.c`, the function name will be `luaopen_b_c`.\nThe fourth searcher tries an *all-in-one loader*. It searches the C\npath for a library for the root name of the given module. For instance,\nwhen requiring `a.b.c`, it will search for a C library for `a`. If found,\nit looks into it for an open function for the submodule; in our example,\nthat would be `luaopen_a_b_c`. With this facility, a package can pack\nseveral C submodules into one single library, with each submodule keeping\nits original open function.\nAll searchers except the first one (preload) return as the extra value the\nfile name where the module was found, as returned by `package.searchpath`.\nThe first searcher returns no extra value.
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.)
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.
@@ -1471,7 +1471,7 @@ set_buffer_properties _M.lua.set_buffer_properties()\nSets default buffer proper
set_buffer_properties _M.php.set_buffer_properties()\nSets default buffer properties for PHP files.
set_buffer_properties _M.python.set_buffer_properties()\nSets default buffer properties for Python files.
set_buffer_properties _M.ruby.set_buffer_properties()\nSets default buffer properties for Ruby files.
-set_chars_default buffer.set_chars_default(buffer)\nReset the set of characters for whitespace and word characters to the\ndefaults.\nThis sets whitespace to space, tab and other characters with codes less than\n0x20, with word characters set to alphanumeric and `'_'`.\n@param buffer The global buffer.
+set_chars_default buffer.set_chars_default(buffer)\nReset the set of characters for whitespace and word characters to the\ndefaults.\nThis sets whitespace to space, tab and other characters with codes less than\n0x20, with word characters set to alphanumeric and '_'.\n@param buffer The global buffer.
set_contextmenu _M.textadept.menu.set_contextmenu(menu_table)\nSets `gui.context_menu` from the given menu table.\n@param menu_table The menu table to create the context menu from. The menu is\n an ordered list of menu entries and, if applicable, has a `title` key for\n the submenu title. Menu entries are either submenus of the same form as\n menus, or tables containing menu text and either a function to call or a\n table containing the function to call with its parameters.\n@see gui.context_menu\n@see gui.menu
set_empty_selection buffer.set_empty_selection(buffer, pos)\nSet caret to a position, while removing any existing selection.\nThe caret is not scrolled into view.\n@param buffer The buffer\n@param pos The position to move to.
set_encoding buffer.set_encoding(buffer, encoding)\nSets the encoding for the buffer, converting its contents in the process.\n@param buffer The global buffer.\n@param encoding The encoding to set. Valid encodings are ones that GNU iconv\n accepts.\n@usage buffer.set_encoding(buffer, 'ASCII')
@@ -1479,7 +1479,7 @@ set_fold_margin_colour buffer.set_fold_margin_colour(buffer, use_setting, color)
set_fold_margin_hi_colour buffer.set_fold_margin_hi_colour(buffer, use_setting, color)\nSet the colors used as a checkerboard pattern in the fold margin.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in "0xBBGGRR" format.
set_hotspot_active_back buffer.set_hotspot_active_back(buffer, use_setting, color)\nSet a back color for active hotspots.\n@param buffer The global buffer.\n@param use_setting Enable the color change.\n@param color A color in "0xBBGGRR" format.
set_hotspot_active_fore buffer.set_hotspot_active_fore(buffer, use_setting, color)\nSet a fore color for active hotspots.\n@param buffer The global buffer.\n@param use_setting Enable the color change.\n@param color A color in "0xBBGGRR" format.
-set_length_for_encode buffer.set_length_for_encode(buffer, bytes)\nSet the length of the utf8 argument for calling `buffer:encoded_from_utf8()`.\n@param buffer The global buffer.\n@param bytes Bytes or `-1` for measuring to first NUL.
+set_length_for_encode buffer.set_length_for_encode(buffer, bytes)\nSet the length of the utf8 argument for calling `buffer:encoded_from_utf8()`.\n@param buffer The global buffer.\n@param bytes Bytes or `-1` for measuring to first null byte.
set_lexer buffer.set_lexer(buffer, lang)\nReplacement for `buffer.lexer_language =`.\nSets a `buffer._lexer` field so it can be restored without querying the\nmime-types tables. Also if the user manually sets the lexer, it should be\nrestored.\nLoads the language-specific module if it exists.\nThis function is added by `_M.textadept.mime_types`.\n@param buffer The global buffer.\n@param lang The string language to set.\n@usage buffer.set_lexer(buffer, 'language_name')
set_menubar _M.textadept.menu.set_menubar(menubar)\nSets `gui.menubar` from the given table of menus.\n@param menubar The table of menus to create the menubar from. Each menu is\n an ordered list of menu entries and has a `title` key for the menu/submenu\n title. Menu entries are either submenus of the same form as menus, or\n tables containing menu text and either a function to call or a table\n containing the function to call with its parameters.\n@see gui.menubar\n@see gui.menu
set_save_point buffer.set_save_point(buffer)\nRemember the current position in the undo history as the position at which\nthe document was saved.\n@param buffer The global buffer.
@@ -1490,11 +1490,11 @@ set_selection buffer.set_selection(buffer, caret, anchor)\nSet a simple selectio
set_styling buffer.set_styling(buffer, length, style)\nChange style from current styling position for length characters to a style\nand move the current styling position to after this newly styled segment.\n@param buffer The global buffer.\n@param length The length to style.\n@param style The style number to set.
set_text buffer.set_text(buffer, text)\nReplace the contents of the document with the argument text.\n@param buffer The global buffer.\n@param text The text.
set_theme gui.set_theme(name)\nSets the editor theme from the given name.\nThemes with the given name in the *`_USERHOME`/themes/* directory override\nthemes of the same name in *`_HOME`/themes/*. If the name contains slashes\n('\' on Windows, '/' otherwise), it is assumed to be an absolute path to a\ntheme instead of a theme name. An error is thrown if the theme is not found.\nAny errors in the theme are printed to `io.stderr`. Running Textadept from a\nterminal is the easiest way to see errors as they occur.\n@param name The name or absolute path of a theme. If `nil`, sets the default\n theme.
-set_visible_policy buffer.set_visible_policy(buffer, visible_policy, visible_slop)\nSet the way the display area is determined when a particular line is to be\nmoved to by `buffer:goto_line()`, etc.\nIt is similar in operation to `buffer:set_y_caret_policy()`.\n@param buffer The global buffer.\n@param visible_policy A combination of `_SCINTILLA.constants.VISIBLE_SLOP`,\n (0x01) and `_SCINTILLA.constants.VISIBLE_STRICT` (0x04).\n@param visible_slop The slop value.
+set_visible_policy buffer.set_visible_policy(buffer, visible_policy, visible_slop)\nSet the way the display area is determined when a particular line is to be\nmoved to by `buffer:goto_line()`, etc.\nIt is similar in operation to `buffer:set_y_caret_policy()`.\n@param buffer The global buffer.\n@param visible_policy A combination of `_SCINTILLA.constants.VISIBLE_SLOP`\n (0x01) and `_SCINTILLA.constants.VISIBLE_STRICT` (0x04).\n@param visible_slop The slop value.
set_whitespace_back buffer.set_whitespace_back(buffer, use_setting, color)\nSet the background color of all whitespace and whether to use this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in "0xBBGGRR" format.
set_whitespace_fore buffer.set_whitespace_fore(buffer, use_setting, color)\nSet the foreground color of all whitespace and whether to use this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in "0xBBGGRR" format.
-set_x_caret_policy buffer.set_x_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the caret is kept visible when going sideways.\nThe exclusion zone is given in pixels.\n@param buffer The global buffer.\n@param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP`\n (0x01), `_SCINTILLA.constants.CARET_STRICT` (0x04),\n `_SCINTILLA.constants.CARET_JUMPS` (0x10), and\n `_SCINTILLA.constants.CARET_EVEN` (0x08).\n@param caret_slop A slop value.
-set_y_caret_policy buffer.set_y_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the line the caret is on is kept visible.\n@param buffer The global buffer.\n@param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP`\n (0x01), `_SCINTILLA.constants.CARET_STRICT` (0x04),\n `_SCINTILLA.constants.CARET_JUMPS` (0x10), and\n `_SCINTILLA.constants.CARET_EVEN` (0x08).\n@param caret_slop A slop value.
+set_x_caret_policy buffer.set_x_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the caret is kept visible when going sideways.\nThe exclusion zone is given in pixels.\n@param buffer The global buffer.\n@param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP`\n (0x01), `_SCINTILLA.constants.CARET_STRICT` (0x04),\n `_SCINTILLA.constants.CARET_EVEN` (0x08), and\n `_SCINTILLA.constants.CARET_JUMPS` (0x10).\n@param caret_slop A slop value.
+set_y_caret_policy buffer.set_y_caret_policy(buffer, caret_policy, caret_slop)\nSet the way the line the caret is on is kept visible.\n@param buffer The global buffer.\n@param caret_policy A combination of `_SCINTILLA.constants.CARET_SLOP`\n (0x01), `_SCINTILLA.constants.CARET_STRICT` (0x04),\n `_SCINTILLA.constants.CARET_EVEN` (0x08), and\n `_SCINTILLA.constants.CARET_JUMPS` (0x10).\n@param caret_slop A slop value.
sethook debug.sethook([thread, ] hook, mask [, count])\nSets the given function as a hook. The string `mask` and the number\n`count` describe when the hook will be called. The string mask may have\nthe 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\nWith a `count` different from zero, the hook is called 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\nthe event that has triggered its call: `"call"` (or `"tail call"`),\n`"return"`, `"line"`, and `"count"`. For line events, the hook also gets the\nnew line number as its second parameter. Inside a hook, you can call\n`getinfo` with level 2 to get more information about the running function\n(level 0 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\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.
@@ -1518,7 +1518,7 @@ snapopen _M.textadept.snapopen (module)\nQuickly open files in a set of director
snippets _G.snippets (table)\nTable of snippet triggers with their snippet text.\nLanguage-specific snippets are in another table value whose key is the\nlanguage's lexer name.\nThis table also contains the `_M.textadept.snippets` module.
snippets _M.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.
-space lexer.space (pattern)\nMatches any whitespace character (`\t`, `\v`, `\f`, `\n`, `\r`, space).
+space lexer.space (pattern)\nMatches any whitespace character ("\t", "\v", "\f", "\n", "\r", ' ').
split view.split(view, vertical)\nSplits the given view vertically or horizontally and focuses the new view.\nEmits a `VIEW_NEW` event.\n@param view The view to split.\n@param vertical Flag indicating a vertical split. The default value is\n `false` for horizontal.\n@return old view and new view.\n@see events.VIEW_NEW
sqrt math.sqrt(x)\nReturns the square root of `x`. (You can also use the expression `x^0.5`\nto compute this value.)
start_record buffer.start_record(buffer)\nStart notifying the container of all key presses and commands.\n@param buffer The global buffer.
@@ -1629,7 +1629,7 @@ undo_collection buffer.undo_collection (bool)\nWhether to collect undo informati
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 table.unpack(list [, i [, j]])\nReturns the elements from the given table. 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`.
unsplit view.unsplit(view)\nUnsplits the given view if possible.\n@param view The view to unsplit.\n@return boolean if the view was unsplit or not.
-upper lexer.upper (pattern)\nMatches any uppercase character (`A-Z`).
+upper lexer.upper (pattern)\nMatches any upper case character ('A' to 'Z').
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.
upper_case buffer.upper_case(buffer)\nTransform the selection to upper case.\n@param buffer The global buffer.
upvalueid debug.upvalueid(f, n)\nReturns an 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.
@@ -1685,7 +1685,7 @@ wrap_visual_flags_location buffer.wrap_visual_flags_location (number)\nThe locat
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.
write io.write(···)\nEquivalent to `io.output():write(···)`.
x_offset buffer.x_offset (number)\nThe horizontal scroll position.\nA value of `0` is the normal position with the first text column visible at\nthe left of the view.
-xdigit lexer.xdigit (pattern)\nMatches any hexadecimal digit (`0-9`, `A-F`, `a-f`).
+xdigit lexer.xdigit (pattern)\nMatches any hexadecimal digit ('0' to '9', 'A' to 'F', 'a' to 'f').
xor bit32.xor(...)\nReturns the bitwise "exclusive or" of its operands.
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`.