aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/cpp/init.lua6
-rw-r--r--modules/lua/adeptsensedoc.lua14
-rw-r--r--modules/lua/api323
-rw-r--r--modules/lua/init.lua4
-rw-r--r--modules/lua/tags34
-rw-r--r--modules/textadept/adeptsense.lua26
-rw-r--r--modules/textadept/bookmarks.lua2
-rw-r--r--modules/textadept/editing.lua15
-rw-r--r--modules/textadept/keys.lua14
-rw-r--r--modules/textadept/mime_types.lua8
-rw-r--r--modules/textadept/session.lua4
-rw-r--r--modules/textadept/snapopen.lua2
-rw-r--r--modules/textadept/snippets.lua10
13 files changed, 246 insertions, 216 deletions
diff --git a/modules/cpp/init.lua b/modules/cpp/init.lua
index 7610e6bf..f4f37127 100644
--- a/modules/cpp/init.lua
+++ b/modules/cpp/init.lua
@@ -18,11 +18,11 @@ local M = {}
-- When to the right of a known symbol, show an autocompletion list of fields
-- and functions.
-- + `Shift+Enter` (`⇧↩` | `S-Enter`)
--- Add `;` to the end of the current line and insert a newline.
+-- Add ';' to the end of the current line and insert a newline.
-- @field sense
-- The C/C++ [Adeptsense](_M.textadept.adeptsense.html).
--- It loads user tags from `_USERHOME/modules/cpp/tags` and user apidocs from
--- `_USERHOME/modules/cpp/api`.
+-- It loads user tags from *`_USERHOME`/modules/cpp/tags* and user apidocs
+-- from *`_USERHOME`/modules/cpp/api*.
module('_M.cpp')]]
local m_editing, m_run = _M.textadept.editing, _M.textadept.run
diff --git a/modules/lua/adeptsensedoc.lua b/modules/lua/adeptsensedoc.lua
index c052b1b2..d70c7904 100644
--- a/modules/lua/adeptsensedoc.lua
+++ b/modules/lua/adeptsensedoc.lua
@@ -3,7 +3,7 @@
-- Adeptsense doclet for LuaDoc.
-- This module is used by LuaDoc to create an adeptsense for Lua with a fake
-- ctags file and an api file.
--- To preserve formatting, the included `luadoc.patch` file must be applied to
+-- To preserve formatting, the included *luadoc.patch* file must be applied to
-- your instance of LuaDoc. It will not affect the look of HTML web pages, only
-- the look of plain-text Adeptsense api files.
-- Since LuaDoc does not recognize module fields, this doclet parses the Lua
@@ -29,14 +29,16 @@ local function write_tag(file, name, k, ext_fields)
file[#file + 1] = string_format(CTAGS_FMT, name, k, ext_fields)
end
--- Strips Markdown links from the given documentation string.
--- @param s String to strip Markdown links from.
+-- Sanitizes Markdown from the given documentation string by stripping links and
+-- replacing HTML entities.
+-- @param s String to sanitize Markdown from.
-- @return string
-local function strip_markdown_links(s)
+local function sanitize_markdown(s)
return s:gsub('%[([^%]\r\n]+)%]%b[]', '%1') -- [foo][]
:gsub('%[([^%]\r\n]+)%]%b()', '%1') -- [foo](bar)
:gsub('\r?\n\r?\n%[([^%]\r\n]+)%]:[^\r\n]+', '') -- [foo]: bar
:gsub('\r?\n%[([^%]\r\n]+)%]:[^\r\n]+', '') -- [foo]: bar
+ :gsub('&([%a]+);', { quot = '"', apos = "'" })
end
-- Writes a function or field apidoc.
@@ -74,12 +76,12 @@ local function write_apidoc(file, m, b)
indent, description = description:match('^(%s*)(.*)$')
if indent ~= '' then description = description:gsub('\n'..indent, '\n') end
end
- doc[#doc + 1] = strip_markdown_links(description)
+ doc[#doc + 1] = sanitize_markdown(description)
-- Function parameters (@param).
if class == 'function' and b.param then
for _, p in ipairs(b.param) do
if b.param[p] and #b.param[p] > 0 then
- doc[#doc + 1] = '@param '..p..' '..strip_markdown_links(b.param[p])
+ doc[#doc + 1] = '@param '..p..' '..sanitize_markdown(b.param[p])
end
end
end
diff --git a/modules/lua/api b/modules/lua/api
index ad20c314..1eb385cf 100644
--- a/modules/lua/api
+++ b/modules/lua/api
@@ -3,7 +3,7 @@ ANNOTATION_HIDDEN _SCINTILLA.constants.ANNOTATION_HIDDEN\n0
ANNOTATION_STANDARD _SCINTILLA.constants.ANNOTATION_STANDARD\n1
APPLEEVENT_ODOC events.APPLEEVENT_ODOC (string)\nCalled when Mac OSX tells Textadept to open a document.\nArguments:\n\n* `uri`: The URI to open encoded in UTF-8.
AUTOINDENT _M.textadept.editing.AUTOINDENT (bool)\nMatch the indentation level of the previous line when pressing the `Enter`\n(`↩` on Mac OSX | `Enter` in ncurses) key.\nThe default value is `true`.
-AUTOPAIR _M.textadept.editing.AUTOPAIR (bool)\nOpening `(`, `[`, `{`, `"`, or `'` characters are automatically closed.\nThe default value is `true`.\nAuto-paired characters are defined in the `char_matches`\ntable.
+AUTOPAIR _M.textadept.editing.AUTOPAIR (bool)\nOpening '(', '[', '{', '"', or ''' characters are automatically\nclosed.\nThe default value is `true`.\nAuto-paired characters are defined in the `char_matches`\ntable.
AUTO_C_CHAR_DELETED events.AUTO_C_CHAR_DELETED (string)\nCalled when the user deleted a character while the autocompletion list was\nactive.
AUTO_C_RELEASE events.AUTO_C_RELEASE (string)\nCalled when the user has cancelled the autocompletion list.
AUTO_C_SELECTION events.AUTO_C_SELECTION (string)\nCalled when the user has selected an item in an autocompletion list and\nbefore the selection is inserted.\nAutomatic insertion can be cancelled by calling\n`buffer:auto_c_cancel()` before returning from the event handler.\nArguments:\n\n* `text`: The text of the selection.\n* `position`: The start position of the word being completed.
@@ -22,13 +22,13 @@ CARET_SLOP _SCINTILLA.constants.CARET_SLOP\n1
CARET_STRICT _SCINTILLA.constants.CARET_STRICT\n4
CHAR_ADDED events.CHAR_ADDED (string)\nCalled when an ordinary text character is added to the buffer.\nArguments:\n\n* `ch`: The text character byte.
CLASS _M.textadept.adeptsense.CLASS (string)\nCtags kind for Adeptsense classes.
-CLASS lexer.CLASS\nToken type for class tokens.
+CLASS lexer.CLASS (string)\nToken name for class tokens.
CLEAR keys.CLEAR (string)\nThe string representing the key sequence that clears the current key chain.\nIt cannot be part of a key chain.\nThe default value is `'esc'` for the `Esc` (`⎋` on Mac OSX | `Esc` in\nncurses) key.
COMMAND_ENTRY_COMMAND events.COMMAND_ENTRY_COMMAND (string)\nCalled when a command is entered into the Command Entry.\nIf any handler returns `true`, the Command Entry does not hide\nautomatically.\nArguments:\n\n* `command`: The command text.
COMMAND_ENTRY_KEYPRESS events.COMMAND_ENTRY_KEYPRESS (string)\nCalled when a key is pressed in the Command Entry.\nIf any handler returns `true`, the key is not inserted into the entry.\nArguments:\n\n* `code`: The key code.\n* `shift`: The Shift key is held down.\n* `ctrl`: The Control/Command key is held down.\n* `alt`: The Alt/option key is held down.\n* `meta`: The Control key on Mac OSX is held down.
-COMMENT lexer.COMMENT\nToken type for comment tokens.
-COMPILE_OUTPUT events.COMPILE_OUTPUT\nCalled after a compile command is executed.\nBy default, compiler output is printed to the message buffer. To override\nthis behavior, connect to the event with an index of `1` and return `true`.\nArguments:\n * `lexer`: The lexer language.\n * `output`: The output from the command.
-CONSTANT lexer.CONSTANT\nToken type for constant tokens.
+COMMENT lexer.COMMENT (string)\nToken name for comment tokens.
+COMPILE_OUTPUT _M.textadept.run._G.events.COMPILE_OUTPUT (string)\nCalled after a compile command is executed.\nBy default, compiler output is printed to the message buffer. To override\nthis behavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `lexer`: The lexer language.\n* `output`: The output from the command.
+CONSTANT lexer.CONSTANT (string)\nToken name for constant tokens.
Carg lpeg.Carg(n)\nCreates an argument capture. This pattern matches the empty string and\nproduces the value given as the nth extra argument given in the call to\nlpeg.match.
Cb lpeg.Cb(name)\nCreates a back capture. This pattern matches the empty string and produces\nthe values produced by the most recent group capture named name.\n\nMost recent means the last complete outermost group capture with the given\nname. A Complete capture means that the entire pattern corresponding to the\ncapture has matched. An Outermost capture means that the capture is not\ninside another complete capture.
Cc lpeg.Cc([value, ...])\nCreates a constant capture. This pattern matches the empty string and\nproduces all given values as its captured values.
@@ -38,9 +38,9 @@ Cmt lpeg.Cmt(patt, function)\nCreates a match-time capture. Unlike all other cap
Cp lpeg.Cp()\nCreates a position capture. It matches the empty string and captures the\nposition in the subject where the match occurs. The captured value is a\nnumber.
Cs lpeg.Cs(patt)\nCreates a substitution capture, which captures the substring of the subject\nthat matches patt, with substitutions. For any capture inside patt with a\nvalue, the substring that matched the capture is replaced by the capture\nvalue (which should be a string). The final captured value is the string\nresulting from all replacements.
Ct lpeg.Ct(patt)\nCreates a table capture. This capture creates a table and puts all values\nfrom all anonymous captures made by patt inside this table in successive\ninteger keys, starting at 1. Moreover, for each named capture group created\nby patt, the first value of the group is put into the table with the group\nname as its key. The captured value is only the table.
-DEFAULT lexer.DEFAULT\nToken type for default tokens.
+DEFAULT lexer.DEFAULT (string)\nToken name for default tokens.
DEFAULT_DEPTH _M.textadept.snapopen.DEFAULT_DEPTH (number)\nMaximum directory depth to search.\nThe default value is `99`.
-DEFAULT_SESSION _M.textadept.session.DEFAULT_SESSION (string)\nThe path to the default session file.\nThe default value is `_USERHOME/session`, or `_USERHOME/session_term` if\n`_G.NCURSES` is `true`.
+DEFAULT_SESSION _M.textadept.session.DEFAULT_SESSION (string)\nThe path to the default session file.\nThe default value is *`_USERHOME`/session*, or *`_USERHOME`/session_term*\nif `_G.NCURSES` is `true`.
DOUBLE_CLICK events.DOUBLE_CLICK (string)\nCalled when the mouse button is double-clicked.\nArguments:\n\n* `position`: The text position of the double click.\n* `line`: The line of the double click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+.
DWELL_END events.DWELL_END (string)\nCalled after a `DWELL_START` and the mouse is moved or other activity such\nas key press indicates the dwell is over.\nArguments:\n\n* `position`: The nearest position in the document to the position where\n the mouse pointer was lingering.\n* `x`: Where the pointer lingered.\n* `y`: Where the pointer lingered.
DWELL_START events.DWELL_START (string)\nCalled when the user keeps the mouse in one position for the dwell period\n(see `_SCINTILLA.constants.SCI_SETMOUSEDWELLTIME`).\nArguments:\n\n* `position`: The nearest position in the document to the position where\n the mouse pointer was lingering.\n* `x`: Where the pointer lingered.\n* `y`: Where the pointer lingered.
@@ -48,23 +48,24 @@ EDGE_BACKGROUND _SCINTILLA.constants.EDGE_BACKGROUND\n2
EDGE_LINE _SCINTILLA.constants.EDGE_LINE\n1
EDGE_NONE _SCINTILLA.constants.EDGE_NONE\n0
ERROR events.ERROR (string)\nCalled when an error occurs.\nArguments:\n\n* `text`: The error text.
-ERROR lexer.ERROR\nToken type for error tokens.
+ERROR lexer.ERROR (string)\nToken name for error tokens.
FIELD _M.textadept.adeptsense.FIELD (string)\nCtags kind for Adeptsense fields.
FIELDS _M.textadept.adeptsense.FIELDS (string)\nXPM image for Adeptsense fields.
-FILE_AFTER_SAVE events.FILE_AFTER_SAVE\nCalled right after a file is saved to disk.\nThis is emitted by `buffer:save()`\nArguments:\n * `filename`: The filename encoded in UTF-8.
-FILE_BEFORE_SAVE events.FILE_BEFORE_SAVE\nCalled right before a file is saved to disk.\nThis is emitted by `buffer:save()`\nArguments:\n * `filename`: The filename encoded in UTF-8.
-FILE_OPENED events.FILE_OPENED\nCalled when a file is opened in a new buffer.\nThis is emitted by `open_file()`\nArguments:\n * `filename`: The filename encoded in UTF-8.
-FILE_SAVED_AS events.FILE_SAVED_AS\nCalled when a file is saved under a different filename.\nThis is emitted by `buffer:save_as()`\nArguments:\n * `filename`: The filename encoded in UTF-8.
+FILE_AFTER_SAVE io._G.events.FILE_AFTER_SAVE (string)\nCalled right after a file is saved to disk.\nThis is emitted by `buffer:save()`\nArguments:\n\n* `filename`: The filename encoded in UTF-8.
+FILE_BEFORE_SAVE io._G.events.FILE_BEFORE_SAVE (string)\nCalled right before a file is saved to disk.\nThis is emitted by `buffer:save()`\nArguments:\n\n* `filename`: The filename encoded in UTF-8.
+FILE_OPENED io._G.events.FILE_OPENED (string)\nCalled when a file is opened in a new buffer.\nThis is emitted by `open_file()`\nArguments:\n\n* `filename`: The filename encoded in UTF-8.
+FILE_SAVED_AS io._G.events.FILE_SAVED_AS (string)\nCalled when a file is saved under a different filename.\nThis is emitted by `buffer:save_as()`\nArguments:\n\n* `filename`: The filename encoded in UTF-8.
FILTER _M.textadept.snapopen.FILTER (table)\nDefault file and directory filters.\nContains common binary file extensions and version control folders.
FIND events.FIND (string)\nCalled when finding text via the Find dialog box.\nArguments:\n\n* `text`: The text to search for.\n* `next`: Search forward.
+FIND_WRAPPED gui.find._G.events.FIND_WRAPPED (string)\nCalled when a search for text wraps, either from bottom to top when\nsearching for a next occurrence, or from top to bottom when searching for a\nprevious occurrence.\nThis is useful for implementing a more visual or audible notice when a\nsearch wraps in addition to the statusbar message.
FUNCTION _M.textadept.adeptsense.FUNCTION (string)\nCtags kind for Adeptsense functions.
-FUNCTION lexer.FUNCTION\nToken type for function toeksn.
+FUNCTION lexer.FUNCTION (string)\nToken name for function tokens.
FUNCTIONS _M.textadept.adeptsense.FUNCTIONS (string)\nXPM image for Adeptsense functions.
-HIGHLIGHT_BRACES _M.textadept.editing.HIGHLIGHT_BRACES (bool)\nHighlight matching `()[]{}` characters.\nThe default value is `true`.\nMatching braces are defined in the `braces` table.
+HIGHLIGHT_BRACES _M.textadept.editing.HIGHLIGHT_BRACES (bool)\nHighlight matching "()[]{}" characters.\nThe default value is `true`.\nMatching braces are defined in the `braces` table.
HOTSPOT_CLICK events.HOTSPOT_CLICK (string)\nCalled when the user clicks on text that is in a style with the hotspot\nattribute set.\nArguments:\n\n* `position`: The text position of the click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+.
HOTSPOT_DOUBLE_CLICK events.HOTSPOT_DOUBLE_CLICK (string)\nCalled when the user double clicks on text that is in a style with the\nhotspot attribute set.\nArguments:\n\n* `position`: The text position of the double click.\n* `modifiers`: The key modifiers held down. It is a combination of zero or\n more of `_SCINTILLA.constants.SCMOD_ALT`,\n `_SCINTILLA.constants.SCMOD_CTRL`,\n `_SCINTILLA.constants.SCMOD_SHIFT`, and\n `_SCINTILLA.constants.SCMOD_META`.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+.
HOTSPOT_RELEASE_CLICK events.HOTSPOT_RELEASE_CLICK (string)\nCalled when the user releases the mouse on text that is in a style with the\nhotspot attribute set.\nArguments:\n\n* `position`: The text position of the release.
-IDENTIFIER lexer.IDENTIFIER\nToken type for identifier tokens.
+IDENTIFIER lexer.IDENTIFIER (string)\nToken name for identifier tokens.
INDIC0_MASK _SCINTILLA.constants.INDIC0_MASK\n32
INDIC1_MASK _SCINTILLA.constants.INDIC1_MASK\n64
INDIC2_MASK _SCINTILLA.constants.INDIC2_MASK\n128
@@ -79,7 +80,7 @@ INDIC_DOTBOX _SCINTILLA.constants.INDIC_DOTBOX\n12
INDIC_DOTS _SCINTILLA.constants.INDIC_DOTS\n10
INDIC_HIDDEN _SCINTILLA.constants.INDIC_HIDDEN\n5
INDIC_HIGHLIGHT_ALPHA _M.textadept.editing.INDIC_HIGHLIGHT_ALPHA (number)\nThe alpha transparency value between `0` (transparent) and `255` (opaque)\nused for an indicator for a highlighted word.\nThe default value is `100`.
-INDIC_HIGHLIGHT_BACK _M.textadept.editing.INDIC_HIGHLIGHT_BACK (number)\nThe color used for an indicator for a highlighted word\nin `0xBBGGRR` format.
+INDIC_HIGHLIGHT_BACK _M.textadept.editing.INDIC_HIGHLIGHT_BACK (number)\nThe color used for an indicator for a highlighted word\nin "0xBBGGRR" format.
INDIC_MAX _SCINTILLA.constants.INDIC_MAX\n31
INDIC_PLAIN _SCINTILLA.constants.INDIC_PLAIN\n0
INDIC_ROUNDBOX _SCINTILLA.constants.INDIC_ROUNDBOX\n7
@@ -91,35 +92,35 @@ 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 key is held down.\n* `ctrl`: The Control/Command key is held down.\n* `alt`: The Alt/option key is held down.\n* `meta`: The Control 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`
-KEYWORD lexer.KEYWORD\nToken type for keyword tokens.
+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*
+KEYWORD lexer.KEYWORD (string)\nToken name for keyword tokens.
KEYWORDSET_MAX _SCINTILLA.constants.KEYWORDSET_MAX\n8
-LABEL lexer.LABEL\nToken type for label tokens.
-LANGUAGE_MODULE_LOADED events.LANGUAGE_MODULE_LOADED\nCalled after loading a language-specific module.\nThis is useful for overriding a language-specific module's key bindings\nor other properties since the module is not loaded when Textadept starts.\nArguments:\n * `lang`: The language lexer name.
+LABEL lexer.LABEL (string)\nToken name for label tokens.
+LANGUAGE_MODULE_LOADED _M.textadept.mime_types._G.events.LANGUAGE_MODULE_LOADED (string)\nCalled after loading a language-specific module.\nThis is useful for overriding a language-specific module's key bindings\nor other properties since the module is not loaded when Textadept starts.\nArguments:\n\n* `lang`: The language lexer name.
LANGUAGE_MODULE_PREFIX keys.LANGUAGE_MODULE_PREFIX (string)\nThe starting key command of the key chain reserved for language-specific\nmodules.\nThe default value is `Ctrl+L` (`⌘L` on Mac OSX | `M-L` in ncurses).
MARGIN_CLICK events.MARGIN_CLICK (string)\nCalled when the mouse is clicked inside a margin.\nArguments:\n\n* `margin`: The margin number that was clicked.\n* `position`: The position of the start of the line in the buffer that\n corresponds to the margin click.\n* `modifiers`: The appropriate combination of\n `_SCINTILLA.constants.SCI_SHIFT`, `_SCINTILLA.constants.SCI_CTRL`,\n and `_SCINTILLA.constants.SCI_ALT` to indicate the keys that were held\n down at the time of the margin click.\n Note: If you set `buffer.rectangular_selection_modifier` to\n `_SCINTILLA.constants.SCMOD_CTRL`, the Ctrl key is reported as *both*\n Ctrl and Alt due to a Scintilla limitation with GTK+.
MARKER_MAX _SCINTILLA.constants.MARKER_MAX\n31
-MARK_BOOKMARK_COLOR _M.textadept.bookmarks.MARK_BOOKMARK_COLOR (number)\nThe color used for a bookmarked line in `0xBBGGRR` format.
-MARK_HIGHLIGHT_BACK _M.textadept.editing.MARK_HIGHLIGHT_BACK (number)\nThe background color used for a line containing a\nhighlighted word in `0xBBGGRR` format.
+MARK_BOOKMARK_COLOR _M.textadept.bookmarks.MARK_BOOKMARK_COLOR (number)\nThe color used for a bookmarked line in "0xBBGGRR" format.
+MARK_HIGHLIGHT_BACK _M.textadept.editing.MARK_HIGHLIGHT_BACK (number)\nThe background color used for a line containing a\nhighlighted word in "0xBBGGRR" format.
MAX _M.textadept.snapopen.MAX (number)\nMaximum number of files to list.\nThe default value is `1000`.
MAX_RECENT_FILES _M.textadept.session.MAX_RECENT_FILES (number)\nThe maximum number of files from `io.recent_files` to save to the\nsession.\nThe default value is `10`.
MENU_CLICKED events.MENU_CLICKED (string)\nCalled when a menu item is selected.\nArguments:\n\n* `menu_id`: The numeric ID of the menu item set in `gui.menu()`.
NCURSES _G.NCURSES (bool)\nIf Textadept is running in the terminal, this flag is `true`.\nncurses feature incompatibilities are listed in the Appendix.
-NUMBER lexer.NUMBER\nToken type for number tokens.
-OPERATOR lexer.OPERATOR\nToken type for operator tokens.
+NUMBER lexer.NUMBER (string)\nToken name for number tokens.
+OPERATOR lexer.OPERATOR (string)\nToken name for operator tokens.
OSX _G.OSX (bool)\nIf Textadept is running on Mac OSX, this flag is `true`.
P lpeg.P(value)\nConverts the given value into a proper pattern, according to the following\nrules:\n * If the argument is a pattern, it is returned unmodified.\n * If the argument is a string, it is translated to a pattern that matches\n literally the string.\n * If the argument is a non-negative number n, the result is a pattern that\n matches exactly n characters.\n * If the argument is a negative number -n, the result is a pattern that\n succeeds only if the input string does not have n characters: lpeg.P(-n)\n is equivalent to -lpeg.P(n) (see the unary minus operation).\n * If the argument is a boolean, the result is a pattern that always\n succeeds or always fails (according to the boolean value), without\n consuming any input.\n * If the argument is a table, it is interpreted as a grammar (see\n Grammars).\n * If the argument is a function, returns a pattern equivalent to a\n match-time capture over the empty string.
PATHS _M.textadept.snapopen.PATHS (table)\nTable of default UTF-8 paths to search.
-PREPROCESSOR lexer.PREPROCESSOR\nToken type for preprocessor tokens.
+PREPROCESSOR lexer.PREPROCESSOR (string)\nToken name for preprocessor tokens.
QUIT events.QUIT (string)\nCalled when quitting Textadept.\nWhen connecting to this event, connect with an index of 1 or the handler\nwill be ignored.\nThis is emitted by `quit()`.
R lpeg.R({range})\nReturns a pattern that matches any single character belonging to one of the\ngiven ranges. Each range is a string xy of length 2, representing all\ncharacters with code between the codes of x and y (both inclusive).\n\nAs an example, the pattern lpeg.R("09") matches any digit, and lpeg.R("az",\n"AZ") matches any ASCII letter.
-REGEX lexer.REGEX\nToken type for regex tokens.
+REGEX lexer.REGEX (string)\nToken name for regex tokens.
REPLACE events.REPLACE (string)\nCalled to replace selected (found) text.\nArguments:\n\n* `text`: The text to replace selected text with.
REPLACE_ALL events.REPLACE_ALL (string)\nCalled to replace all occurances of found text.\nArguments:\n\n* `find_text`: The text to search for.\n* `repl_text`: The text to replace found text with.
RESETTING _G.RESETTING (bool)\nIf `reset()` has been called, this flag is `true` while the Lua\nstate is being re-initialized.
RESET_AFTER events.RESET_AFTER (string)\nCalled after resetting the Lua state.\nThis is emitted by `reset()`.
RESET_BEFORE events.RESET_BEFORE (string)\nCalled before resetting the Lua state.\nThis is emitted by `reset()`.
-RUN_OUTPUT events.RUN_OUTPUT\nCalled after a run command is executed.\nBy default, output is printed to the message buffer. To override this\nbehavior, connect to the event with an index of `1` and return `true`.\nArguments:\n * `lexer`: The lexer language.\n * `output`: The output from the command.
+RUN_OUTPUT _M.textadept.run._G.events.RUN_OUTPUT (string)\nCalled after a run command is executed.\nBy default, output is printed to the message buffer. To override this\nbehavior, connect to the event with an index of `1` and return `true`.\nArguments:\n\n* `lexer`: The lexer language.\n* `output`: The output from the command.
S lpeg.S(string)\nReturns a pattern that matches any single character that appears in the given\nstring. (The S stands for Set.)\n\nAs an example, the pattern lpeg.S("+-*/") matches any arithmetic operator.\n\nNote that, if s is a character (that is, a string of length 1), then\nlpeg.P(s) is equivalent to lpeg.S(s) which is equivalent to lpeg.R(s..s).\nNote also that both lpeg.S("") and lpeg.R() are patterns that always fail.
SAVE_ON_QUIT _M.textadept.session.SAVE_ON_QUIT (bool)\nSave the session when quitting.\nThe default value is `true`, but can be disabled by passing the command\nline switch `-n` or `--nosession` to Textadept.
SAVE_POINT_LEFT events.SAVE_POINT_LEFT (string)\nCalled when a save point is left.
@@ -604,13 +605,13 @@ SC_FOLDFLAG_LINEAFTER_EXPANDED _SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_EXPAND
SC_FOLDFLAG_LINEBEFORE_CONTRACTED _SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_CONTRACTED\n4
SC_FOLDFLAG_LINEBEFORE_EXPANDED _SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_EXPANDED\n2
SC_FOLDLEVELBASE _SCINTILLA.constants.SC_FOLDLEVELBASE\n1024
-SC_FOLDLEVELBASE lexer.SC_FOLDLEVELBASE\nThe initial (root) fold level.
+SC_FOLDLEVELBASE lexer.SC_FOLDLEVELBASE (number)\nThe initial (root) fold level.
SC_FOLDLEVELHEADERFLAG _SCINTILLA.constants.SC_FOLDLEVELHEADERFLAG\n8192
-SC_FOLDLEVELHEADERFLAG lexer.SC_FOLDLEVELHEADERFLAG\nFlag indicating the line is fold point.
+SC_FOLDLEVELHEADERFLAG lexer.SC_FOLDLEVELHEADERFLAG (number)\nFlag indicating the line is fold point.
SC_FOLDLEVELNUMBERMASK _SCINTILLA.constants.SC_FOLDLEVELNUMBERMASK\n4095
-SC_FOLDLEVELNUMBERMASK lexer.SC_FOLDLEVELNUMBERMASK\nFlag used with `SCI_GETFOLDLEVEL(line)` to get the fold level of a line.
+SC_FOLDLEVELNUMBERMASK lexer.SC_FOLDLEVELNUMBERMASK (number)\nFlag used with `SCI_GETFOLDLEVEL(line)` to get the fold level of a line.
SC_FOLDLEVELWHITEFLAG _SCINTILLA.constants.SC_FOLDLEVELWHITEFLAG\n4096
-SC_FOLDLEVELWHITEFLAG lexer.SC_FOLDLEVELWHITEFLAG\nFlag indicating that the line is blank.
+SC_FOLDLEVELWHITEFLAG lexer.SC_FOLDLEVELWHITEFLAG (number)\nFlag indicating that the line is blank.
SC_FONT_SIZE_MULTIPLIER _SCINTILLA.constants.SC_FONT_SIZE_MULTIPLIER\n100
SC_IV_LOOKBOTH _SCINTILLA.constants.SC_IV_LOOKBOTH\n3
SC_IV_LOOKFORWARD _SCINTILLA.constants.SC_IV_LOOKFORWARD\n2
@@ -725,7 +726,7 @@ SC_WRAPVISUALFLAG_START _SCINTILLA.constants.SC_WRAPVISUALFLAG_START\n2
SC_WRAP_CHAR _SCINTILLA.constants.SC_WRAP_CHAR\n2
SC_WRAP_NONE _SCINTILLA.constants.SC_WRAP_NONE\n0
SC_WRAP_WORD _SCINTILLA.constants.SC_WRAP_WORD\n1
-STRING lexer.STRING\nToken type for string tokens.
+STRING lexer.STRING (string)\nToken name for string tokens.
STRIP_WHITESPACE_ON_SAVE _M.textadept.editing.STRIP_WHITESPACE_ON_SAVE (bool)\nStrip trailing whitespace on file save.\nThe default value is `true`.
STYLE_BRACEBAD _SCINTILLA.constants.STYLE_BRACEBAD\n35
STYLE_BRACELIGHT _SCINTILLA.constants.STYLE_BRACELIGHT\n34
@@ -736,57 +737,63 @@ STYLE_INDENTGUIDE _SCINTILLA.constants.STYLE_INDENTGUIDE\n37
STYLE_LASTPREDEFINED _SCINTILLA.constants.STYLE_LASTPREDEFINED\n39
STYLE_LINENUMBER _SCINTILLA.constants.STYLE_LINENUMBER\n33
STYLE_MAX _SCINTILLA.constants.STYLE_MAX\n255
-TYPE lexer.TYPE\nToken type for type tokens.
+TYPE lexer.TYPE (string)\nToken name for type tokens.
UNDO_MAY_COALESCE _SCINTILLA.constants.UNDO_MAY_COALESCE\n1
UPDATE_UI events.UPDATE_UI (string)\nCalled when either the text or styling of the buffer has changed or the\nselection range has changed.
URI_DROPPED events.URI_DROPPED (string)\nCalled when the user has dragged a URI such as a file name onto the view.\nArguments:\n\n* `text`: The URI text encoded in UTF-8.
USER_LIST_SELECTION events.USER_LIST_SELECTION (string)\nCalled when the user has selected an item in a user list.\nArguments:\n\n* `list_type`: This is set to the list_type parameter from the\n `buffer:user_list_show()` call that initiated the list.\n* `text`: The text of the selection.\n* `position`: The position the list was displayed at.
V lpeg.V(v)\nThis operation creates a non-terminal (a variable) for a grammar. The created\nnon-terminal refers to the rule indexed by v in the enclosing grammar. (See\nGrammars for details.)
-VARIABLE lexer.VARIABLE\nToken type for variable tokens.
+VARIABLE lexer.VARIABLE (string)\nToken name for variable tokens.
VIEW_AFTER_SWITCH events.VIEW_AFTER_SWITCH (string)\nCalled right after another view is switched to.\nThis is emitted by `gui.goto_view()`.
VIEW_BEFORE_SWITCH events.VIEW_BEFORE_SWITCH (string)\nCalled right before another view is switched to.\nThis is emitted by `gui.goto_view()`.
VIEW_NEW events.VIEW_NEW (string)\nCalled when a new view is created.\nThis is emitted on startup and by `view:split()`.
VISIBLE_SLOP _SCINTILLA.constants.VISIBLE_SLOP\n1
VISIBLE_STRICT _SCINTILLA.constants.VISIBLE_STRICT\n4
-WHITESPACE lexer.WHITESPACE\nToken type for whitespace tokens.
+WHITESPACE lexer.WHITESPACE (string)\nToken name for whitespace tokens.
WIN32 _G.WIN32 (bool)\nIf Textadept is running on Windows, this flag is `true`.
_BUFFERS _G._BUFFERS (table)\nTable of all open buffers in Textadept.\nNumeric keys have buffer values and buffer keys have their associated numeric\nkeys.\n@see _G.buffer
_CHARSET _G._CHARSET (string)\nThe character set encoding of the filesystem.\nThis is used when working with files.
-_EMBEDDEDRULES lexer._EMBEDDEDRULES (table)\nSet of rules for an embedded lexer.\nFor a parent lexer name, contains child's `start_rule`, `token_rule`, and\n`end_rule` patterns.
_EXISTS M._EXISTS(message)\nReturns whether or not a localized message exists for the given message.\nThis function is necessary since `_L[message]` never returns `nil`.\n@param message The message to localize.\n@return `true` if a localization exists, `false` otherwise.
_G _G._G (module)\nLua _G module.
_G _G._G (table)\nA global variable (not a function) that holds the global environment\n(see §2.2). Lua itself does not use this variable; changing its value does\nnot affect any environment, nor vice-versa.
_HOME _G._HOME (string)\nPath to the directory containing Textadept.
_L _G._L (module)\nTable of all messages used by Textadept for localization.\nIf the table does not contain the localized version of a given message, it\nreturns a string indicating so via a metamethod.
+_LEXBYLINE lexer.lexer._LEXBYLINE (table)\nA boolean that, when `true`, indicates the lexer matches\n text by whole lines instead of arbitrary chunks. The default is `false`.\n Line lexers cannot look ahead to subsequent lines.
_LEXERPATH _G._LEXERPATH (string)\nPaths to lexers, formatted like `package.path`.
_M _G._M (module)\nA table of loaded modules.
+_NAME lexer.lexer._NAME (table)\nThe string name of the lexer in lowercase.
_RELEASE _G._RELEASE (string)\nThe Textadept release version.
-_RULES lexer._RULES (table)\nList of rule names with associated LPeg patterns for a specific lexer.\nIt is accessible to other lexers for embedded lexer applications.
-_SCINTILLA _G._SCINTILLA (module)\nScintilla constants, functions, and properties.\nDo not modify anything in this module. Doing so will have unpredicable\nconsequences.
-_USERHOME _G._USERHOME (string)\nPath to the user's `~/.textadept/`, where all preferences and user-data is\nstored.\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.
+_RULES lexer.lexer._RULES (table)\nA table 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)\nPath to the user's *~/.textadept/*, where all preferences and user-data is\nstored.\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 contents of this variable is\n"`Lua 5.2`".
_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 _M.textadept.snippets._cancel_current()\nCancels the active snippet, reverting to the state before its activation, and\nrestores the previously running snippet (if any).
+_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.
+_foldsymbols lexer.lexer._foldsymbols (table)\nA table of recognized fold points for the lexer.\n Keys are token names with table values defining fold points. Those table\n values have string keys of keywords or characters that indicate a fold\n point whose values are integers. A value of `1` indicates a beginning fold\n point and a value of `-1` indicates an ending fold point. Values can also\n be functions that return `1`, `-1`, or `0` (indicating no fold point) for\n keys which need additional processing.\n There is also a required `_pattern` key whose value is a table containing\n Lua pattern strings that match all fold points (the string keys contained\n in token name table values). When the lexer encounters text that matches\n one of those patterns, the matched text is looked up in its token's table\n to determine whether or not it is a fold point.
_insert _M.textadept.snippets._insert(text)\nInserts a new snippet or goes to the next placeholder of the active snippet.\n@param text Optional snippet text. If `nil`, attempts to insert a new snippet\n based on the trigger, the word to the left of the caret, and the current\n lexer.\n@return `false` if no action was taken; `nil` otherwise.\n@see buffer.word_chars
+_lexer lexer.lexer._lexer (table)\nFor child lexers embedding themselves into a parent lexer, this\n field should be set to the parent lexer object in order for the parent's\n rules to be used instead of the child's.
_previous _M.textadept.snippets._previous()\nGoes back to the previous snippet placeholder, reverting any changes from the\ncurrent one.\n@return `false` if no snippet is active; `nil` otherwise.
_print gui._print(buffer_type, ...)\nHelper function for printing messages to buffers.\nSplits the view and opens a new buffer for printing messages to. If the\nmessage buffer is already open in a view, the message is printed to that\nview. Otherwise the view is split and the message buffer is opened or\ndisplayed before being printed to.\n@param buffer_type String type of message buffer.\n@param ... Message strings.\n@usage gui._print(_L['[Error Buffer]'], error_message)\n@usage gui._print(_L['[Message Buffer]'], message)
+_rules lexer.lexer._rules (table)\nAn ordered list of rules for a lexer grammar.\n Each rule is a table containing an arbitrary rule name and the LPeg pattern\n associated with the rule. The order of rules is important as rules are\n matched sequentially. Ensure there is a fallback rule in case the lexer\n encounters any unexpected input, usually using the pre-defined `l.any_char`\n token.\n Child lexers should not use this table to access and/or modify their\n parent's rules and vice-versa. Use the `_RULES` table instead.
_select _M.textadept.snippets._select()\nPrompts the user to select a snippet to insert from a filtered list dialog.\nGlobal snippets and snippets in the current lexer are shown.
+_tokenstyles lexer.lexer._tokenstyles (table)\nA list of styles associated with non-pre-defined token\n names.\n Each token style is a table containing the name of the token (not a rule\n containing the token) and the style associated with the token. The order of\n token styles is not important.\n It is recommended to use pre-defined styles or color-agnostic styles\n derived from pre-defined styles to ensure compatibility with user color\n themes.
abs math.abs(x)\nReturns the absolute value of `x`.
acos math.acos(x)\nReturns the arc cosine of `x` (in radians).
add_selection buffer.add_selection(buffer, caret, anchor)\nAdd a selection from anchor to caret as the main selection.\nRetainings all other selections as additional selections. Since there is\nalways at least one selection, to set a list of selections, the first\nselection should be added with `buffer:set_selection()` and later selections\nadded with this function.\n@param buffer The global buffer.\n@param caret The caret.\n@param anchor The anchor.
add_text buffer.add_text(buffer, text)\nAdd text to the document at current position.\nThe current position is set at the end of the inserted text, but it is not\nscrolled into view.\n@param buffer The global buffer.\n@param text The text to add.
add_trigger _M.textadept.adeptsense.add_trigger(sense, c, only_fields, only_functions)\nSets the trigger for autocompletion.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param c The character(s) that triggers the autocompletion. You can have up\n to two characters.\n@param only_fields If `true`, this trigger only completes fields. The default\n value is `false`.\n@param only_functions If `true`, this trigger only completes functions.\n The default value is `false`.\n@usage sense:add_trigger('.')\n@usage sense:add_trigger(':', false, true) -- only functions\n@usage sense:add_trigger('->')
-additional_caret_fore buffer.additional_caret_fore (number)\nThe foreground color of additional carets in `0xBBGGRR` format.
+additional_caret_fore buffer.additional_caret_fore (number)\nThe foreground color of additional carets in "0xBBGGRR" format.
additional_carets_blink buffer.additional_carets_blink (bool)\nWhether additional carets will blink.
additional_carets_visible buffer.additional_carets_visible (bool)\nWhether additional carets are visible.
additional_sel_alpha buffer.additional_sel_alpha (number)\nThe alpha of additional selections. Alpha ranges from `0` (transparent) to\n`255` (opaque) or `256` for no alpha.
-additional_sel_back buffer.additional_sel_back (number)\nThe background color of additional selections in `0xBBGGRR` format.\n`buffer:set_sel_back(true, ...)` must have been called previously for this\nto have an effect.
-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_sel_back buffer.additional_sel_back (number)\nThe background color of additional selections in "0xBBGGRR" format.\n`buffer:set_sel_back(true, ...)` must have been called previously for this\nto have an effect.
+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\nMatches any alphanumeric character (`A-Z`, `a-z`, `0-9`).
-alpha lexer.alpha\nMatches any alphabetic character (`A-Z`, `a-z`).
+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`).
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.
@@ -795,13 +802,14 @@ annotation_style buffer.annotation_style (table)\nTable of style numbers for ann
annotation_style_offset buffer.annotation_style_offset (number)\nThe start of the range of style numbers used for annotations.\nAnnotation styles may be completely separated from standard text styles by\nsetting a style offset. For example, setting this to `512` would allow the\nannotation styles to be numbered from `512` upto `767` so they do not\noverlap styles set by lexers (or margins if margins offset is `256`). Each\nstyle number set with `buffer.annotation_style` has the offset added before\nlooking up the style.
annotation_text buffer.annotation_text (table)\nTable of annotation text for lines starting from zero.
annotation_visible buffer.annotation_visible (number)\nThe visibility of annotations.\n\n* `_SCINTILLA.constants.ANNOTATION_HIDDEN` (0)\n Annotations are not displayed.\n* `_SCINTILLA.constants.ANNOTATION_STANDARD` (1)\n Annotations are drawn left justified with no adornment.\n* `_SCINTILLA.constants.ANNOTATION_BOXED` (2)\n Annotations are indented to match the text and are surrounded by a box.
-any lexer.any\nMatches any single character.
-api_files _M.textadept.adeptsense.api_files (table)\nContains a list of api files used by `show_apidoc()`.\nEach line in the api file contains a symbol name (not the full symbol)\nfollowed by a space character and then the symbol's documentation. Since\nthere may be many duplicate symbol names, it is recommended to put the full\nsymbol and arguments, if any, on the first line. (e.g. `Class.function(arg1,\narg2, ...)`). This allows the correct documentation to be shown based on the\ncurrent context. In the documentation, newlines are represented with `\n`. A\n`\` before `\n` escapes the newline.
+any lexer.any (pattern)\nMatches any single character.
+any_char lexer.any_char (pattern)\nA `DEFAULT` token matching any single character. This is useful in a\nfallback rule for a grammar.
+api_files _M.textadept.adeptsense.api_files (table)\nContains a list of api files used by `show_apidoc()`.\nEach line in the api file contains a symbol name (not the full symbol)\nfollowed by a space character and then the symbol's documentation. Since\nthere may be many duplicate symbol names, it is recommended to put the full\nsymbol and arguments, if any, on the first line. (e.g. `Class.function(arg1,\narg2, ...)`). This allows the correct documentation to be shown based on the\ncurrent context. In the documentation, newlines are represented with "\n". A\n'\' before "\n" escapes the newline.
append_text buffer.append_text(buffer, text)\nAppend a string to the end of the document without changing the selection.\nThe current selection is not changed and the new text is not scrolled into\nview.\n@param buffer The global buffer.\n@param text The text.
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\nMatches any ASCII character (`0`..`127`).
+ascii lexer.ascii (pattern)\nMatches any ASCII character (`0`..`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).
@@ -826,7 +834,7 @@ auto_c_select buffer.auto_c_select(buffer, string)\nSelect the item in the auto-
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 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.
-auto_c_type_separator buffer.auto_c_type_separator (number)\nThe auto-completion list type-separator character byte.\nThe default is `'?'`. Autocompletion list items may display an image as\nwell as text. Each image is first registered with an integer type. Then\nthis integer is included in the text of the list separated by a `?` from\nthe text.
+auto_c_type_separator buffer.auto_c_type_separator (number)\nThe auto-completion list type-separator character byte.\nThe default is `'?'`. Autocompletion list items may display an image as\nwell as text. Each image is first registered with an integer type. Then\nthis integer is included in the text of the list separated by a '?' from\nthe text.
autocomplete_word _M.textadept.editing.autocomplete_word(word_chars, default_words)\nPops up an autocompletion list for the current word based on other words in\nthe document.\n@param word_chars String of characters considered to be part of words. Since\n this string is used in a Lua pattern character set, character classes and\n ranges may be used.\n@param default_words Optional list of words considered to be in the document,\n even if they are not. Words may contain registered images.\n@usage _M.textadept.editing.autocomplete_word('%w_')\n@return `true` if there were completions to show; `false` otherwise.
back_space_un_indents buffer.back_space_un_indents (bool)\nWhether a backspace pressed when caret is within indentation unindents.
back_tab buffer.back_tab(buffer)\nDedent the selected lines.\n@param buffer The global buffer.
@@ -842,8 +850,8 @@ brace_bad_light buffer.brace_bad_light(buffer, pos)\nHighlight the character at
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.
-brace_match buffer.brace_match(buffer, pos)\nFind the position of a matching brace or `-1` if no match.\nThe brace characters handled are `(`, `)`, `[`, `]`, `{`, `}`, `<`, and `>`.\nThe search is forwards from an opening brace and backwards from a closing\nbrace. A match only occurs if the style of the matching brace is the same as\nthe starting brace or the matching brace is beyond the end of styling. Nested\nbraces are handled correctly.\n@param buffer The global buffer.\n@param pos The position.\n@return number.
-braces _M.textadept.editing.braces (table)\nHighlighted brace characters.\nKeys are lexer language names and values are tables of character ASCII values\nthat count as brace characters. The defaults are `(`, `)`, `[`, `]`, `{`, and\n`}`.\nThis table can be populated by language-specific modules.\n@see HIGHLIGHT_BRACES
+brace_match buffer.brace_match(buffer, pos)\nFind the position of a matching brace or `-1` if no match.\nThe brace characters handled are '(', ')', '[', ']', '{', '}'`, '<', and '>'.\nThe search is forwards from an opening brace and backwards from a closing\nbrace. A match only occurs if the style of the matching brace is the same as\nthe starting brace or the matching brace is beyond the end of styling. Nested\nbraces are handled correctly.\n@param buffer The global buffer.\n@param pos The position.\n@return number.
+braces _M.textadept.editing.braces (table)\nHighlighted brace characters.\nKeys are lexer language names and values are tables of character ASCII values\nthat count as brace characters. The defaults are '(', ')', '[', ']', '{', and\n'}'.\nThis table can be populated by language-specific modules.\n@see HIGHLIGHT_BRACES
btest bit32.btest(...)\nReturns a boolean signaling whether the bitwise "and" of its operands is\ndifferent from zero.
buffer _G.buffer (module)\nA Textadept buffer object.\nBe careful when storing references to a buffer object because if you attempt\ncall a buffer function with a non-global buffer, you will get an error. See\n`check_global()` for more information.
buffer _G.buffer\nThe current buffer in the current view.
@@ -851,10 +859,10 @@ buffer view.buffer (table)\nThe buffer the view contains. (Read-only)
buffered_draw buffer.buffered_draw (bool)\nWhether drawing is buffered.\nIf drawing is buffered then each line of text is drawn into a bitmap buffer\nbefore drawing it to the screen to avoid flicker. The default is for\ndrawing to be buffered. first or directly onto the screen.
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)\nIs there an active call tip?\n@param buffer The global buffer.\n@return bool
-call_tip_back buffer.call_tip_back (number, Write-only)\nThe background color for the call tip in `0xBBGGRR` format.
+call_tip_back buffer.call_tip_back (number, Write-only)\nThe background color for the call tip in "0xBBGGRR" format.
call_tip_cancel buffer.call_tip_cancel(buffer)\nRemove the call tip from the screen.\nCall tips are also removed if any keyboard commands that are not compatible\nwith editing the argument list of a function are used.\n@param buffer The global buffer.
-call_tip_fore buffer.call_tip_fore (number, Write-only)\nThe foreground color for the call tip in `0xBBGGRR` format.
-call_tip_fore_hlt buffer.call_tip_fore_hlt (number, Write-only)\nThe foreground color for the highlighted part of the call tip in `0xBBGGRR`\nformat.
+call_tip_fore buffer.call_tip_fore (number, Write-only)\nThe foreground color for the call tip in "0xBBGGRR" format.
+call_tip_fore_hlt buffer.call_tip_fore_hlt (number, Write-only)\nThe foreground color for the highlighted part of the call tip in "0xBBGGRR"\nformat.
call_tip_pos_start buffer.call_tip_pos_start(buffer)\nRetrieve the position where the caret was before displaying the call tip.\n@param buffer The global buffer.\n@return number
call_tip_position buffer.call_tip_position (boolean)\nThe position of calltip, above or below text.\nBy default the calltip is displayed below the text. Setting to `true` will\ndisplay it above the text.
call_tip_set_hlt buffer.call_tip_set_hlt(buffer, start_pos, end_pos)\nHighlights a segment of a call tip.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position.
@@ -864,8 +872,8 @@ can_paste buffer.can_paste(buffer)\nWill a paste succeed?\n@param buffer The glo
can_redo buffer.can_redo(buffer)\nAre there any redoable actions in the undo history?\n@param buffer The global buffer.\n@return bool
can_undo buffer.can_undo(buffer)\nAre there any undoable actions in the undo history?\n@param buffer The global buffer.\n@return bool
cancel buffer.cancel(buffer)\nCancel any modes such as call tip or auto-completion list display.\n@param buffer The global buffer.
-caret_fore buffer.caret_fore (number)\nThe foreground color of the caret in `0xBBGGRR` format.
-caret_line_back buffer.caret_line_back (number)\nThe color of the background of the line containing the caret in `0xBBGGRR`\nformat.
+caret_fore buffer.caret_fore (number)\nThe foreground color of the caret in "0xBBGGRR" format.
+caret_line_back buffer.caret_line_back (number)\nThe color of the background of the line containing the caret in "0xBBGGRR"\nformat.
caret_line_back_alpha buffer.caret_line_back_alpha (number)\nThe background alpha of the caret line.\nAlpha ranges from `0` (transparent) to `255` (opaque) or `256` for no\nalpha.
caret_line_visible buffer.caret_line_visible (bool)\nWhether the background of the line containing the caret is in a different\ncolor.
caret_period buffer.caret_period (number)\nThe time in milliseconds that the caret is on and off.\nSetting the period to `0` stops the caret blinking. The default value is\n500 milliseconds.
@@ -879,7 +887,7 @@ char_at buffer.char_at (table, Read-only)\nTable of character bytes at positions
char_left buffer.char_left(buffer)\nMove caret left one character.\n@param buffer The global buffer.
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_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_right buffer.char_right(buffer)\nMove caret right one character.\n@param buffer The global buffer.
@@ -903,17 +911,17 @@ 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\nMatches any control character (`0`..`31`).
+cntrl lexer.cntrl (pattern)\nMatches any control character (`0`..`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 component of the hexadecimal color.\n@param g The string green component of the color.\n@param b The string blue component of the color.\n@usage local red = color('FF', '00', '00')
+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.
colors lexer.colors (table)\nTable of common colors for a theme.\nThis table should be redefined in each theme.
colourise buffer.colourise(buffer, start_pos, end_pos)\nColorise a segment of the document using the current lexing language.\n@param buffer The global buffer.\n@param start_pos The start position.\n@param end_pos The end position or `-1` to style from `start_pos` to the end\n of the document.
column buffer.column (table, Read-only)\nTable of column numbers, taking tab widths into account, for positions\nstarting from zero.
command_entry gui.command_entry (module)\nTextadept's Command Entry.
comment_string _M.textadept.editing.comment_string (table)\nComment strings for various lexer languages.\nUsed by the `block_comment()` function. Keys are lexer language names and\nvalues are the line comment delimiters for the language. This table is\ntypically populated by language-specific modules.\n@see block_comment
-compile _M.textadept.run.compile()\nCompiles the file based on its extension using the command from the\n`compile_command` table.\n@see compile_command
-compile_command _M.textadept.run.compile_command (table)\nFile extensions and their associated "compile" shell commands.\nEach key is a file extension whose value is a either a command line string to\nexecute or a function returning one.\nThis table is typically populated by language-specific modules.
+compile _M.textadept.run.compile()\nCompiles the file based on its extension using the command from the\n`compile_command` table.\nEmits a `COMPILE_OUTPUT` event.\n@see compile_command\n@see _G.events
+compile_command _M.textadept.run.compile_command (table)\nFile extensions and their associated "compile" shell commands.\nEach key is a file extension whose value is a either a command line string to\nexecute or a function returning one. The command string can have the\nfollowing macros:\n\n + `%(filepath)`: The full path of the current file.\n + `%(filedir)`: The current file's directory path.\n + `%(filename)`: The name of the file including extension.\n + `%(filename_noext)`: The name of the file excluding extension.\n\nThis table is typically populated by language-specific modules.
complete _M.textadept.adeptsense.complete(sense, only_fields, only_functions)\nShows an autocompletion list for the symbol behind the caret.\n@param sense The Adeptsense returned by `adeptsense.new()`. If `nil`, uses\n the current language's Adeptsense (if it exists).\n@param only_fields If `true`, returns list of only fields. The default value\n is `false`.\n@param only_functions If `true`, returns list of only functions. The default\n value is `false`.\n@return `true` on success or `false`.\n@see get_symbol\n@see get_completions
completions _M.textadept.adeptsense.completions (table)\nContains lists of possible completions for known symbols.\nEach symbol key has a table value that contains a list of field completions\nwith a `fields` key and a list of functions completions with a `functions`\nkey. This table is normally populated by `load_ctags()`, but can also be set\nby the user.
concat table.concat(list [, sep [, i [, j]]])\nGiven a list where all elements are strings or numbers, returns\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.
@@ -952,7 +960,7 @@ cut buffer.cut(buffer)\nCut the selection to the clipboard.\n@param buffer The g
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 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 some systems, this function may be not thread safe.
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\nMatches a decimal number.
+dec_num lexer.dec_num (pattern)\nMatches a decimal number.
deg math.deg(x)\nReturns the angle `x` (given in radians) in degrees.
del_line_left buffer.del_line_left(buffer)\nDelete back from the current position to the start of the line.\n@param buffer The global buffer.
del_line_right buffer.del_line_right(buffer)\nDelete forwards from the current position to the end of the line.\n@param buffer The global buffer.
@@ -963,10 +971,10 @@ delete buffer.delete(buffer)\nDeletes the current buffer.\nWARNING: this functio
delete_back buffer.delete_back(buffer)\nDelete the selection or if no selection, the character before the caret.\n@param buffer The global buffer.
delete_back_not_line buffer.delete_back_not_line(buffer)\nDelete the selection or if no selection, the character before the caret.\nWill not delete the character before at the start of a line.
delete_range buffer.delete_range(buffer, pos, length)\nDelete a range of text in the document.\n@param pos The start position of the range to delete.\n@param length The length of the range to delete.
-delimited_range lexer.delimited_range(chars, escape, end_optional, balanced, forbidden)\nCreates an LPeg pattern that matches a range of characters delimitted by a\nspecific character(s).\nThis can be used to match a string, parenthesis, etc.\n@param chars The character(s) that bound the matched range.\n@param escape Optional escape character. This parameter may be omitted, nil,\n or the empty string.\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 `%b` in Lua's `string.find`. This flag only applies if\n `chars` 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.\n@usage local sq_str_noescapes = delimited_range("'")\n@usage local sq_str_escapes = delimited_range("'", '\\', true)\n@usage local unbalanced_parens = delimited_range('()', '\\', true)\n@usage local balanced_parens = delimited_range('()', '\\', true, true)
+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
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\nMatches any digit (`0-9`).
+digit lexer.digit (pattern)\nMatches any digit (`0-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.
@@ -980,7 +988,7 @@ document_start buffer.document_start(buffer)\nMove caret to first position in do
document_start_extend buffer.document_start_extend(buffer)\nMove caret to first position in document extending selection to new caret\nposition.\n@param buffer The global buffer.
dofile _G.dofile([filename])\nOpens the named file and executes its contents as a Lua chunk. When\ncalled without arguments,\n`dofile` executes the contents of the standard input (`stdin`). Returns\nall values returned by the chunk. In case of errors, `dofile` propagates\nthe error to its caller (that is, `dofile` does not run in protected mode).
dump string.dump(function)\nReturns a string containing a binary representation of the given\nfunction, so that a later `load` on this string returns a copy of the\nfunction (but with new upvalues).
-edge_colour buffer.edge_colour (number)\nThe color used in edge indication in `0xBBGGRR` format.
+edge_colour buffer.edge_colour (number)\nThe color used in edge indication in "0xBBGGRR" format.
edge_column buffer.edge_column (number)\nThe column number which text should be kept within.
edge_mode buffer.edge_mode (number)\nThe edge highlight mode.\n\n* `_SCINTILLA.constants.EDGE_NONE` (0)\n Long lines are not marked. This is the default state.\n* `_SCINTILLA.constants.EDGE_LINE` (1)\n A vertical line is drawn at the column number set by\n `buffer.edge_column`.\n* `_SCINTILLA.constants.EDGE_BACKGROUND` (2)\n The background color of characters after the column limit is changed to\n the color set by `buffer.edge_colour`.
edit_toggle_overtype buffer.edit_toggle_overtype(buffer)\nSwitch from insert to overtype mode or the reverse.\n@param buffer The global buffer.
@@ -998,15 +1006,14 @@ end_undo_action buffer.end_undo_action(buffer)\nEnd a sequence of actions that i
ensure_visible buffer.ensure_visible(buffer, line)\nEnsure a particular line is visible by expanding any header line hiding it.\n@param buffer The global buffer.\n@param line The line number.
ensure_visible_enforce_policy buffer.ensure_visible_enforce_policy(buffer, line)\nEnsure a particular line is visible by expanding any header line hiding it.\nUse the currently set visibility policy to determine which range to display.\n@param buffer The global buffer.\n@param line The line number.
entry_text gui.command_entry.entry_text (string)\nThe text in the entry.
-eol_mode buffer.eol_mode (number)\nThe current end of line mode.\n\n* `_SCINTILLA.constants.SC_EOL_CRLF` (0)\n `CRLF`.\n* `_SCINTILLA.constants.SC_EOL_CR` (1)\n `CR`.\n* `_SCINTILLA.constants.SC_EOL_LF` (2)\n `LF`.
+eol_mode buffer.eol_mode (number)\nThe current end of line mode.\n\n* `_SCINTILLA.constants.SC_EOL_CRLF` (0)\n "CR+LF" ("\r\n").\n* `_SCINTILLA.constants.SC_EOL_CR` (1)\n "CR" ("\r").\n* `_SCINTILLA.constants.SC_EOL_LF` (2)\n "LF" ("\n").
error _G.error(message [, level])\nTerminates the last protected function called and returns `message`\nas the error message. Function `error` never returns.\n\nUsually, `error` adds some information about the error position at the\nbeginning of the message, if the message is a string. The `level` argument\nspecifies how to get the error position. With level 1 (the default), the\nerror position is where the `error` function was called. Level 2 points the\nerror to where the function that called `error` was called; and so on.\nPassing a level 0 avoids the addition of error position information to the\nmessage.
error_detail _M.textadept.run.error_detail (table)\nA table of error string details for different programming languages.\nEach key is a lexer name whose value is a table with the following fields:\n\n + `pattern`: The Lua pattern that matches a specific error string with\n captures for the filename the error occurs in, the line number the error\n occurred on, and an optional error message.\n + `filename`: The index of the Lua capture that contains the filename the\n error occured in.\n + `line`: The index of the Lua capture that contains the line number the\n error occured on.\n + `message`: (Optional) The index of the Lua capture that contains the\n error's message. An annotation will be displayed if a message was\n captured.\n\nWhen an error message is double-clicked, the user is taken to the point of\nerror.\nThis table is usually populated by language-specific modules.
events _G.events (module)\nTextadept's core event structure and handlers.
-execute _M.textadept.run.execute(command, compiling)\nExecutes the command line parameter.\nEmits a `COMPILE_OUTPUT` or `RUN_OUTPUT` event based on the `compiling` flag.\n@param command The command line string.\n It can have the following macros:\n + `%(filepath)`: The full path of the current file.\n + `%(filedir)`: The current file's directory path.\n + `%(filename)`: The name of the file including extension.\n + `%(filename_noext)`: The name of the file excluding extension.\n@param compiling Flag indicating whether or not the command is a compiler\n command. The default value is `false`.\n@see _G.events
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\nMatches any ASCII extended character (`0`..`255`).
+extend lexer.extend (pattern)\nMatches any ASCII extended character (`0`..`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.
@@ -1027,7 +1034,7 @@ find_next_button_text gui.find.find_next_button_text (string, Write-only)\nThe t
find_prev gui.find.find_prev()\nMimicks a press of the 'Find Prev' button.
find_prev_button_text gui.find.find_prev_button_text (string, Write-only)\nThe text of the 'Find Prev' button.\nThis is primarily used for localization.
first_visible_line buffer.first_visible_line (number)\nThe display line at the top of the display.
-float lexer.float\nMatches a floating point number.
+float lexer.float (pattern)\nMatches a floating point number.
floor math.floor(x)\nReturns the largest integer smaller than or equal to `x`.
flush file:flush()\nSaves any written data to `file`.
flush io.flush()\nEquivalent to `io.output():flush()`.
@@ -1035,7 +1042,7 @@ fmod math.fmod(x, y)\nReturns the remainder of the division of `x` by `y` that r
focus buffer.focus (bool)\nThe internal focus flag.
focus gui.command_entry.focus()\nFocuses the command entry.
focus gui.find.focus()\nDisplays and focuses the Find & Replace pane.
-fold lexer.fold(text, start_pos, start_line, start_level)\nFolds the given text.\nCalled by LexLPeg.cxx; do not call from Lua.\nIf the current lexer has no _fold function, folding by indentation is\nperformed if the 'fold.by.indentation' property is set.\n@param text The document text to fold.\n@param start_pos The position in the document text starts at.\n@param start_line The line number text starts on.\n@param start_level The fold level text starts on.\n@return Table of fold levels.
+fold lexer.fold(text, start_pos, start_line, start_level)\nFolds the given text.\nCalled by the Scintilla lexer; **do not call from Lua**.\nIf the current lexer has a `_fold` function or a `_foldsymbols` table, it is\nused to perform folding. Otherwise, if a `fold.by.indentation` property is\nset, folding by indentation is done.\n@param text The document text to fold.\n@param start_pos The position in the document text starts at.\n@param start_line The line number text starts on.\n@param start_level The fold level text starts on.\n@return table of fold levels.
fold_expanded buffer.fold_expanded (bool)\nExpanded state of a header line.
fold_flags buffer.fold_flags (number)\nThe style options for folding.\nBits set in flags determine where folding lines are drawn:\n\n* `_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_EXPANDED` (2)\n Draw above if expanded.\n* `_SCINTILLA.constants.SC_FOLDFLAG_LINEBEFORE_CONTRACTED` (4)\n Draw above if not expanded.\n* `_SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_EXPANDED` (8)\n Draw below if expanded.\n* `_SCINTILLA.constants.SC_FOLDFLAG_LINEAFTER_CONTRACTED` (16)\n Draw below if not expanded.
fold_level buffer.fold_level (table)\nTable of fold levels for lines starting from zero.\nFold levels encodes an integer level along with flags indicating whether\nthe line is a header and whether it is effectively white space.\n\n* `_SCINTILLA.constants.SC_FOLDLEVELBASE` (0x400)\n Initial fold level.\n* `_SCINTILLA.constants.SC_FOLDLEVELWHITEFLAG` (0x1000)\n Indicates that the line is blank.\n* `_SCINTILLA.constants.SC_FOLDLEVELHEADERFLAG` (0x2000)\n Indicates that the line is a header (fold point).
@@ -1045,26 +1052,26 @@ font_quality buffer.font_quality (number)\n(Windows only)\n The quality level f
form_feed buffer.form_feed(buffer)\nInsert a Form Feed character.\n@param buffer The global buffer.
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 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` also\nexpect a number, but the range of that number may be limited by the\nunderlying C implementation. For options `o`, `u`, `X`, and `x`, the number\ncannot be negative. Option `q` expects a string; option `s` expects a string\nwithout embedded zeros. If the argument to option `s` is not a string, it is\nconverted to one following the same rules of `tostring`.
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).
-functions _SCINTILLA.functions (table)\nScintilla functions.\nEach key is a Scintilla function name with a table value containing its ID,\nreturn type, wParam type, and lParam type. 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`: Colour in `0xBBGGRR` format.\n + `5`: Boolean `true` or `false`.\n + `6`: Bitmask of Scintilla key modifiers and a key value.\n + `7`: String parameter.\n + `8`: String return value.
+functions _SCINTILLA.functions (table)\nScintilla functions.\nEach key is a Scintilla function name with a table value containing its ID,\nreturn type, wParam type, and lParam type. 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`: Colour 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.
gap_position buffer.gap_position (number, Read-only)\nA position which, to avoid performance costs, should not be within the\nrange of a call to `buffer:get_range_pointer()`.
get_apidoc _M.textadept.adeptsense.get_apidoc(sense, symbol)\nReturns a list of apidocs for the given symbol.\nIf there are multiple apidocs, the index of one to display is the value of\nthe `pos` key in the returned list.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param symbol The symbol to get apidocs for.\n@return apidoc_list or `nil`
get_class _M.textadept.adeptsense.get_class(sense, symbol)\nReturns the class name for a given symbol.\nIf the symbol is `sense.syntax.self` and a class definition using the\n`sense.syntax.class_definition` keyword is found, that class is returned.\nOtherwise the buffer is searched backwards for a type declaration of the\nsymbol according to the patterns in `sense.syntax.type_declarations`.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param symbol The symbol to get the class of.\n@return class or `nil`\n@see syntax
get_completions _M.textadept.adeptsense.get_completions(sense, symbol, only_fields, only_functions)\nReturns a list of completions for the given symbol.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param symbol The symbol to get completions for.\n@param only_fields If `true`, returns list of only fields. The default value\n is `false`.\n@param only_functions If `true`, returns list of only functions. The default\n value is `false`.\n@return completion_list or `nil`
get_cur_line buffer.get_cur_line(buffer)\nRetrieve the text of the line containing the caret.\nAlso returns the index of the caret on the line.\n@param buffer The global buffer.\n@return string, number
-get_fold_level lexer.get_fold_level(line_number)\nReturns the fold level for a given line.\nThis level already has `SC_FOLDLEVELBASE` added to it, so you do not need to\nadd it yourself.\n@param line_number The line number to get the fold level of.
+get_fold_level lexer.get_fold_level(line_number)\nReturns the fold level for a given line.\nThis level already has `SC_FOLDLEVELBASE` added to it, so you do not need to\nadd it yourself.\n@param line_number The line number to get the fold level of.\n@return integer fold level
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.
+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_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.
get_line_sel_start_position buffer.get_line_sel_start_position(buffer, line)\nRetrieve the position of the start of the selection at the given line (`-1`\nif no selection on this line).\n@param buffer The global buffer.\n@param line The line number.
-get_property lexer.get_property(key, default)\nReturns an integer property value for a given key.\n@param key The property key.\n@param default Optional integer value to return if key is not set.
-get_range_pointer buffer.get_range_pointer(buffer, position, range_length)\nReturn a read-only pointer to a range of characters in the document.\nMay move the gap so that the range is contiguous, but will only move up to\nrange_length bytes.\nThe gap is not moved unless it is within the requested range so this call can\nbe faster than `SCI_GETCHARACTERPOINTER`. This can be used by application\ncode that is able to act on blocks of text or ranges of lines.
+get_property lexer.get_property(key, default)\nReturns an integer property value for a given key.\n@param key The property key.\n@param default Optional integer value to return if key is not set.\n@return integer property value
+get_range_pointer buffer.get_range_pointer(buffer, position, range_length)\nReturn a read-only pointer to a range of characters in the document.\nMay move the gap so that the range is contiguous, but will only move up to\nrange_length bytes.\nThe gap is not moved unless it is within the requested range so this call can\nbe faster than `buffer.character_pointer`. This can be used by application\ncode that is able to act on blocks of text or ranges of lines.
get_sel_text buffer.get_sel_text(buffer)\nRetrieve the selected text.\nAlso returns the length of the text.\n@param buffer The global buffer.\n@return string, number
get_split_table gui.get_split_table()\nGets the current split view structure.\nThis is primarily used in session saving.\n@return table of split views. Each split view entry is a table with 4\n fields: `1`, `2`, `vertical`, and `size`. `1` and `2` have values of either\n nested split view entries or the views themselves; `vertical` is a flag\n indicating if the split is vertical or not; and `size` is the integer\n position of the split resizer.
-get_style_at lexer.get_style_at(pos)\nReturns the string style name and style number at a given position.\n@param pos The position to get the style for.
+get_style_at lexer.get_style_at(pos)\nReturns the string style name and style number at a given position.\n@param pos The position to get the style for.\n@return style name\n@return style number
get_style_name buffer.get_style_name(buffer, style_num)\nReturns the name of the style associated with a style number.\n@param buffer The global buffer.\n@param style_num A style number from `0` to `255`.\n@see buffer.style_at
get_symbol _M.textadept.adeptsense.get_symbol(sense)\nReturns a full symbol (if any) and current symbol part (if any) behind the\ncaret.\nFor example: `buffer.cur` would return `'buffer'` and `'cur'`.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@return symbol or `''`\n@return part or `''`
get_text buffer.get_text(buffer)\nRetrieve all the text in the document.\nAlso returns number of characters retrieved.\n@param buffer The global buffer.
@@ -1091,7 +1098,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\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.
@@ -1099,7 +1106,7 @@ h_scroll_bar buffer.h_scroll_bar (bool)\nWhether the horizontal scroll bar is vi
handle_clear _M.textadept.adeptsense.handle_clear(sense)\nCalled when clearing an Adeptsense.\nThis function should be replaced with your own if you have any persistant\nobjects that need to be deleted.\n@param sense The Adeptsense returned by `adeptsense.new()`.
handle_ctag _M.textadept.adeptsense.handle_ctag(sense, tag_name, file_name, ex_cmd, ext_fields)\nCalled by `load_ctags()` when a ctag kind is not recognized.\nThis method should be replaced with your own that is specific to the\nlanguage.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param tag_name The tag name.\n@param file_name The name of the file the tag belongs to.\n@param ex_cmd The `ex_cmd` returned by ctags.\n@param ext_fields The `ext_fields` returned by ctags.
handlers events.handlers (table)\nA table of event names and a table of functions connected to them.
-hex_num lexer.hex_num\nMatches a hexadecimal number.
+hex_num lexer.hex_num (pattern)\nMatches a hexadecimal number.
hide_lines buffer.hide_lines(buffer, start_line, end_line)\nMake a range of lines invisible.\nThis has no effect on fold levels or fold flags. `start_line` can not be\nhidden.\n@param buffer The global buffer.\n@param start_line The start line.\n@param end_line The end line.
hide_selection buffer.hide_selection(buffer, normal)\nDraw the selection in normal style or with selection highlighted.\n@param buffer The global buffer.\n@param normal Draw normal selection.
highlight_guide buffer.highlight_guide (number)\nThe highlighted indentation guide column.\nSet to `0` to cancel this highlight.
@@ -1123,7 +1130,7 @@ in_files_label_text gui.find.in_files_label_text (string, Write-only)\nThe text
indent buffer.indent (number)\nIhe number of spaces used for one level of indentation.\nFor a width of `0`, the indent size is the same as the tab size.
indentation_guides buffer.indentation_guides (number)\nIndentation guides appearance.\nIndentation guides are dotted vertical lines that appear within indentation\nwhite space every indent size columns.\n\n* `_SCINTILLA.constants.SC_IV_NONE` (0)\n No indentation guides are shown.\n* `_SCINTILLA.constants.SC_IV_REAL` (1)\n Indentation guides are shown inside real indentation white space.\n* `_SCINTILLA.constants.SC_IV_LOOKFORWARD` (2)\n Indentation guides are shown beyond the actual indentation up to the\n level of the next non-empty line.\n If the previous non-empty line was a fold header then indentation guides\n are shown for one more level of indent than that line. This setting is\n good for Python.\n* `_SCINTILLA.constants.SC_IV_LOOKBOTH` (3)\n Indentation guides are shown beyond the actual indentation up to the\n level of the next non-empty line or previous non-empty line whichever is\n the greater.\n This setting is good for most languages.
indic_alpha buffer.indic_alpha (table)\nTable of alpha transparency values ranging from `0` (transparent) to `255`\n(opaque) or `256` (no alpha) for indicators from `0` to `31`.\nUsed for drawing the fill color of the `INDIC_ROUNDBOX` and\n`INDIC_STRAIGHTBOX` rectangle.
-indic_fore buffer.indic_fore (table)\nTable of foreground colors in `0xBBGGRR` format for indicators from `0` to\n`31`.
+indic_fore buffer.indic_fore (table)\nTable of foreground colors in "0xBBGGRR" format for indicators from `0` to\n`31`.
indic_outline_alpha buffer.indic_outline_alpha (table)\nTable of alpha transparency values ranging from `0` (transparent) to `255`\n(opaque) or `256` (no alpha) for indicators from `0` to `31`.\nUsed for drawing the outline color of the `INDIC_ROUNDBOX` and\n`INDIC_STRAIGHTBOX` rectangle.
indic_style buffer.indic_style (table)\nTable of styles for indicators from `0` to `31`.\n\n* `_SCINTILLA.constants.INDIC_PLAIN` (0)\n Underlined with a single, straight line.\n* `_SCINTILLA.constants.INDIC_SQUIGGLE` (1)\n A squiggly underline. Requires 3 pixels of descender space.\n* `_SCINTILLA.constants.INDIC_TT` (2)\n A line of small T shapes.\n* `_SCINTILLA.constants.INDIC_DIAGONAL` (3)\n Diagonal hatching.\n* `_SCINTILLA.constants.INDIC_STRIKE` (4)\n Strike out.\n* `_SCINTILLA.constants.INDIC_HIDDEN` (5)\n An indicator with no visual effect.\n* `_SCINTILLA.constants.INDIC_BOX` (6)\n A rectangle around the text.\n* `_SCINTILLA.constants.INDIC_ROUNDBOX` (7)\n A rectangle with rounded corners around the text using translucent\n drawing with the interior usually more transparent than the border. Use\n `buffer.indic_alpha` and `buffer.indic_outline_alpha` to control the\n alpha transparency values. The default alpha values are `30` for fill\n color and `50` for outline color.\n* `_SCINTILLA.constants.INDIC_STRAIGHTBOX` (8)\n A rectangle around the text using translucent drawing with the interior\n usually more transparent than the border.\n You can use `buffer.indic_alpha` and `buffer.indic_outline_alpha` to\n control the alpha transparency values. The default alpha values are `30`\n for fill color and `50` for outline color.\n* `_SCINTILLA.constants.INDIC_DASH` (9)\n A dashed underline.\n* `_SCINTILLA.constants.INDIC_DOTS` (10)\n A dotted underline.\n* `_SCINTILLA.constants.INDIC_SQUIGGLELOW` (11)\n Similar to `INDIC_SQUIGGLE` but only using 2 vertical pixels so will fit\n under small fonts.\n* `_SCINTILLA.constants.INDIC_DOTBOX` (12)\n A dotted rectangle around the text using translucent drawing.\n Translucency alternates between the alpha and outline alpha settings with\n the top-left pixel using the alpha setting. `buffer.indic_alpha` and\n `buffer.indic_outline_alpha` control the alpha transparency values.\n The default values are `30` for alpha and `50` for outline alpha. To\n avoid excessive memory allocation the maximum width of a dotted box is\n 4000 pixels.\n* `_SCINTILLA.constants.INDIC_SQUIGGLEPIXMAP` (13)\n A version of `INDIC_SQUIGGLE` that draws using a pixmap instead of as a\n series of line segments for performance. Measured to be between 3 and 6\n times faster than `INDIC_SQUIGGLE` on GTK+. Apperance will not be as good\n as `INDIC_SQUIGGLE` on OSX in HiDPI mode.\n* Use `_SCINTILLA.next_indic_number()` for custom indicators.
indic_under buffer.indic_under (table)\nTable of booleans for drawing under text or over (default) for indicators\nfrom `0` to `31`.
@@ -1139,7 +1146,7 @@ inherited_classes _M.textadept.adeptsense.inherited_classes (table)\nContains a
input io.input([file])\nWhen called with a file name, it opens the named file (in text mode),\nand sets its handle as the default input file. When called with a file\nhandle, it simply sets this file handle as the default input file. When\ncalled without parameters, it returns the current default input file.\n\nIn case of errors this function raises the error, instead of returning an\nerror code.
insert table.insert(list, [pos, ] value)\nInserts element `value` at position `pos` in `list`, shifting up the elements\n`list[pos], list[pos+1], ···, list[#list]`. The default value for `pos` is\n`#list+1`, so that a call `table.insert(t,x)` inserts `x` at the end of list\n`t`.
insert_text buffer.insert_text(buffer, pos, text)\nInsert string at a position.\nIf the current position is after the insertion point then it is moved along\nwith its surrounding text but no scrolling is performed.\n@param buffer The global buffer.\n@param pos The position to insert text at or `-1` for the current position.\n@param text The text to insert.
-integer lexer.integer\nMatches a decimal, hexadecimal, or octal number.
+integer lexer.integer (pattern)\nMatches a decimal, hexadecimal, or octal number.
io _G.io (module)\nLua io module.
ipairs _G.ipairs(t)\nIf `t` has a metamethod `__ipairs`, calls it with `t` as argument and returns\nthe first three results from the call.\n\nOtherwise, returns three values: an iterator function, the table `t`, and 0,\nso that the construction\n\n for i,v in ipairs(t) do *body* end\n\nwill iterate over the pairs (`1,t[1]`), (`2,t[2]`), ..., up to the\nfirst integer key absent from the table.
java _G.keys.java (table)\nContainer for Java-specific key bindings.
@@ -1149,16 +1156,17 @@ join_lines _M.textadept.editing.join_lines()\nJoins the currently selected lines
keys _G.keys (module)\nManages key bindings in Textadept.
keys _M.textadept.keys (module)\nDefines key commands for Textadept.\nThis set of key commands is pretty standard among other text editors.\nThis module should be `require`d last, but before `_M.textadept.menu`.
keys_unicode buffer.keys_unicode (bool)\nInterpret keyboard input as Unicode.
-last_char_includes lexer.last_char_includes(s)\nCreates an LPeg pattern that matches any previous non-whitespace character\nin the given set.\n@param s String character set like one passed to `lpeg.S()`.\n@usage local regex = l.last_char_includes('+-*!%^&|=,([{') *\n l.delimited_range('/', '\\')
+last_char_includes lexer.last_char_includes(s)\nCreates and returns a pattern that matches any previous non-whitespace\ncharacter in the given set.\nA match consumes no input.\n@param s String character set like one passed to `lpeg.S()`.\n@usage local regex = l.last_char_includes('+-*!%^&|=,([{') *\n l.delimited_range('/', '\\')\n@return pattern
layout_cache buffer.layout_cache (number)\nThe degree of caching of layout information.\n\n* `_SCINTILLA.constants.SC_CACHE_NONE` (0)\n No lines are cached.\n* `_SCINTILLA.constants.SC_CACHE_CARET` (1)\n The line containing the text caret.\n This is the default.\n* `_SCINTILLA.constants.SC_CACHE_PAGE` (2)\n Visible lines plus the line containing the caret.\n* `_SCINTILLA.constants.SC_CACHE_DOCUMENT` (3)\n All lines in the document.
ldexp math.ldexp(m, e)\nReturns 'm2^e' (`e` should be an integer).
len string.len(s)\nReceives a string and returns its length. The empty string `""` has\nlength 0. Embedded zeros are counted, so `"a\000bc\000"` has length 5.
length buffer.length (number, Read-only)\nThe number of bytes in the document.
-lex lexer.lex(text, init_style)\nLexes the given text.\nCalled by LexLPeg.cxx; do not call from Lua.\nIf the lexer has a _LEXBYLINE flag set, the text is lexed one line at a time.\nOtherwise the text is lexed as a whole.\n@param text The text to lex.\n@param init_style The current style. Multilang lexers use this to determine\n which language to start lexing in.
-lexer _G.lexer (module)\nPerforms lexing of Scintilla documents.
+lex lexer.lex(text, init_style)\nLexes the given text.\nCalled by the Scintilla lexer; **do not call from Lua**.\nIf the lexer has a `_LEXBYLINE` flag set, the text is lexed one line at a\ntime. Otherwise the text is lexed as a whole.\n@param text The text to lex.\n@param init_style The current style. Multilang lexers use this to determine\n which language to start lexing in.\n@return table of token names and positions.
+lexer _G.lexer (module)\nPerforms lexing of Scintilla documents with Lua and LPeg.
lexer buffer.lexer (number)\nThe lexing language of the document.
+lexer lexer.lexer (table)\nIndividual lexer fields.
lexer_language buffer.lexer_language (string)\nThe name of the lexer.
-lexers _M.textadept.mime_types.lexers (table)\nList of detected lexers.\nLexers are read from `lexers/` and `~/.textadept/lexers/`.
+lexers _M.textadept.mime_types.lexers (table)\nList of detected lexers.\nLexers are read from *lexers/* and *~/.textadept/lexers/*.
lfs _G.lfs (module)\nLua lfs module.
line_copy buffer.line_copy(buffer)\nCopy the line containing the caret.\n@param buffer The global buffer.
line_count buffer.line_count (number, Read-only)\nThe number of lines in the document.\nThere is always at least one.
@@ -1197,7 +1205,7 @@ lines_split buffer.lines_split(buffer, pixel_width)\nSplit the lines in the targ
lines_visible buffer.lines_visible (bool, Read-only)\nAre all lines visible?
load _G.load(ld [, source [, mode [, env]]])\nLoads a chunk.\n\nIf `ld` is a string, the chunk is this string. If `ld` is a function, `load`\ncalls it repeatedly to get the chunk pieces. Each call to `ld` must return a\nstring that concatenates with previous results. A return of an empty string,\nnil, or no value signals the end of the chunk.\n\nIf there are no syntactic errors, returns the compiled chunk as a function;\notherwise, returns <b>nil</b> plus the error message.\n\nIf the resulting function has upvalues, the first upvalue is set to the value\nof the global environment or to `env`, if that parameter is given. When\nloading main chunks, the first upvalue will be the `_ENV` variable\n(see §2.2).\n\n`source` is used as the source of the chunk for error messages and debug\ninformation (see §4.9). When absent, it defaults to `ld`, if `ld` is a\nstring, or to "`=(load)`" otherwise.\n\nThe string `mode` controls whether the chunk can be text or binary (that is,\na precompiled chunk). It may be the string "`b`" (only binary chunks), "`t`"\n(only text chunks), or "`bt`" (both binary and text). The default is "`bt`".
load _M.textadept.session.load(filename)\nLoads a Textadept session file.\nTextadept restores split views, opened buffers, cursor information, and\nrecent files.\n@param filename The absolute path to the session file to load. If `nil`, the\n user is prompted for one.\n@usage _M.textadept.session.load(filename)\n@return `true` if the session file was opened and read; `false` otherwise.\n@see DEFAULT_SESSION
-load lexer.load(lexer_name)\nInitializes the specified lexer.\n@param lexer_name The name of the lexing language.
+load lexer.load(lexer_name)\nInitializes or loads the specified lexer.\nScintilla calls this function to load a lexer. Parent lexers also call this\nfunction to load child lexers and vice-versa.\n@param lexer_name The name of the lexing language.\n@return lexer object
load_ctags _M.textadept.adeptsense.load_ctags(sense, tag_file, nolocations)\nLoads the given ctags file for autocompletion.\nIt is recommended to pass `-n` to ctags in order to use line numbers instead\nof text patterns to locate tags. This will greatly reduce memory usage for a\nlarge number of symbols if `nolocations` is not `true`.\n@param sense The Adeptsense returned by `adeptsense.new()`.\n@param tag_file The path of the ctags file to load.\n@param nolocations If `true`, does not store the locations of the tags for\n use by `goto_ctag()`. The default value is `false`.
load_project _M.rails.load_project(utf8_dir)\nOpens a Rails project for snapopen.\nIf not directory is provided, the user is prompted for one.\n@param utf8_dir The UTF-8 Rails project directory.
loaded package.loaded (table)\nA table used by `require` to control which modules are already loaded. When\nyou require a module `modname` and `package.loaded[modname]` is not false,\n`require` simply returns the value stored there.\nThis variable is only a reference to the real table; assignments to this\nvariable do not change the table used by `require`.
@@ -1208,7 +1216,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\nMatches any lowercase character (`a-z`).
+lower lexer.lower (pattern)\nMatches any lowercase character (`a-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.
@@ -1225,7 +1233,7 @@ margin_left buffer.margin_left (number)\nThe size in pixels of the left margin.\
margin_mask_n buffer.margin_mask_n (table)\nTable of marker masks for margins from zero to four.\nA mask determines which markers are displayed in a margin.
margin_options buffer.margin_options (number)\nA bit mask of margin options.\n\n* `_SCINTILLA.constants.SC_MARGINOPTION_NONE` (0)\n None (default).\n* `_SCINTILLA.constants.SC_MARGINOPTION_SUBLINESELECT` (1)\n Controls how wrapped lines are selected when clicking on margin in front\n of them.\n If set, only sub line of wrapped line is selected, otherwise whole\n wrapped line is selected.
margin_right buffer.margin_right (number)\nThe size in pixels of the right margin.\nThe default is to one pixel.
-margin_sensitive_n buffer.margin_sensitive_n (table)\nTable of mouse click sensitivity booleans for margins from zero to four.\nA click in a sensitive margin emits a `margin_click` event. By default, all\nmargins are insensitive.
+margin_sensitive_n buffer.margin_sensitive_n (table)\nTable of mouse click sensitivity booleans for margins from zero to four.\nA click in a sensitive margin emits a `MARGIN_CLICK` event. By default, all\nmargins are insensitive.
margin_style buffer.margin_style (table)\nTable of style numbers for text margin lines starting from zero.\nOnly some style attributes are active in text margins: font,\nsize/size_fractional, bold/weight, italics, fore, back, and character_set.
margin_style_offset buffer.margin_style_offset (number)\nThe start of the range of style numbers used for margin text.\nMargin styles may be completely separated from standard text styles by\nsetting a style offset. For example, setting this to `256` would allow the\nmargin styles to be numbered from `256` upto `511` so they do not overlap\nstyles set by lexers. Each style number set with `buffer.margin_style` has\nthe offset added before looking up the style.
margin_text buffer.margin_text (table)\nTable of text in the text margin for lines starting from zero.
@@ -1235,8 +1243,8 @@ margin_width_n buffer.margin_width_n (table)\nTable of margin widths expressed i
marker_add buffer.marker_add(buffer, line, marker_num)\nAdd a marker to a line, returning an ID which can be used to find or delete\nthe marker.\nReturns `-1` if this fails (illegal line number, out of memory).\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`.\n@return number
marker_add_set buffer.marker_add_set(buffer, line, marker_mask)\nAdd a set of markers to a line.\n@param buffer The global buffer.\n@param line The line number.\n@param marker_mask A mask of markers to set. Set bit 0 to set marker 0, bit\n 1 for marker 1 and so on.
marker_alpha buffer.marker_alpha (table, Write-only)\nTable of alpha values used for markers that are drawn in the text area, not\nthe margin.\nMarkers are numbers in the range of `0` to `31`. Alpha values are between\n`0` (transparent) and `255` (opaque), or `256` for no alpha.
-marker_back buffer.marker_back (table, Write-only)\nTable of the background colors used for particular marker numbers.\nMarker numbers are in the range of `0` to `31`. Colors are in `0xBBGGRR`\nformat.
-marker_back_selected buffer.marker_back_selected (table, Write-only)\nTable of the background colors used for particular marker numbers when\ntheir folding blocks are selected.\nMarker numbers are in the range of `0` to `31`. Colors are in `0xBBGGRR`\nformat. The default color is `#FF0000`.
+marker_back buffer.marker_back (table, Write-only)\nTable of the background colors used for particular marker numbers.\nMarker numbers are in the range of `0` to `31`. Colors are in "0xBBGGRR"\nformat.
+marker_back_selected buffer.marker_back_selected (table, Write-only)\nTable of the background colors used for particular marker numbers when\ntheir folding blocks are selected.\nMarker numbers are in the range of `0` to `31`. Colors are in "0xBBGGRR"\nformat. The default color is `0x0000FF`.
marker_define buffer.marker_define(buffer, marker_num, marker_symbol)\nSet the symbol used for a particular marker number.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of `0` to `31`.\n@param marker_symbol A marker symbol: `_SCINTILLA.constants.SC_MARK_*`.\n@see _SCINTILLA.next_marker_number
marker_define_pixmap buffer.marker_define_pixmap(buffer, marker_num, pixmap)\nDefine a marker from a pixmap.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of `0` to `31`.\n@param pixmap `NULL`-terminated pixmap data.
marker_define_rgba_image buffer.marker_define_rgba_image(buffer, marker_num, pixels)\nDefine a marker from RGBA data.\nIt has the width and height from `buffer.rgba_image_width` and\n`buffer.rgba_image_height`.\n@param buffer The global buffer.\n@param marker_num A marker number in the range of `0` to `31`.\n@param pixels A sequence of 4 byte pixel values starting with the pixels for\n the top line, with the leftmost pixel first, then continuing with the\n pixels for subsequent lines. There is no gap between lines for alignment\n reasons. Each pixel consists of, in order, a red byte, a green byte, a blue\n byte and an alpha byte. The colour bytes are not premultiplied by the alpha\n value. That is, a fully red pixel that is 25% opaque will be `[FF, 00, 00,\n 3F]`.
@@ -1244,7 +1252,7 @@ marker_delete buffer.marker_delete(buffer, line, marker_num)\nDelete a marker fr
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_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_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
marker_next buffer.marker_next(buffer, start_line, marker_mask)\nFind the next line at or after start_line that includes a marker in mask.\nReturn `-1` when no more lines.\n@param buffer The global buffer.\n@param start_line The start line.\n@param marker_mask A mask of markers to find. Set bit 0 to find marker 0, bit\n 1 for marker 1 and so on.\n@return number
@@ -1259,7 +1267,7 @@ math _G.math (module)\nLua math module.
max math.max(x, ···)\nReturns the maximum value among its arguments.
max_line_state buffer.max_line_state (number, Read-only)\nThe last line number that has line state.
menu _M.textadept.menu (module)\nProvides dynamic menus for Textadept.\nThis module should be `require`d last, after `_M.textadept.keys` since it\nlooks up defined key commands to show them in menus.
-menu gui.menu(menu_table)\nCreates a menu, returning the userdata.\nThis is a low-level function. You probably want to use the higher-level\n`_M.textadept.menu.set_menubar()` or `_M.textadept.menu.set_contextmenu()`\nfunctions. Emits a `MENU_CLICKED` event when a menu item is selected.\n@param menu_table A table defining the menu. It is an ordered list of tables\n with a string menu item, integer menu ID, and optional GDK keycode and\n modifier mask. The latter two are used to display key shortcuts in the\n menu. `_` characters are treated as a menu mnemonics. If the menu item is\n empty, a menu separator item is created. Submenus are just nested\n menu-structure tables. Their title text is defined with a `title` key.\n@usage gui.menu{ { '_New', 1 }, { '_Open', 2 }, { '' }, { '_Quit', 4 } }\n@usage gui.menu{ { '_New', 1, string.byte('n'), 4 } } -- 'Ctrl+N'\n@see events.MENU_CLICKED\n@see _M.textadept.menu.set_menubar\n@see _M.textadept.menu.set_contextmenu
+menu gui.menu(menu_table)\nCreates a menu, returning the userdata.\nThis is a low-level function. You probably want to use the higher-level\n`_M.textadept.menu.set_menubar()` or `_M.textadept.menu.set_contextmenu()`\nfunctions. Emits a `MENU_CLICKED` event when a menu item is selected.\n@param menu_table A table defining the menu. It is an ordered list of tables\n with a string menu item, integer menu ID, and optional GDK keycode and\n modifier mask. The latter two are used to display key shortcuts in the\n menu. '_' characters are treated as a menu mnemonics. If the menu item is\n empty, a menu separator item is created. Submenus are just nested\n menu-structure tables. Their title text is defined with a `title` key.\n@usage gui.menu{ { '_New', 1 }, { '_Open', 2 }, { '' }, { '_Quit', 4 } }\n@usage gui.menu{ { '_New', 1, string.byte('n'), 4 } } -- 'Ctrl+N'\n@see events.MENU_CLICKED\n@see _M.textadept.menu.set_menubar\n@see _M.textadept.menu.set_contextmenu
menubar _M.textadept.menu.menubar (table)\nContains the main menubar.\n@see set_menubar
menubar gui.menubar (table)\nA table of menus defining a menubar. (Write-only)\n@see _M.textadept.menu.set_menubar
mime_types _M.textadept.mime_types (module)\nHandles file type detection.
@@ -1274,21 +1282,21 @@ move_selected_lines_down buffer.move_selected_lines_down(buffer)\nMove the selec
move_selected_lines_up buffer.move_selected_lines_up(buffer)\nMove the selected lines up one line, shifting the line above after the\nselection.\nThe selection will be automatically extended to the beginning of the\nselection's first line and the end of the seletion's last line. If nothing\nwas selected, the line the cursor is currently at will be selected.\n@param buffer The global buffer.
multi_paste buffer.multi_paste (bool)\nThe effect of pasting when there are multiple selections.\n\n* `_SCINTILLA.constants.SC_MULTIPASTE_ONCE` (0)\n Pasted text can go into just the main selection (default).\n* `_SCINTILLA.constants.SC_MULTIPASTE_EACH` (1)\n Pasted text can go into each selection.
multiple_selection buffer.multiple_selection (bool)\nWhether multiple selections can be made.\nWhen multiple selection is disabled, it is not possible to select multiple\nranges by holding down the Ctrl key while dragging with the mouse.
-nested_pair lexer.nested_pair(start_chars, end_chars, end_optional)\nSimilar to `delimited_range()`, but allows for multi-character delimitters.\nThis is useful for lexers with tokens such as nested block comments. With\nsingle-character delimiters, this function is identical to\n`delimited_range(start_chars..end_chars, nil, end_optional, true)`.\n@param start_chars The string starting a nested sequence.\n@param end_chars The string ending a nested sequence.\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@usage local nested_comment = l.nested_pair('/*', '*/', true)
+nested_pair lexer.nested_pair(start_chars, end_chars, end_optional)\nSimilar to `delimited_range()`, but allows for multi-character, nested\ndelimiters.\nWith single-character delimiters, this function is identical to\n`delimited_range(start_chars..end_chars, nil, end_optional, true)`.\n@param start_chars The string starting a nested sequence.\n@param end_chars The string ending a nested sequence.\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@usage local nested_comment = l.nested_pair('/*', '*/', true)\n@return pattern
new _M.textadept.adeptsense.new(lang)\nCreates a new Adeptsense for the given lexer language.\nOnly one sense can exist per language.\n@param lang The lexer language to create an Adeptsense for.\n@usage local lua_sense = _M.textadept.adeptsense.new('lua')\n@return adeptsense
new_buffer _G.new_buffer()\nCreates a new buffer.\nEmits a `BUFFER_NEW` event.\n@return the new buffer.\n@see events.BUFFER_NEW
new_line buffer.new_line(buffer)\nInsert a new line, may use a CRLF, CR or LF depending on EOL mode.\n@param buffer The global buffer.
-newline lexer.newline\nMatches any newline characters.
+newline lexer.newline (pattern)\nMatches any newline characters.
next _G.next(table [, index])\nAllows a program to traverse all fields of a table. Its first argument is\na table and its second argument is an index in this table. `next` returns\nthe next index of the table and its associated value. When called with nil\nas its second argument, `next` returns an initial index and its associated\nvalue. When called with the last index, or with nil in an empty table, `next`\nreturns nil. If the second argument is absent, then it is interpreted as\nnil. In particular, you can use `next(t)` to check whether a table is empty.\n\nThe order in which the indices are enumerated is not specified, *even for\nnumeric indices*. (To traverse a table in numeric order, use a numerical\n`for`.)\n\nThe behavior of `next` is undefined if, during the traversal, you assign any\nvalue to a non-existent field in the table. You may however modify existing\nfields. In particular, you may clear existing fields.
next_indic_number _SCINTILLA.next_indic_number()\nReturns a unique indicator number.\nUse this function for custom indicators in order to prevent clashes with\nidentifiers of other custom indicators.\n@usage local indic_num = _SCINTILLA.next_indic_number()\n@see buffer.indic_style
next_marker_number _SCINTILLA.next_marker_number()\nReturns a unique marker number.\nUse this function for custom markers in order to prevent clashes with\nidentifiers of other custom markers.\n@usage local marknum = _SCINTILLA.next_marker_number()\n@see buffer.marker_define
next_user_list_type _SCINTILLA.next_user_list_type()\nReturns a unique user list type.\nUse this function for custom user lists in order to prevent clashes with\nlist identifiers of other custom user lists.\n@usage local list_type = _SCINTILLA.next_user_list_type()\n@see buffer.user_list_show
-nonnewline lexer.nonnewline\nMatches any non-newline character.
-nonnewline_esc lexer.nonnewline_esc\nMatches any non-newline character excluding newlines escaped with `\\`.
-oct_num lexer.oct_num\nMatches an octal number.
-open _M.textadept.snapopen.open(utf8_paths, filter, exclude_PATHS, exclude_FILTER, depth)\nQuickly open files in set of directories using a filtered list dialog.\nThe number of files in the list is capped at `MAX`.\n@param utf8_paths A UTF-8 string directory path or table of UTF-8 directory\n paths to search.\n@param filter A filter for files and folders to exclude. The filter may be\n a string or table. Each filter is a Lua pattern. Any files matching a\n filter are excluded. Prefix a pattern with `!` to exclude any files that\n do not match a filter. File extensions can be more efficiently excluded by\n adding the extension text to a table assigned to an `extensions` key in the\n filter table instead of using individual filters. Directories can be\n excluded by adding filters to a table assigned to a `folders` key in the\n filter table. All strings should be UTF-8 encoded.\n@param exclude_PATHS Flag indicating whether or not to exclude `PATHS` in the\n search. The default value is `false`.\n@param exclude_FILTER Flag indicating whether or not to exclude `FILTER` from\n `filter` in the search. If false, adds `FILTER` to the given `filter`.\n The default value is `false`.\n@param depth Number of directories to recurse into for finding files.\n The default value is `DEFAULT_DEPTH`.\n@usage _M.textadept.snapopen.open() -- list all files in PATHS\n@usage _M.textadept.snapopen.open(buffer.filename:match('^.+/'), nil, true)\n -- list all files in the current file's directory\n@usage _M.textadept.snapopen.open(nil, '!%.lua$') -- list all Lua files in\n PATHS\n@usage _M.textadept.snapopen.open('/project', { folders = { 'secret' } },\n true) -- list all project files except those in a secret folder\n@see PATHS\n@see FILTER\n@see DEFAULT_DEPTH\n@see MAX
+nonnewline lexer.nonnewline (pattern)\nMatches any non-newline character.
+nonnewline_esc lexer.nonnewline_esc (pattern)\nMatches any non-newline character excluding newlines escaped with `\`.
+oct_num lexer.oct_num (pattern)\nMatches an octal number.
+open _M.textadept.snapopen.open(utf8_paths, filter, exclude_PATHS, exclude_FILTER, depth)\nQuickly open files in set of directories using a filtered list dialog.\nThe number of files in the list is capped at `MAX`.\n@param utf8_paths A UTF-8 string directory path or table of UTF-8 directory\n paths to search.\n@param filter A filter for files and folders to exclude. The filter may be\n a string or table. Each filter is a Lua pattern. Any files matching a\n filter are excluded. Prefix a pattern with '!' to exclude any files that\n do not match a filter. File extensions can be more efficiently excluded by\n adding the extension text to a table assigned to an `extensions` key in the\n filter table instead of using individual filters. Directories can be\n excluded by adding filters to a table assigned to a `folders` key in the\n filter table. All strings should be UTF-8 encoded.\n@param exclude_PATHS Flag indicating whether or not to exclude `PATHS` in the\n search. The default value is `false`.\n@param exclude_FILTER Flag indicating whether or not to exclude `FILTER` from\n `filter` in the search. If false, adds `FILTER` to the given `filter`.\n The default value is `false`.\n@param depth Number of directories to recurse into for finding files.\n The default value is `DEFAULT_DEPTH`.\n@usage _M.textadept.snapopen.open() -- list all files in PATHS\n@usage _M.textadept.snapopen.open(buffer.filename:match('^.+/'), nil, true)\n -- list all files in the current file's directory\n@usage _M.textadept.snapopen.open(nil, '!%.lua$') -- list all Lua files in\n PATHS\n@usage _M.textadept.snapopen.open('/project', { folders = { 'secret' } },\n true) -- list all project files except those in a secret folder\n@see PATHS\n@see FILTER\n@see DEFAULT_DEPTH\n@see MAX
open io.open(filename [, mode])\nThis function opens a file, in the mode specified in the string `mode`. It\nreturns a new file handle, or, in case of errors, nil plus an error message.\n\nThe `mode` string can be any of the following:\n "r": read mode (the default);\n "w": write mode;\n "a": append mode;\n "r+": update mode, all previous data is preserved;\n "w+": update mode, all previous data is erased;\n "a+": append update mode, previous data is preserved, writing is only\n allowed at the end of file.\n\nThe `mode` string can also have a '`b`' at the end, which is needed in\nsome systems to open the file in binary mode.
-open_file io.open_file(utf8_filenames)\nOpens a list of files.\nEmits a `FILE_OPENED` event.\n@param utf8_filenames A `\n` separated list of UTF-8-encoded filenames to\n open. If `nil`, the user is prompted with a fileselect dialog.\n@usage io.open_file(utf8_encoded_filename)\n@see _G.events
+open_file io.open_file(utf8_filenames)\nOpens a list of files.\nEmits a `FILE_OPENED` event.\n@param utf8_filenames A "\n" separated list of UTF-8-encoded filenames to\n open. If `nil`, the user is prompted with a fileselect dialog.\n@usage io.open_file(utf8_encoded_filename)\n@see _G.events
open_recent_file io.open_recent_file()\nPrompts the user to open a recently opened file.\n@see recent_files
os _G.os (module)\nLua os module.
output io.output([file])\nSimilar to `io.input`, but operates over the default output file.
@@ -1327,7 +1335,7 @@ pow math.pow(x, y)\nReturns *x^y*. (You can also use the expression `x^y` to com
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\nMatches any printable character (space to `~`).
+print lexer.print (pattern)\nMatches any printable character (space 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).
@@ -1337,8 +1345,11 @@ 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\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.
+python _M.python (module)\nThe python module.\nIt provides utilities for editing Python code.
quit _G.quit()\nQuits Textadept.\nEmits a `QUIT` event. If any handler returns `false`, Textadept does not\nquit.\n@see events.QUIT
rad math.rad(x)\nReturns the angle `x` (given in degrees) in radians.
rails _G.keys.rails (table)\nContainer for Rails-specific key bindings.
@@ -1377,9 +1388,9 @@ replace_entry_text gui.find.replace_entry_text (string)\nThe text in the replace
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_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
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
+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.
reverse string.reverse(s)\nReturns a string that is the string `s` reversed.
rgba_image_height buffer.rgba_image_height (number)\nThe height for future RGBA image data.
@@ -1396,8 +1407,8 @@ ruby _G.keys.ruby (table)\nContainer for Ruby-specific key bindings.
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 _M.textadept.run (module)\nCompile and run/execute source files with Textadept.\nTypically, language-specific modules populate the `compile_command`,\n`run_command`, and `error_detail` tables for a particular language's file\nextension.
-run _M.textadept.run.run()\nRuns/executes the file based on its extension using the command from the\n`run_command` table.\n@see run_command
-run_command _M.textadept.run.run_command (table)\nFile extensions and their associated "run" shell commands.\nEach key is a file extension whose value is either a command line string to\nexecute or a function returning one.\nThis table is typically populated by language-specific modules.
+run _M.textadept.run.run()\nRuns/executes the file based on its extension using the command from the\n`run_command` table.\nEmits a `RUN_OUTPUT` event.\n@see run_command\n@see _G.events
+run_command _M.textadept.run.run_command (table)\nFile extensions and their associated "run" shell commands.\nEach key is a file extension whose value is either a command line string to\nexecute or a function returning one. The command string can have the\nfollowing macros:\n\n + `%(filepath)`: The full path of the current file.\n + `%(filedir)`: The current file's directory path.\n + `%(filename)`: The name of the file including extension.\n + `%(filename_noext)`: The name of the file excluding extension.\n\nThis table is typically populated by language-specific modules.
running coroutine.running()\nReturns the running coroutine plus a boolean, true when the running coroutine\nis the main one.
save _M.textadept.session.save(filename)\nSaves a Textadept session to a file.\nSaves split views, opened buffers, cursor information, and recent files.\n@param filename The absolute path to the session file to save. If `nil`, the\n user is prompted for one.\n@usage _M.textadept.session.save(filename)\n@see DEFAULT_SESSION
save buffer.save(buffer)\nSaves the current buffer to a file.\nEmits `FILE_BEFORE_SAVE` and `FILE_AFTER_SAVE` events.\n@param buffer The global buffer.\n@see _G.events
@@ -1409,7 +1420,7 @@ scroll_to_start buffer.scroll_to_start(buffer)\nScroll to start of document.\n@p
scroll_width buffer.scroll_width (number)\nThe document width assumed for scrolling.\nFor performance, the view does not measure the display width of the\ndocument to determine the properties of the horizontal scroll bar. Instead,\nan assumed width is used. The default value is `2000`. To ensure the width\nof the currently visible lines can be scrolled use\n`buffer.scroll_width_tracking`.
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_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
@@ -1426,7 +1437,7 @@ select_indented_block _M.textadept.editing.select_indented_block()\nSelects inde
select_lexer _M.textadept.mime_types.select_lexer()\nPrompts the user to select a lexer from a filtered list for the current\nbuffer.\n@see buffer.set_lexer
select_line _M.textadept.editing.select_line()\nSelects the current line.
select_paragraph _M.textadept.editing.select_paragraph()\nSelects the current paragraph.\nParagraphs are surrounded by one or more blank lines.
-select_theme gui.select_theme()\nPrompts the user to select an editor theme from a filtered list dialog.\nThemes in the `_HOME/themes/` and `_USERHOME/themes/` directories are listed.
+select_theme gui.select_theme()\nPrompts the user to select an editor theme from a filtered list dialog.\nThemes in the *`_HOME`/themes/* and *`_USERHOME`/themes/* directories are\nlisted.
select_word _M.textadept.editing.select_word()\nSelects the current word under the caret.\n@see buffer.word_chars
selection_duplicate buffer.selection_duplicate(buffer)\nDuplicate the selection.\nIf selection empty duplicate the line containing the caret.\n@param buffer The global buffer.
selection_empty buffer.selection_empty (bool, Read-only)\nIs every selected range empty?
@@ -1442,15 +1453,16 @@ selection_n_start buffer.selection_n_start (table)\nTable of positions that star
selection_start buffer.selection_start (number)\nThe position that starts the selection - this becomes the anchor.\nThis does not make the caret visible.
selections buffer.selections (number, Read-only)\nThe number of selections currently active.
self _M.textadept.adeptsense.syntax.self (table)\nThe language's syntax-equivalent of `self`. Default is `'self'`.
-sense _M.cpp.sense\nThe C/C++ Adeptsense.\n It loads user tags from `_USERHOME/modules/cpp/tags` and user apidocs from\n `_USERHOME/modules/cpp/api`.
-sense _M.css.sense\nThe CSS Adeptsense.\n It loads user tags from `_USERHOME/modules/css/tags` and user apidocs from\n `_USERHOME/modules/css/api`.
-sense _M.hypertext.sense\nThe HTML Adeptsense.\n It loads user tags from `_USERHOME/modules/hypertext/tags` and user apidocs\n from `_USERHOME/modules/hypertext/api`.
-sense _M.java.sense\nThe Java Adeptsense.\n It loads user tags from `_USERHOME/modules/java/tags` and user apidocs from\n `_USERHOME/modules/java/api`.
-sense _M.lua.sense\nThe Lua Adeptsense.\n It loads user tags from `_USERHOME/modules/lua/tags` and user apidocs from\n `_USERHOME/modules/lua/api`.
-sense _M.php.sense\nThe PHP Adeptsense.\n It loads user tags from `_USERHOME/modules/php/tags` and user apidocs from\n `_USERHOME/modules/php/api`.
-sense _M.rails.sense\nThe Rails Adeptsense.\n It loads user tags from `_USERHOME/modules/rails/tags` and user apidocs\n from `_USERHOME/modules/rails/api`.
-sense _M.rhtml.sense\nThe RHTML Adeptsense.\n It loads user tags from `_USERHOME/modules/rhtml/tags` and user apidocs\n from `_USERHOME/modules/rhtml/api`.
-sense _M.ruby.sense\nThe Ruby Adeptsense.\n It loads user tags from `_USERHOME/modules/ruby/tags` and user apidocs from\n `_USERHOME/modules/ruby/api`.
+sense _M.cpp.sense\nThe C/C++ Adeptsense.\n It loads user tags from *`_USERHOME`/modules/cpp/tags* and user apidocs\n from *`_USERHOME`/modules/cpp/api*.
+sense _M.css.sense\nThe CSS Adeptsense.\n It loads user tags from *`_USERHOME`/modules/css/tags* and user apidocs\n from *`_USERHOME`/modules/css/api*.
+sense _M.hypertext.sense\nThe HTML Adeptsense.\n It loads user tags from *`_USERHOME`/modules/hypertext/tags* and user\n apidocs from *`_USERHOME`/modules/hypertext/api*.
+sense _M.java.sense\nThe Java Adeptsense.\n It loads user tags from *`_USERHOME`/modules/java/tags* and user apidocs\n from *`_USERHOME`/modules/java/api*.
+sense _M.lua.sense\nThe Lua Adeptsense.\n It loads user tags from *`_USERHOME`/modules/lua/tags* and user apidocs\n from *`_USERHOME`/modules/lua/api*.
+sense _M.php.sense\nThe PHP Adeptsense.\n It loads user tags from *`_USERHOME`/modules/php/tags* and user apidocs\n from *`_USERHOME`/modules/php/api*.
+sense _M.python.sense\nThe Python Adeptsense.\n It loads user tags from *`_USERHOME`/modules/python/tags* and user apidocs\n from *`_USERHOME`/modules/python/api*.
+sense _M.rails.sense\nThe Rails Adeptsense.\n It loads user tags from *`_USERHOME`/modules/rails/tags* and user apidocs\n from *`_USERHOME`/modules/rails/api*.
+sense _M.rhtml.sense\nThe RHTML Adeptsense.\n It loads user tags from *`_USERHOME`/modules/rhtml/tags* and user apidocs\n from *`_USERHOME`/modules/rhtml/api*.
+sense _M.ruby.sense\nThe Ruby Adeptsense.\n It loads user tags from *`_USERHOME`/modules/ruby/tags* and user apidocs\n from *`_USERHOME`/modules/ruby/api*.
session _M.textadept.session (module)\nSession support for Textadept.
set_buffer_properties _M.cpp.set_buffer_properties()\nSets default buffer properties for C/C++ files.
set_buffer_properties _M.css.set_buffer_properties()\nSets default buffer properties for CSS files.
@@ -1458,29 +1470,30 @@ set_buffer_properties _M.hypertext.set_buffer_properties()\nSets default buffer
set_buffer_properties _M.java.set_buffer_properties()\nSets default buffer properties for Java files.
set_buffer_properties _M.lua.set_buffer_properties()\nSets default buffer properties for Lua files.
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\n`0x20`, 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')
-set_fold_margin_colour buffer.set_fold_margin_colour(buffer, use_setting, color)\nSet the colors used as a chequerboard 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_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_fold_margin_colour buffer.set_fold_margin_colour(buffer, use_setting, color)\nSet the colors used as a chequerboard 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_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_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.
set_sel buffer.set_sel(buffer, start_pos, end_pos)\nSelect a range of text.\nThe caret is scrolled into view after this operation.\n@param buffer The global buffer.\n@param start_pos Start position. If negative, it means the end of the\n document.\n@param end_pos End position. If negative, it means remove any selection (i.e.\n set the `anchor` to the same position as `current_pos`).
-set_sel_back buffer.set_sel_back(buffer, use_setting, color)\nSet the background color of the main and additional selections and whether to\nuse this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in `0xBBGGRR` format.
-set_sel_fore buffer.set_sel_fore(buffer, use_setting, color)\nSet the foreground color of the main and additional selections and whether\nto 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_sel_back buffer.set_sel_back(buffer, use_setting, color)\nSet the background color of the main and additional selections and whether to\nuse this setting.\n@param buffer The global buffer.\n@param use_setting Enable color change.\n@param color A color in "0xBBGGRR" format.
+set_sel_fore buffer.set_sel_fore(buffer, use_setting, color)\nSet the foreground color of the main and additional selections and whether\nto 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_selection buffer.set_selection(buffer, caret, anchor)\nSet a simple selection from anchor to caret.\n@param buffer The global buffer.\n@param caret The caret.\n@param anchor The anchor.
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 (`\`\non Windows, `/` otherwise), it is assumed to be an absolute path to a theme\ninstead of a theme name. An error is thrown if the theme is not found. Any\nerrors in the theme are printed to `io.stderr`.\n@param name The name or absolute path of a theme. If nil, sets the default\n theme.
+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`.\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_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_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.
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).
@@ -1493,7 +1506,7 @@ setmode lfs.setmode(file, mode)\nSets the writing mode for a file. The mode stri
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.
setuservalue debug.setuservalue(udata, value)\nSets the given `value` as the Lua value associated to the given `udata`.\n`value` must be a table or nil; `udata` must be a full userdata.\n\nReturns `udata`.
setvbuf file:setvbuf(mode [, size])\nSets the buffering mode for an output file. There are three available\nmodes:\n "no": no buffering; the result of any output operation appears immediately.\n "full": full buffering; output operation is performed only when the\n buffer is full or when you explicitly `flush` the file (see\n `io.flush`).\n "line": line buffering; output is buffered until a newline is output or\n there is any input from some special files (such as a terminal\n device).\n\nFor the last two cases, `size` specifies the size of the buffer, in\nbytes. The default is an appropriate size.
-shebangs _M.textadept.mime_types.shebangs (table)\nTable of shebang words and their associated lexers.\nIf the file has a shebang line, a line that starts with `#!` and is the first\nline in the file, each shebang word is matched against that line.
+shebangs _M.textadept.mime_types.shebangs (table)\nTable of shebang words and their associated lexers.\nIf the file has a shebang line, a line that starts with "#!" and is the first\nline in the file, each shebang word is matched against that line.
show_apidoc _M.textadept.adeptsense.show_apidoc(sense)\nShows a calltip with API documentation for the symbol behind the caret.\nIf documentation is already being shown, cycles through multiple definitions.\n@param sense The Adeptsense returned by `adeptsense.new()`. If `nil`, uses\n the current language's Adeptsense (if it exists).\n@return list of api docs on success or `nil`.\n@see get_symbol\n@see get_apidoc
show_completions gui.command_entry.show_completions(completions)\nShows the given list of completions for the current word prefix.\nOn selection, the current word prefix is replaced with the completion. Word\nprefix characters are alphanumerics and underscores.\n@param completions The table of completions to show. Non-string values are\n ignored.
show_lines buffer.show_lines(buffer, start_line, end_line)\nMake a range of lines visible.\nThis has no effect on fold levels or fold flags. `start_line` can not be\nhidden.\n@param buffer The global buffer.\n@param start_line The start line.\n@param end_line The end line.
@@ -1506,12 +1519,12 @@ 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\nMatches any whitespace character (`\t`, `\v`, `\f`, `\n`, `\r`, space).
+space lexer.space (pattern)\nMatches any whitespace character (`\t`, `\v`, `\f`, `\n`, `\r`, space).
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.
start_styling buffer.start_styling(buffer, position, mask)\nSet the current styling position to pos and the styling mask to mask.\nThe styling mask can be used to protect some bits in each styling byte from\nmodification.\n@param buffer The global buffer.\n@param position The styling position.\n@param mask The bit mask of the style bytes that can be set.
-starts_line lexer.starts_line(patt)\nCreates an LPeg pattern from a given pattern that matches the beginning of a\nline and returns it.\n@param patt The LPeg pattern to match at the beginning of a line.\n@usage local preproc = token(l.PREPROCESSOR, #P('#') * l.starts_line('#' *\n l.nonnewline^0))
+starts_line lexer.starts_line(patt)\nCreates and returns a pattern that matches the given pattern only at the\nbeginning of a line.\n@param patt The LPeg pattern to match on the beginning of a line.\n@usage local preproc = token(l.PREPROCESSOR, #P('#') * l.starts_line('#' *\n l.nonnewline^0))\n@return pattern
status buffer.status (number)\nThe error status.\n\n* `_SCINTILLA.constants.SC_STATUS_OK` (0)\n No failures.\n* `_SCINTILLA.constants.SC_STATUS_FAILURE` (1)\n Generic failure.\n* `_SCINTILLA.constants.SC_STATUS_BADALLOC` (2)\n Memory is exhausted.
status coroutine.status(co)\nReturns the status of coroutine `co`, as a string: `"running"`, if\nthe coroutine is running (that is, it called `status`); `"suspended"`, if\nthe coroutine is suspended in a call to `yield`, or if it has not started\nrunning yet; `"normal"` if the coroutine is active but not running (that\nis, it has resumed another coroutine); and `"dead"` if the coroutine has\nfinished its body function, or if it has stopped with an error.
statusbar_text gui.statusbar_text (string, Write-only)\nThe text displayed by the statusbar.
@@ -1524,47 +1537,47 @@ stuttered_page_down buffer.stuttered_page_down(buffer)\nMove caret to bottom of
stuttered_page_down_extend buffer.stuttered_page_down_extend(buffer)\nMove caret to bottom of page, or one page down if already at bottom of page,\nextending selection to new caret position.\n@param buffer The global buffer.
stuttered_page_up buffer.stuttered_page_up(buffer)\nMove caret to top of page, or one page up if already at top of page.\n@param buffer The global buffer.
stuttered_page_up_extend buffer.stuttered_page_up_extend(buffer)\nMove caret to top of page, or one page up if already at top of page,\nextending selection to new caret position.\n@param buffer The global buffer.
-style lexer.style(style_table)\nCreates a Scintilla style from a table of style properties.\n@param style_table A table of style properties.\nStyle properties available:\n * font [string]\n * size [integer]\n * bold [boolean]\n * italic [boolean]\n * underline [boolean]\n * fore [integer] (Use value returned by `color()`)\n * back [integer] (Use value returned by `color()`)\n * eolfilled [boolean]\n * characterset [?]\n * case [integer]\n * visible [boolean]\n * changeable [boolean]\n * hotspot [boolean]\n@usage local bold_italic = style { bold = true, italic = true }\n@see color
+style lexer.style(style_table)\nCreates a Scintilla style from the given table of style properties.\n@param style_table A table of style properties:\n * `font` (string) The name of the font the style uses.\n * `size` (integer) The size of the font the style uses.\n * `bold` (boolean) Is the font face bold?\n * `italic` (boolean) Is the font face italic?\n * `underline` (boolean) Is the font face underlined?\n * `fore` (integer) The foreground `color` of the font face.\n * `back` (integer) The background `color` of the font face.\n * `eolfilled` (boolean) Does the background color extend to the end of the\n line?\n * `case` (integer) The case of the font (1 = upper, 2 = lower, 0 = normal).\n * `visible` (boolean) Is the text visible?\n * `changeable` (boolean) Is the text changable or read-only?\n * `hotspot` (boolean) Is the text clickable?\n@usage local style_bold_italic = style { bold = true, italic = true }\n@usage local style_grey = style { fore = l.colors.grey }\n@return style table\n@see color
style_at buffer.style_at (table, Read-only)\nTable of style bytes at positions in the document starting at zero.
-style_back buffer.style_back (table)\nTable of background colors in `0xBBGGRR` format for styles from `0` to\n`255`.
+style_back buffer.style_back (table)\nTable of background colors in "0xBBGGRR" format for styles from `0` to\n`255`.
style_bits buffer.style_bits (number)\nThe number of bits in style bytes used to hold the lexical state.
style_bits_needed buffer.style_bits_needed (number, Read-only)\nThe number of bits the current lexer needs for styling.
style_bold buffer.style_bold (table)\nTable of booleans for bold styles from `0` to `255`.
style_case buffer.style_case (table)\nTable of cases for styles from `0` to `255`.\n\n* `_SCINTILLA.constants.SC_CASE_MIXED` (0)\n Normal, mixed case.\n* `_SCINTILLA.constants.SC_CASE_UPPER` (1)\n Upper case.\n* `_SCINTILLA.constants.SC_CASE_LOWER` (2)\n Lower case.
style_changeable buffer.style_changeable (table)\nTable of booleans for changeable styles from `0` to `255`.\nThe default setting is `true`.
style_character_set buffer.style_character_set (table)\nTable of character sets for styles from `0` to `255`.
-style_class lexer.style_class\nStyle typically used for class definitions.
+style_class lexer.style_class (table)\nStyle typically used for class definitions.
style_clear_all buffer.style_clear_all(buffer)\nClear all the styles and make equivalent to the global default style.\n@param buffer The global buffer.
-style_comment lexer.style_comment\nStyle typically used for code comments.
-style_constant lexer.style_constant\nStyle typically used for constants.
-style_definition lexer.style_definition\nStyle typically used for definitions.
-style_embedded lexer.style_embedded\nStyle typically used for embedded code.
+style_comment lexer.style_comment (table)\nStyle typically used for code comments.
+style_constant lexer.style_constant (table)\nStyle typically used for constants.
+style_definition lexer.style_definition (table)\nStyle typically used for definitions.
+style_embedded lexer.style_embedded (table)\nStyle typically used for embedded code.
style_eol_filled buffer.style_eol_filled (table)\nTable of booleans for end of line filled styles from `0` to `255`.
-style_error lexer.style_error\nStyle typically used for erroneous syntax.
+style_error lexer.style_error (table)\nStyle typically used for erroneous syntax.
style_font buffer.style_font (table)\nTable of font faces for styles from `0` to `255`.
-style_fore buffer.style_fore (table)\nTable of foreground colors in `0xBBGGRR` format for styles from `0` to\n`255`.
-style_function lexer.style_function\nStyle typically used for function definitions.
+style_fore buffer.style_fore (table)\nTable of foreground colors in "0xBBGGRR" format for styles from `0` to\n`255`.
+style_function lexer.style_function (table)\nStyle typically used for function definitions.
style_hot_spot buffer.style_hot_spot (table)\nTable of boolean hotspot styles from `0` to `255`.
-style_identifier lexer.style_identifier\nStyle typically used for identifier words.
+style_identifier lexer.style_identifier (table)\nStyle typically used for identifier words.
style_italic buffer.style_italic (table)\nTable of booleans for italic styles from `0` to `255`.
-style_keyword lexer.style_keyword\nStyle typically used for language keywords.
-style_label lexer.style_label\nStyle typically used for labels.
-style_nothing lexer.style_nothing\nStyle typically used for no styling.
-style_number lexer.style_number\nStyle typically used for numbers.
-style_operator lexer.style_operator\nStyle typically used for operators.
-style_preproc lexer.style_preproc\nStyle typically used for preprocessor statements.
-style_regex lexer.style_regex\nStyle typically used for regular expression strings.
+style_keyword lexer.style_keyword (table)\nStyle typically used for language keywords.
+style_label lexer.style_label (table)\nStyle typically used for labels.
+style_nothing lexer.style_nothing (table)\nStyle typically used for no styling.
+style_number lexer.style_number (table)\nStyle typically used for numbers.
+style_operator lexer.style_operator (table)\nStyle typically used for operators.
+style_preproc lexer.style_preproc (table)\nStyle typically used for preprocessor statements.
+style_regex lexer.style_regex (table)\nStyle typically used for regular expression strings.
style_reset_default buffer.style_reset_default(buffer)\nReset the default style to its state at startup.\n@param buffer The global buffer.
style_size buffer.style_size (table)\nTable of font sizes for styles from `0` to `255`.\nFont size is a whole number of points.
style_size_fractional buffer.style_size_fractional (table)\nTable of sizes of characters for styles from `0` to `255`.\nSize is in hundreths of a point and multiplied by 100 internally. For\nexample, a text size of 9.4 points is set with 940.
-style_string lexer.style_string\nStyle typically used for strings.
-style_tag lexer.style_tag\nStyle typically used for markup tags.
-style_type lexer.style_type\nStyle typically used for static types.
+style_string lexer.style_string (table)\nStyle typically used for strings.
+style_tag lexer.style_tag (table)\nStyle typically used for markup tags.
+style_type lexer.style_type (table)\nStyle typically used for static types.
style_underline buffer.style_underline (table)\nTable of booleans for underlined styles from `0` to `255`.
-style_variable lexer.style_variable\nStyle typically used for variables.
+style_variable lexer.style_variable (table)\nStyle typically used for variables.
style_visible buffer.style_visible (table)\nTable of booleans for visible styles from `0` to `255`.
style_weight buffer.style_weight (table)\nTable of character weights for styles from `0` to `255`.\nThe weight or boldness of a font can be set with a number between 1 and 999\nwith 1 being very light and 999 very heavy. While any value can be used,\nfonts often only support between 2 and 4 weights with three weights being\ncommon enough to use symbolic names:\n\n* `_SCINTILLA.constants.SC_WEIGHT_NORMAL` (400)\n Normal.\n* `_SCINTILLA.constants.SC_WEIGHT_SEMIBOLD` (600)\n Semi-bold.\n* `_SCINTILLA.constants.SC_WEIGHT_BOLD` (700)\n Bold.
-style_whitespace lexer.style_whitespace\nStyle typically used for whitespace.
+style_whitespace lexer.style_whitespace (table)\nStyle typically used for whitespace.
sub string.sub(s, i [, j])\nReturns the substring of `s` that starts at `i` and continues until\n`j`; `i` and `j` can be negative. If `j` is absent, then it is assumed to\nbe equal to -1 (which is the same as the string length). In particular,\nthe call `string.sub(s,1,j)` returns a prefix of `s` with length `j`, and\n`string.sub(s, -i)` returns a suffix of `s` with length `i`.\n\nIf, after the translation of negative indices, `i` is less than 1, it is\ncorrected to 1. If `j` is greater than the string length, it is corrected to\nthat length. If, after these corrections, `i` is greater than `j`, the\nfunction returns the empty string.
swap_main_anchor_caret buffer.swap_main_anchor_caret(buffer)\nSwap that caret and anchor of the main selection.\n@param buffer The global buffer.
switch_buffer gui.switch_buffer()\nDisplays a dialog with a list of buffers to switch to and switches to the\nselected one, if any.
@@ -1596,7 +1609,7 @@ toggle _M.textadept.bookmarks.toggle(on)\nToggles a bookmark on the current line
toggle_block _M.ruby.toggle_block()\nToggles between `{ ... }` and `do ... end` Ruby blocks.\nIf the caret is inside a `{ ... }` single-line block, that block is converted\nto a multiple-line `do .. end` block. If the caret is on a line that contains\nsingle-line `do ... end` block, that block is converted to a single-line\n`{ ... }` block. If the caret is inside a multiple-line `do ... end` block,\nthat block is converted to a single-line `{ ... }` block with all newlines\nreplaced by a space. Indentation is important. The `do` and `end` keywords\nmust be on lines with the same level of indentation to toggle correctly.
toggle_caret_sticky buffer.toggle_caret_sticky(buffer)\nSwitch between sticky and non-sticky: meant to be bound to a key.\nSee `buffer.caret_sticky`.\n@param buffer The global buffer.
toggle_fold buffer.toggle_fold(buffer, line)\nSwitch a header line between expanded and contracted.\n@param buffer The global buffer.\n@param line The line number.
-token lexer.token(name, patt)\nCreates an LPeg capture table index with the name and position of the token.\n@param name The name of token. If this name is not in `l.tokens` then you\n will have to specify a style for it in `lexer._tokenstyles`.\n@param patt The LPeg pattern associated with the token.\n@usage local ws = token(l.WHITESPACE, l.space^1)\n@usage php_start_rule = token('php_tag', '<?' * ('php' * l.space)^-1)
+token lexer.token(name, patt)\nCreates and returns a lexer token pattern with the given name and LPeg\npattern.\n@param name The name of token. If this name is not a pre-defined token name,\n then a style needs to be assiciated with it in the lexer's `_tokenstyles`\n table.\n@param patt The LPeg pattern associated with the token.\n@usage local ws = token(l.WHITESPACE, l.space^1)\n@usage local annotation = token('annotation', '@' * l.word)\n@return pattern
tonumber _G.tonumber(e [, base])\nWhen called with no `base`, `tonumber` tries to convert its argument to a\nnumber. If the argument is already a number or a string convertible to a\nnumber (see §3.4.2), then `tonumber` returns this number; otherwise, it\nreturns nil.\n\nWhen called with `base`, then `e` should be a string to be interpreted as an\ninteger numeral in that base. The base may be any integer between 2 and 36,\ninclusive. In bases above 10, the letter '`A`' (in either upper or lower\ncase) represents 10, '`B`' represents 11, and so forth, with '`Z`'\nrepresenting 35. If the string `e` is not a valid numeral in the given base,\nthe function returns nil
tostring _G.tostring(v)\nReceives a value of any type and converts it to a string in a reasonable\nformat. (For complete control of how numbers are converted, use\n`string.format`.)\n\nIf the metatable of `v` has a `"__tostring"` field, then `tostring` calls the\ncorresponding value with `v` as argument, and uses the result of the call as\nits result.
touch lfs.touch(filepath [, atime [, mtime]])\nSet access and modification times of a file. This function is a bind to utime\nfunction. The first argument is the filename, the second argument (atime) is\nthe access time, and the third argument (mtime) is the modification time.\nBoth times are provided in seconds (which should be generated with Lua\nstandard function os.time). If the modification time is omitted, the access\ntime provided is used; if both times are omitted, the current time is used.\n\nReturns true if the operation was successful; in case of error, it returns\nnil plus an error string.
@@ -1617,7 +1630,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\nMatches any uppercase character (`A-Z`).
+upper lexer.upper (pattern)\nMatches any uppercase character (`A-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.
@@ -1645,7 +1658,7 @@ whitespace_chars buffer.whitespace_chars (string)\nThe set of characters making
whitespace_size buffer.whitespace_size (number)\nThe size of the dots used to mark space characters.
whole_word gui.find.whole_word (bool)\nOnly whole-word matches are allowed in searches.
whole_word_label_text gui.find.whole_word_label_text (string, Write-only)\nThe text of the 'Whole word' label.\nThis is primarily used for localization.
-word lexer.word\nMatches a typical word starting with a letter or underscore and then any\n alphanumeric or underscore characters.
+word lexer.word (pattern)\nMatches a typical word starting with a letter or underscore and then any\nalphanumeric or underscore characters.
word_chars _M.textadept.adeptsense.syntax.word_chars (table)\nA Lua pattern of characters allowed in a word.\n The default is `'%w_'`.
word_chars buffer.word_chars (string)\nThe set of characters making up words when moving or selecting by word.
word_end_position buffer.word_end_position(buffer, pos, only_word_chars)\nGet position of end of word.\n@param buffer The global buffer.\n@param pos The position.\n@param only_word_chars If `true`, stops searching at the first non-word\n character in the search direction. Otherwise, the first character in the\n search direction sets the type of the search as word or non-word and the\n search stops at the first non-matching character. Searches are also\n terminated by the start or end of the document.
@@ -1653,7 +1666,7 @@ word_left buffer.word_left(buffer)\nMove caret left one word.\n@param buffer The
word_left_end buffer.word_left_end(buffer)\nMove caret left one word, position cursor at end of word.\n@param buffer The global buffer.
word_left_end_extend buffer.word_left_end_extend(buffer)\nMove caret left one word, position cursor at end of word, extending selection\nto new caret position.\n@param buffer The global buffer.
word_left_extend buffer.word_left_extend(buffer)\nMove caret left one word extending selection to new caret position.\n@param buffer The global buffer.
-word_match lexer.word_match(words, word_chars, case_insensitive)\nCreates an LPeg pattern that matches a set of words.\n@param words A table of words.\n@param word_chars Optional string of additional characters considered to be\n part of a word (default is `%w_`).\n@param case_insensitive Optional boolean flag indicating whether the word\n match is case-insensitive.\n@usage local keyword = token(l.KEYWORD, word_match { 'foo', 'bar', 'baz' })\n@usage local keyword = token(l.KEYWORD, word_match({ 'foo-bar', 'foo-baz',\n 'bar-foo', 'bar-baz', 'baz-foo', 'baz-bar' }, '-', true))
+word_match lexer.word_match(words, word_chars, case_insensitive)\nCreates and returns a pattern that matches any word in the given set of\nwords.\nThis is a convenience function for simplifying a set of ordered choice word\npatterns.\n@param words A table of words.\n@param word_chars Optional string of additional characters considered to be\n part of a word. By default, word characters are alphanumerics and\n underscores (`%w_` in Lua). This parameter may be `nil` or the empty string\n to indicate no additional word characters.\n@param case_insensitive Optional boolean flag indicating whether or not the\n word match is case-insensitive. The default is `false`.\n@usage local keyword = token(l.KEYWORD, word_match { 'foo', 'bar', 'baz' })\n@usage local keyword = token(l.KEYWORD, word_match({ 'foo-bar', 'foo-baz',\n 'bar-foo', 'bar-baz', 'baz-foo', 'baz-bar' }, '-', true))\n@return pattern
word_part_left buffer.word_part_left(buffer)\nMove to the previous change in capitalisation or underscores.\n@param buffer The global buffer.
word_part_left_extend buffer.word_part_left_extend(buffer)\nMove to the previous change in capitalisation or underscores extending\nselection to new caret position.\n@param buffer The global buffer.
word_part_right buffer.word_part_right(buffer)\nMove to the next change in capitalisation or underscores.\n@param buffer The global buffer.
@@ -1673,7 +1686,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\nMatches any hexadecimal digit (`0-9`, `A-F`, `a-f`).
+xdigit lexer.xdigit (pattern)\nMatches any hexadecimal digit (`0-9`, `A-F`, `a-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`.
diff --git a/modules/lua/init.lua b/modules/lua/init.lua
index 3e5038ca..56bd8e01 100644
--- a/modules/lua/init.lua
+++ b/modules/lua/init.lua
@@ -22,8 +22,8 @@ local M = {}
-- functions only.
-- @field sense
-- The Lua [Adeptsense](_M.textadept.adeptsense.html).
--- It loads user tags from `_USERHOME/modules/lua/tags` and user apidocs from
--- `_USERHOME/modules/lua/api`.
+-- It loads user tags from *`_USERHOME`/modules/lua/tags* and user apidocs
+-- from *`_USERHOME`/modules/lua/api*.
module('_M.lua')]]
local m_editing, m_run = _M.textadept.editing, _M.textadept.run
diff --git a/modules/lua/tags b/modules/lua/tags
index ea27ba31..a38ed664 100644
--- a/modules/lua/tags
+++ b/modules/lua/tags
@@ -27,7 +27,6 @@ CLEAR _ 0;" F class:keys
COMMAND_ENTRY_COMMAND _ 0;" F class:events
COMMAND_ENTRY_KEYPRESS _ 0;" F class:events
COMMENT _ 0;" F class:lexer
-COMPILE_OUTPUT _ 0;" F class:events
CONSTANT _ 0;" F class:lexer
Carg _ 0;" f class:lpeg
Cb _ 0;" f class:lpeg
@@ -51,10 +50,6 @@ ERROR _ 0;" F class:events
ERROR _ 0;" F class:lexer
FIELD _ 0;" F class:_M.textadept.adeptsense
FIELDS _ 0;" F class:_M.textadept.adeptsense
-FILE_AFTER_SAVE _ 0;" F class:events
-FILE_BEFORE_SAVE _ 0;" F class:events
-FILE_OPENED _ 0;" F class:events
-FILE_SAVED_AS _ 0;" F class:events
FILTER _ 0;" t class:_M.textadept.snapopen
FIND _ 0;" F class:events
FUNCTION _ 0;" F class:_M.textadept.adeptsense
@@ -95,7 +90,6 @@ KEYSYMS _ 0;" t class:keys
KEYWORD _ 0;" F class:lexer
KEYWORDSET_MAX _ 0;" F class:_SCINTILLA.constants
LABEL _ 0;" F class:lexer
-LANGUAGE_MODULE_LOADED _ 0;" F class:events
LANGUAGE_MODULE_PREFIX _ 0;" F class:keys
MARGIN_CLICK _ 0;" F class:events
MARKER_MAX _ 0;" F class:_SCINTILLA.constants
@@ -119,7 +113,6 @@ REPLACE_ALL _ 0;" F class:events
RESETTING _ 0;" F
RESET_AFTER _ 0;" F class:events
RESET_BEFORE _ 0;" F class:events
-RUN_OUTPUT _ 0;" F class:events
S _ 0;" f class:lpeg
SAVE_ON_QUIT _ 0;" F class:_M.textadept.session
SAVE_POINT_LEFT _ 0;" F class:events
@@ -752,13 +745,21 @@ WHITESPACE _ 0;" F class:lexer
WIN32 _ 0;" F
_BUFFERS _ 0;" t
_CHARSET _ 0;" F
-_EMBEDDEDRULES _ 0;" t class:lexer
_EXISTS _ 0;" f class:_L
_G _ 0;" F
_G _ 0;" m
+_G.events.COMPILE_OUTPUT _ 0;" F class:_M.textadept.run
+_G.events.FILE_AFTER_SAVE _ 0;" F class:io
+_G.events.FILE_BEFORE_SAVE _ 0;" F class:io
+_G.events.FILE_OPENED _ 0;" F class:io
+_G.events.FILE_SAVED_AS _ 0;" F class:io
+_G.events.FIND_WRAPPED _ 0;" F class:gui.find
+_G.events.LANGUAGE_MODULE_LOADED _ 0;" F class:_M.textadept.mime_types
+_G.events.RUN_OUTPUT _ 0;" F class:_M.textadept.run
_HOME _ 0;" F
_L _ 0;" m
_L _ 0;" t
+_LEXBYLINE _ 0;" F class:lexer.lexer
_LEXERPATH _ 0;" F
_M _ 0;" m
_M _ 0;" t
@@ -768,6 +769,7 @@ _M.hypertext _ 0;" m
_M.java _ 0;" m
_M.lua _ 0;" m
_M.php _ 0;" m
+_M.python _ 0;" m
_M.rails _ 0;" m
_M.rhtml _ 0;" m
_M.ruby _ 0;" m
@@ -783,18 +785,24 @@ _M.textadept.run _ 0;" m
_M.textadept.session _ 0;" m
_M.textadept.snapopen _ 0;" m
_M.textadept.snippets _ 0;" m
+_NAME _ 0;" F class:lexer.lexer
_RELEASE _ 0;" F
-_RULES _ 0;" t class:lexer
+_RULES _ 0;" F class:lexer.lexer
_SCINTILLA _ 0;" m
_SCINTILLA _ 0;" t
_USERHOME _ 0;" F
_VERSION _ 0;" F
_VIEWS _ 0;" t
_cancel_current _ 0;" f class:_M.textadept.snippets
+_fold _ 0;" F class:lexer.lexer
+_foldsymbols _ 0;" F class:lexer.lexer
_insert _ 0;" f class:_M.textadept.snippets
+_lexer _ 0;" F class:lexer.lexer
_previous _ 0;" f class:_M.textadept.snippets
_print _ 0;" f class:gui
+_rules _ 0;" F class:lexer.lexer
_select _ 0;" f class:_M.textadept.snippets
+_tokenstyles _ 0;" F class:lexer.lexer
abs _ 0;" f class:math
acos _ 0;" f class:math
add_selection _ 0;" f class:buffer
@@ -820,6 +828,7 @@ annotation_style_offset _ 0;" F class:buffer
annotation_text _ 0;" F class:buffer
annotation_visible _ 0;" F class:buffer
any _ 0;" F class:lexer
+any_char _ 0;" F class:lexer
api_files _ 0;" t class:_M.textadept.adeptsense
append_text _ 0;" f class:buffer
arg _ 0;" t
@@ -1032,7 +1041,6 @@ error _ 0;" f
error_detail _ 0;" t class:_M.textadept.run
events _ 0;" m
events _ 0;" t
-execute _ 0;" f class:_M.textadept.run
execute _ 0;" f class:os
exit _ 0;" f class:os
exp _ 0;" f class:math
@@ -1193,6 +1201,7 @@ lex _ 0;" f class:lexer
lexer _ 0;" F class:buffer
lexer _ 0;" m
lexer _ 0;" t
+lexer _ 0;" t class:lexer
lexer_language _ 0;" F class:buffer
lexers _ 0;" t class:_M.textadept.mime_types
lfs _ 0;" m
@@ -1380,6 +1389,9 @@ property_expanded _ 0;" F class:buffer
property_int _ 0;" F class:buffer
punct _ 0;" F class:lexer
punctuation_chars _ 0;" F class:buffer
+python _ 0;" t class:_M
+python _ 0;" t class:keys
+python _ 0;" t class:snippets
quit _ 0;" f
rad _ 0;" f class:math
rails _ 0;" t class:_M
@@ -1489,6 +1501,7 @@ sense _ 0;" F class:_M.hypertext
sense _ 0;" F class:_M.java
sense _ 0;" F class:_M.lua
sense _ 0;" F class:_M.php
+sense _ 0;" F class:_M.python
sense _ 0;" F class:_M.rails
sense _ 0;" F class:_M.rhtml
sense _ 0;" F class:_M.ruby
@@ -1499,6 +1512,7 @@ set_buffer_properties _ 0;" f class:_M.hypertext
set_buffer_properties _ 0;" f class:_M.java
set_buffer_properties _ 0;" f class:_M.lua
set_buffer_properties _ 0;" f class:_M.php
+set_buffer_properties _ 0;" f class:_M.python
set_buffer_properties _ 0;" f class:_M.ruby
set_chars_default _ 0;" f class:buffer
set_contextmenu _ 0;" f class:_M.textadept.menu
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index 245dc23f..0f8f15a3 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -82,7 +82,7 @@ local M = {}
-- #### `symbol_chars`
--
-- In addition to the usual `[%w_%.]` symbol characters, Lua also allows symbols
--- to contain a `:`.
+-- to contain a ':'.
--
-- sense.syntax.symbol_chars = '[%w_%.:]'
--
@@ -109,7 +109,7 @@ local M = {}
-- ['^([%w_%.]+)'] = '%1' -- foo = _M.textadept.adeptsense
-- }
--
--- Note the `^` in the pattern. The beginning of the right hand side of the
+-- Note the '^' in the pattern. The beginning of the right hand side of the
-- assignment should be matched, otherwise `local foo = bar('baz')` could infer
-- an incorrect type.
--
@@ -139,7 +139,7 @@ local M = {}
-- in your shell. Since Adeptsense only cares about classes, functions, and
-- fields, you need to let it know which kind of tag is which. Unfortunately,
-- Lua support in Ctags is not good at all. Instead, Textadept has a utility
--- (`modules/lua/adeptsensedoc.lua`) to generate a fake set of tags that is more
+-- (*modules/lua/adeptsensedoc.lua*) to generate a fake set of tags that is more
-- useful. Functions are tagged `'f'` and should be recognized as such; table
-- keys are tagged `'t'` and should be recognized as fields; module fields,
-- `'F'`, should be fields; and modules, `'m'`, should be classes:
@@ -170,8 +170,8 @@ local M = {}
-- ### Triggers
--
-- Triggers are characters or character sequences that trigger an autocompletion
--- list to be displayed. Lua has two characters that can do so: `.` and `:`. The
--- `.` should autocomplete both fields and functions while `:` should
+-- list to be displayed. Lua has two characters that can do so: '.' and ':'. The
+-- '.' should autocomplete both fields and functions while ':' should
-- autocomplete only functions. This is specified using
-- [`add_trigger()`](#add_trigger).
--
@@ -235,7 +235,7 @@ local M = {}
-- end
--
-- Note that there is no plus or minus prefix in the pattern. This is because
--- `+` or `-` characters are not a part of `syntax.symbol_chars` so a symbol
+-- '+' or '-' characters are not a part of `syntax.symbol_chars` so a symbol
-- will not contain either of them.
--
-- Like numbers, the syntax for constructing strings, arrays, hashes, and the
@@ -260,7 +260,7 @@ local M = {}
--
-- Since Adeptsense ignores any tags not mapped to `classes`, `functions`, or
-- `fields` in [`ctags_kinds`](#ctags_kinds), it passes an unknown tag to the
--- [`handle_ctag()`](#handle_ctag) function. In this case, package (`p`) tags
+-- [`handle_ctag()`](#handle_ctag) function. In this case, package ('p') tags
-- need to be handled.
--
-- function sense:handle_ctag(tag_name, file_name, ex_cmd, ext_fields)
@@ -275,7 +275,7 @@ local M = {}
-- end
--
-- Now that we have a list of import completions, it should be activated by the
--- normal trigger (`.`), but only on a line that contains an `import` statement.
+-- normal trigger ('.'), but only on a line that contains an `import` statement.
-- The [`get_completions`](#get_completions) function needs to be overridden to
-- use the `import` table's completions when necessary.
--
@@ -319,7 +319,7 @@ local M = {}
-- Adeptsense. For example, when editing CSS inside of an HTML file, the user
-- expects the CSS Adeptsense to be used. However, child language Adeptsenses
-- are not loaded automatically and must be loaded by the parent language
--- module. For the case of CSS in HTML, the HTML module's `init.lua` must
+-- module. For the case of CSS in HTML, the HTML module's *init.lua* must
-- contain:
--
-- -- Load CSS Adeptsense.
@@ -331,11 +331,11 @@ local M = {}
-- ### Generating Lua Adeptsense
--
-- You can generate Lua Adeptsense for your own modules using the Lua language
--- module's `adeptsensedoc.lua` module with [LuaDoc][]:
+-- module's *adeptsensedoc.lua* module with [LuaDoc][]:
--
-- luadoc -d . --doclet _HOME/modules/lua/adeptsensedoc [module(s)]
--
--- where `_HOME` is where Textadept is installed. The `tags` and `api` files are
+-- where `_HOME` is where Textadept is installed. The *tags* and *api* files are
-- output to the current directory and can be loaded via
-- [`load_ctags()`](#load_ctags) and [`api_files`](#api_files) respectively.
--
@@ -930,8 +930,8 @@ locations = {},
-- there may be many duplicate symbol names, it is recommended to put the full
-- symbol and arguments, if any, on the first line. (e.g. `Class.function(arg1,
-- arg2, ...)`). This allows the correct documentation to be shown based on the
--- current context. In the documentation, newlines are represented with `\n`. A
--- `\` before `\n` escapes the newline.
+-- current context. In the documentation, newlines are represented with "\n". A
+-- '\' before "\n" escapes the newline.
-- @class table
-- @name api_files
api_files = {},
diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua
index 1812f2d6..1b568357 100644
--- a/modules/textadept/bookmarks.lua
+++ b/modules/textadept/bookmarks.lua
@@ -6,7 +6,7 @@ local M = {}
---
-- Bookmarks for Textadept.
-- @field MARK_BOOKMARK_COLOR (number)
--- The color used for a bookmarked line in `0xBBGGRR` format.
+-- The color used for a bookmarked line in "0xBBGGRR" format.
module('_M.textadept.bookmarks')]]
M.MARK_BOOKMARK_COLOR = not NCURSES and 0xB3661A or 0xFF0000
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index 8adff1a1..d61ad7dc 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -6,12 +6,13 @@ local M = {}
---
-- Editing features for Textadept.
-- @field AUTOPAIR (bool)
--- Opening `(`, `[`, `{`, `"`, or `'` characters are automatically closed.
+-- Opening '(', '[', '{', '&quot;', or '&apos;' characters are automatically
+-- closed.
-- The default value is `true`.
-- Auto-paired characters are defined in the [`char_matches`](#char_matches)
-- table.
-- @field HIGHLIGHT_BRACES (bool)
--- Highlight matching `()[]{}` characters.
+-- Highlight matching "()[]{}" characters.
-- The default value is `true`.
-- Matching braces are defined in the [`braces`](#braces) table.
-- @field AUTOINDENT (bool)
@@ -23,10 +24,10 @@ local M = {}
-- The default value is `true`.
-- @field MARK_HIGHLIGHT_BACK (number)
-- The background color used for a line containing a
--- [highlighted word](#highlight_word) in `0xBBGGRR` format.
+-- [highlighted word](#highlight_word) in "0xBBGGRR" format.
-- @field INDIC_HIGHLIGHT_BACK (number)
-- The color used for an indicator for a [highlighted word](#highlight_word)
--- in `0xBBGGRR` format.
+-- in "0xBBGGRR" format.
-- @field INDIC_HIGHLIGHT_ALPHA (number)
-- The alpha transparency value between `0` (transparent) and `255` (opaque)
-- used for an indicator for a [highlighted word](#highlight_word).
@@ -59,7 +60,7 @@ M.comment_string = {}
-- Used for auto-matching parentheses, brackets, braces, quotes, etc. Keys are
-- lexer language names and values are tables of character match pairs. A pair's
-- key is an ASCII value and the value is the string character match. The
--- defaults are `()`, `[]`, `{}`, `''`, and `""`.
+-- defaults are "()", "[]", "{}", "''", and """".
-- This table can be populated by language-specific modules.
-- @class table
-- @name char_matches
@@ -70,8 +71,8 @@ M.char_matches = { [40] = ')', [91] = ']', [123] = '}', [39] = "'", [34] = '"' }
---
-- Highlighted brace characters.
-- Keys are lexer language names and values are tables of character ASCII values
--- that count as brace characters. The defaults are `(`, `)`, `[`, `]`, `{`, and
--- `}`.
+-- that count as brace characters. The defaults are '(', ')', '[', ']', '{', and
+-- '}'.
-- This table can be populated by language-specific modules.
-- @class table
-- @name braces
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index 9166b867..0a74b7c4 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -107,13 +107,13 @@ local M = {}
-- None |None |None |Tab width: 8
-- Ctrl+Alt+Shift+T|^⇧T |M-T<br/>M-S-T|Toggle use tabs
-- Ctrl+Alt+I |^I |M-I |Convert indentation
--- None |None |None |`CRLF` EOL mode
--- None |None |None |`CR` EOL mode
--- None |None |None |`LF` EOL mode
--- None |None |None |`UTF-8` encoding
--- None |None |None |`ASCII` encoding
--- None |None |None |`ISO-8859-1` encoding
--- None |None |None |`UTF-16` encoding
+-- None |None |None |CR+LF EOL mode
+-- None |None |None |CR EOL mode
+-- None |None |None |LF EOL mode
+-- None |None |None |UTF-8 encoding
+-- None |None |None |ASCII encoding
+-- None |None |None |ISO-8859-1 encoding
+-- None |None |None |UTF-16 encoding
-- Ctrl+Shift+L |⌘⇧L |M-S-L |Select lexer...
-- F5 |F5 |^L<br/>F5 |Refresh syntax highlighting
-- **View** | | |
diff --git a/modules/textadept/mime_types.lua b/modules/textadept/mime_types.lua
index 7c71fa7f..2675b9fc 100644
--- a/modules/textadept/mime_types.lua
+++ b/modules/textadept/mime_types.lua
@@ -28,7 +28,7 @@ M.extensions = {}
---
-- Table of shebang words and their associated lexers.
--- If the file has a shebang line, a line that starts with `#!` and is the first
+-- If the file has a shebang line, a line that starts with "#!" and is the first
-- line in the file, each shebang word is matched against that line.
-- @class table
-- @name shebangs
@@ -42,7 +42,7 @@ M.shebangs = {}
-- @name patterns
M.patterns = {}
--- Load mime-types from `modules/textadept/mime_types.conf`.
+-- Load mime-types from *modules/textadept/mime_types.conf*.
local mime_types
local f = io.open(_HOME..'/modules/textadept/mime_types.conf', 'rb')
if f then
@@ -70,7 +70,7 @@ end
---
-- List of detected lexers.
--- Lexers are read from `lexers/` and `~/.textadept/lexers/`.
+-- Lexers are read from *lexers/* and *~/.textadept/lexers/*.
-- @class table
-- @name lexers
M.lexers = {}
@@ -111,7 +111,7 @@ end
-- Contains the whitespace styles for lexers.
-- These whitespace styles are used to determine the lexer at the current caret
--- position since the styles have the name `[lang]_whitespace`.
+-- position since the styles have the name "[lang]_whitespace".
-- @class table
-- @name ws_styles
local ws_styles = {}
diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua
index 24554e35..49c49568 100644
--- a/modules/textadept/session.lua
+++ b/modules/textadept/session.lua
@@ -7,8 +7,8 @@ local M = {}
-- Session support for Textadept.
-- @field DEFAULT_SESSION (string)
-- The path to the default session file.
--- The default value is `_USERHOME/session`, or `_USERHOME/session_term` if
--- [`_G.NCURSES`][] is `true`.
+-- The default value is *`_USERHOME`/session*, or *`_USERHOME`/session_term*
+-- if [`_G.NCURSES`][] is `true`.
--
-- [`_G.NCURSES`]: _G.html#NCURSES
-- @field SAVE_ON_QUIT (bool)
diff --git a/modules/textadept/snapopen.lua b/modules/textadept/snapopen.lua
index c677ba66..268ee3b2 100644
--- a/modules/textadept/snapopen.lua
+++ b/modules/textadept/snapopen.lua
@@ -87,7 +87,7 @@ end
-- paths to search.
-- @param filter A filter for files and folders to exclude. The filter may be
-- a string or table. Each filter is a Lua pattern. Any files matching a
--- filter are excluded. Prefix a pattern with `!` to exclude any files that
+-- filter are excluded. Prefix a pattern with '!' to exclude any files that
-- do not match a filter. File extensions can be more efficiently excluded by
-- adding the extension text to a table assigned to an `extensions` key in the
-- filter table instead of using individual filters. Directories can be
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua
index 6dd9fdb2..c179a580 100644
--- a/modules/textadept/snippets.lua
+++ b/modules/textadept/snippets.lua
@@ -10,7 +10,7 @@ local M = {}
--
-- Snippets are defined in the global table `snippets`. Each key-value pair in
-- `snippets` consists of either a string trigger word and its snippet text, or
--- a string lexer language (from the `lexers/` directory) with a table of
+-- a string lexer language (from the *lexers/* directory) with a table of
-- trigger words and snippet texts. When searching for a snippet to insert based
-- on a trigger word, snippets in the current lexer have priority, followed by
-- the ones in the global table. This means if there are two snippets with the
@@ -19,9 +19,9 @@ local M = {}
--
-- ## Snippet Syntax
--
--- Any plain text characters may be used with the exception of `%`. Just like in
--- Lua patterns, `%` is an escape character. The sequence `%%` stands for a
--- single `%`. Also, it is recommended to use `\t` characters for indentation
+-- Any plain text characters may be used with the exception of '%'. Just like in
+-- Lua patterns, '%' is an escape character. The sequence "%%" stands for a
+-- single '%'. Also, it is recommended to use "\t" characters for indentation
-- because they can be converted to spaces based on the current indentation
-- settings. In addition to plain text, snippets can contain placeholders for
-- further user input, can mirror or transform those user inputs, and/or execute
@@ -360,7 +360,7 @@ M._snippet_mt = {
snippet_stack[#snippet_stack] = nil
end,
- -- Finishes a snippet by going to its `%0` placeholder and cleaning up.
+ -- Finishes a snippet by going to its "%0" placeholder and cleaning up.
-- @param snippet The snippet returned by `new_snippet()`.
finish = function(snippet)
local buffer = buffer