aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--core/.buffer.luadoc168
-rw-r--r--core/.ui.dialogs.luadoc106
-rw-r--r--core/.view.luadoc9
-rw-r--r--core/events.lua21
-rw-r--r--core/file_io.lua8
-rw-r--r--core/init.lua2
-rw-r--r--core/keys.lua12
-rw-r--r--core/ui.lua26
-rw-r--r--doc/14_Appendix.md7
-rw-r--r--modules/textadept/command_entry.lua6
-rw-r--r--modules/textadept/editing.lua4
-rw-r--r--modules/textadept/find.lua4
-rw-r--r--modules/textadept/menu.lua4
-rw-r--r--modules/textadept/run.lua12
-rw-r--r--modules/textadept/session.lua6
-rw-r--r--modules/textadept/snippets.lua17
16 files changed, 202 insertions, 210 deletions
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 711ab255..a9e9b8c0 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -35,7 +35,7 @@
-- @field all_lines_visible (bool, Read-only)
-- Whether or not all lines are visible.
-- @field anchor (number)
--- The position of the anchor.
+-- The anchor's position.
-- @field annotation_lines (table, Read-only)
-- Table of the number of annotation lines for line numbers starting from
-- zero.
@@ -149,24 +149,23 @@
-- bitmap to the screen.
-- The default value is `true`.
-- @field call_tip_fore_hlt (number, Write-only)
--- The foreground color, in "0xBBGGRR" format, of the highlighted part of
--- call tips.
+-- The call tip's highlighted text foreground color, in "0xBBGGRR" format.
-- @field call_tip_position (boolean)
-- Display the call tip above instead of below the text.
-- The default value is `false`.
-- @field call_tip_use_style (number)
--- The pixel size of tab characters in call tips.
+-- The pixel width of tab characters in call tips.
-- When non-zero, also enables the use of style number `buffer.STYLE_CALLTIP`
-- instead of `buffer.STYLE_DEFAULT` for call tip styles.
-- The default value is `0`.
-- @field caret_fore (number)
--- The foreground color, in "0xBBGGRR" format, of the caret.
+-- The caret's foreground color, in "0xBBGGRR" format.
-- @field caret_line_back (number)
-- The background color, in "0xBBGGRR" format, of the line containing the
-- caret.
-- @field caret_line_back_alpha (number)
--- The background alpha value, ranging from `0` (transparent) to `255`
--- (opaque), of the caret line.
+-- The caret line's background alpha value, ranging from `0` (transparent) to
+-- `255` (opaque).
-- The default value is `buffer.ALPHA_NOALPHA`, for no alpha.
-- @field caret_line_visible (bool)
-- Color the background of the line containing the caret a different color.
@@ -180,7 +179,7 @@
-- A value of `0` stops blinking.
-- The default value is `500`.
-- @field caret_sticky (number)
--- The preferred horizontal position of the caret when moving between lines.
+-- The caret's preferred horizontal position when moving between lines.
--
-- * `buffer.CARETSTICKY_OFF`
-- Use the same position as on the previous line.
@@ -193,7 +192,7 @@
--
-- The default value is `buffer.CARETSTICKY_OFF`.
-- @field caret_style (number)
--- The visual style of the caret.
+-- The caret's visual style.
--
-- * `buffer.CARETSTYLE_INVISIBLE`
-- No caret.
@@ -204,8 +203,7 @@
--
-- The default value is `buffer.CARETSTYLE_LINE`.
-- @field caret_width (number)
--- The pixel width of the caret in insert mode, either `0`, `1`, `2`, or `3`,
--- and only applicable to line carets.
+-- The line caret's pixel width in insert mode, either `0`, `1`, `2`, or `3`.
-- The default value is `1`.
-- @field char_at (table, Read-only)
-- Table of character bytes at positions starting from zero.
@@ -213,7 +211,7 @@
-- Table of column numbers, taking tab widths into account, for positions
-- starting from zero.
-- @field current_pos (number)
--- The position of the caret.
+-- The caret's position.
-- When set, does not scroll the caret into view.
-- @field cursor (number)
-- The display cursor type.
@@ -248,15 +246,14 @@
-- [`buffer.edge_column`](#edge_column) to
-- [`buffer.edge_colour`](#edge_colour).
-- @field encoding (string or nil)
--- The string encoding of the file on the hard drive or `nil` for binary
--- files.
+-- The string encoding of the file, or `nil` for binary files.
-- @field encoding_bom (string)
--- The byte-order mark, if any, of the file encoding.
+-- The byte-order mark, if any, of the file.
-- @field end_at_last_line (bool)
-- Disable scrolling past the last line.
-- The default value is `true`.
-- @field end_styled (number, Read-only)
--- The position of the last correctly styled character.
+-- The last correctly styled character's position.
-- @field eol_mode (number)
-- The current end of line mode. Changing the mode does not convert existing
-- line endings. Use [`buffer:convert_eols()`](#convert_eols) to do so.
@@ -277,7 +274,7 @@
-- The amount of pixel padding below line text.
-- The default is `0`.
-- @field filename (string)
--- The absolute path to the file associated with the buffer.
+-- The absolute file path associated with the buffer.
-- @field first_visible_line (number)
-- The line number of the line at the top of the view, starting from zero.
-- @field fold_expanded (table)
@@ -286,7 +283,7 @@
-- Setting expanded fold states does not toggle folds; it only updates fold
-- margin markers. Use [`buffer:toggle_fold()`](#toggle_fold) instead.
-- @field fold_flags (number)
--- Bit-mask of options for drawing folding lines.
+-- Bit-mask of folding lines to draw in the buffer.
--
-- * `buffer.FOLDFLAG_LINEBEFORE_EXPANDED`
-- Draw lines above expanded folds.
@@ -300,7 +297,7 @@
-- The default value is `0`.
-- @field fold_level (table)
-- Table of fold level bit-masks for line numbers starting from zero.
--- Fold level masks are composed of an integer level combined with any of the
+-- Fold level masks comprise of an integer level combined with any of the
-- following bits:
--
-- * `buffer.FOLDLEVELBASE`
@@ -339,8 +336,8 @@
-- * `buffer.IV_REAL`
-- Draw guides only within indentation whitespace.
-- * `buffer.IV_LOOKFORWARD`
--- Draw guides beyond the current line up to the level of the next non-empty
--- line, but with an additional level if the previous non-empty line is a
+-- Draw guides beyond the current line up to the next non-empty line's
+-- level, but with an additional level if the previous non-empty line is a
-- fold header.
-- * `buffer.IV_LOOKBOTH`
-- Draw guides beyond the current line up to either the level of the
@@ -469,8 +466,8 @@
-- * `buffer.MARGINOPTION_NONE`
-- None.
-- * `buffer.MARGINOPTION_SUBLINESELECT`
--- Select only the sub-line of the wrapped line, rather than the entire
--- line, on margin click.
+-- Select only the wrapped line's sub-line, rather than the entire line, on
+-- margin click.
--
-- The default value is `buffer.MARGINOPTION_NONE`.
-- @field margin_right (number)
@@ -572,13 +569,13 @@
-- Whether or not the buffer is read-only.
-- The default value is `false`.
-- @field rectangular_selection_anchor (number)
--- The position of the anchor of the rectangular selection.
+-- The rectangular selection's anchor position.
-- @field rectangular_selection_anchor_virtual_space (number)
--- The amount of virtual space for the anchor of the rectangular selection.
+-- The amount of virtual space for the rectangular selection's anchor.
-- @field rectangular_selection_caret (number)
--- The position of the caret of the rectangular selection.
+-- The rectangular selection's caret position.
-- @field rectangular_selection_caret_virtual_space (number)
--- The amount of virtual space for the caret of the rectangular selection.
+-- The amount of virtual space for the rectangular selection's caret.
-- @field rectangular_selection_modifier (number)
-- The modifier key used in combination with a mouse drag to create a
-- rectangular selection.
@@ -607,7 +604,7 @@
-- [`buffer:marker_define_rgba_image()`](#marker_define_rgba_image) and
-- [`buffer:register_rgba_image()`](#register_rgba_image).
-- @field scroll_width (number)
--- The horizontal scroll pixel width.
+-- The horizontal scrolling pixel width.
-- For performance, the view does not measure the display width of the buffer
-- to determine the properties of the horizontal scroll bar, but uses an
-- assumed width instead. To ensure the width of the currently visible lines
@@ -665,11 +662,11 @@
-- Represents character *x*, ignoring any special meaning it may have by
-- itself.
-- @field sel_alpha (number)
--- The alpha value, ranging from `0` (transparent) to `255` (opaque), of the
--- selection.
+-- The selection's alpha value, ranging from `0` (transparent) to `255`
+-- (opaque).
-- The default value is `buffer.ALPHA_NOALPHA`, for no alpha.
-- @field sel_eol_filled (bool)
--- Extend the selection to the right margin of the view.
+-- Extend the selection to the view's right margin.
-- The default value is `false`.
-- @field selection_empty (bool, Read-only)
-- Whether or not no text is selected.
@@ -746,8 +743,8 @@
-- but ranges containing read-only text are deletable.
-- @field style_eol_filled (table)
-- Table of flags indicating whether or not the background colors of styles
--- whose characters occur last on lines extend all the way to the right margin
--- of the view for style numbers from `0` to `255`.
+-- whose characters occur last on lines extend all the way to the view's right
+-- margin for style numbers from `0` to `255`.
-- The default values are `false`.
-- @field style_font (table)
-- Table of string font faces of text within styles for style numbers from
@@ -874,7 +871,7 @@
--
-- The default value is `buffer.WRAP_NONE`.
-- @field wrap_start_indent (number)
--- The number of spaces to indent wrapped lines by if
+-- The number of spaces of indentation to display wrapped lines with if
-- [`buffer.wrap_indent_mode`](#wrap_indent_mode) is
-- `buffer.WRAP_INDENT_FIXED`.
-- The default value is `0`.
@@ -888,7 +885,7 @@
-- * `buffer.WRAPVISUALFLAG_START`
-- Show visual flag at the beginning of the sub-line.
-- * `buffer.WRAPVISUALFLAG_MARGIN`
--- Show visual flag in the line number margin of the sub-line.
+-- Show visual flag in the sub-line's line number margin.
--
-- The default value is `buffer.WRAPVISUALFLAG_NONE`.
-- @field wrap_visual_flags_location (number)
@@ -1121,13 +1118,13 @@ function can_undo(buffer) end
function cancel(buffer) end
---
--- Tells the lexer to re-process the range of text between *start_pos* and
+-- Tells the lexer to reprocess the range of text between *start_pos* and
-- *end_pos*.
-- @param buffer The global buffer.
-- @param start_pos The start position of the range of text in *buffer* to
--- re-process.
+-- reprocess.
-- @param end_pos The end position of the range of text in *buffer* to
--- re-process.
+-- reprocess.
function change_lexer_state(buffer, start_pos, end_pos) end
---
@@ -1182,8 +1179,8 @@ function char_right_extend(buffer) end
function char_right_rect_extend(buffer) end
---
--- Sets the preferred horizontal position of the caret when moving between
--- lines to the current position.
+-- Identifies the current horizontal caret position as the caret's preferred
+-- horizontal position when moving between lines.
-- @param buffer The global buffer.
-- @see caret_sticky
function choose_caret_x(buffer) end
@@ -1289,12 +1286,12 @@ function count_characters(buffer, start_pos, end_pos) end
function cut(buffer) end
---
--- Deletes text from the caret to the beginning of the line.
+-- Deletes the range of text from the caret to the beginning of the line.
-- @param buffer The global buffer.
function del_line_left(buffer) end
---
--- Deletes text from the caret to the end of the line.
+-- Deletes the range of text from the caret to the end of the line.
-- @param buffer The global buffer.
function del_line_right(buffer) end
@@ -1331,7 +1328,7 @@ function delete_back(buffer) end
function delete_back_not_line(buffer) end
---
--- Deletes the buffer's text from position *pos* to *pos* + *length*.
+-- Deletes the range of text from position *pos* to *pos* + *length*.
-- @param buffer The global buffer.
-- @param pos The start position of the range of text in *buffer* to delete.
-- @param length The number of characters in the range of text to delete.
@@ -1459,7 +1456,7 @@ function fold_line(buffer, line, action) end
function form_feed(buffer) end
---
--- Returns the current line's text and the index of the caret on the line,
+-- Returns the current line's text and the caret's position on the line,
-- starting from zero.
-- @param buffer The global buffer.
-- @return string, number
@@ -1597,8 +1594,8 @@ function home_wrap_extend(buffer) end
function indicator_all_on_for(buffer, pos) end
---
--- Clears indicator `buffer.indicator_current` over the range of text from
--- position *pos* to *pos* + *clear_length*.
+-- Clears indicator number `buffer.indicator_current` over the range of text
+-- from position *pos* to *pos* + *clear_length*.
-- @param buffer The global buffer.
-- @param pos The start position of the range of text in *buffer* to clear
-- indicators over.
@@ -1615,8 +1612,8 @@ function indicator_clear_range(buffer, pos, clear_length) end
function indicator_end(buffer, indicator, pos) end
---
--- Sets indicator number `buffer.indicator_current` over the range of text from
--- position *pos* to *pos* + *fill_length*.
+-- Fills the range of text from position *pos* to *pos* + *fill_length* with
+-- indicator number `buffer.indicator_current`.
-- @param buffer The global buffer.
-- @param pos The start position of the range of text in *buffer* to set
-- indicators over.
@@ -1758,7 +1755,7 @@ function line_scroll_down(buffer) end
function line_scroll_up(buffer) end
---
--- Switches the current line with the previous one.
+-- Swaps the current line with the previous one.
-- @param buffer The global buffer.
function line_transpose(buffer) end
@@ -1798,7 +1795,7 @@ function lines_split(buffer, pixel_width) end
function lower_case(buffer) end
---
--- Clears margin text on all lines.
+-- Clears the text in text margins on all lines.
-- @param buffer The global buffer.
function margin_text_clear_all(buffer) end
@@ -1958,12 +1955,12 @@ function marker_symbol_defined(buffer, marker_num) end
function move_caret_inside_view(buffer) end
---
--- Moves the selected lines down one line.
+-- Shifts the selected lines down one line.
-- @param buffer The global buffer.
function move_selected_lines_down(buffer) end
---
--- Moves the selected lines up one line.
+-- Shifts the selected lines up one line.
-- @param buffer The global buffer.
function move_selected_lines_up(buffer) end
@@ -2033,8 +2030,8 @@ function para_up(buffer) end
function para_up_extend(buffer) end
---
--- Pastes the contents of the clipboard into the buffer, replacing any selected
--- text depending on `buffer.multi_paste`.
+-- Pastes the clipboard's contents into the buffer, replacing any selected text
+-- depending on `buffer.multi_paste`.
-- @param buffer The global buffer.
function paste(buffer) end
@@ -2126,15 +2123,15 @@ function replace_target(buffer, text) end
---
-- Replaces the text in the target range with string *text* but first replaces
-- any "\d" sequences with the value of tag match number *d* from the regular
--- expression (or the entire match for *d* = 0), and then returns the length of
--- the replacement text.
+-- expression (or the entire match for *d* = 0), and then returns the
+-- replacement text's length.
-- @param buffer The global buffer.
-- @param text The text to replace the target range with.
-- @return number
function replace_target_re(buffer, text) end
---
--- Sets the next additional selection to be the main selection.
+-- Taps the next additional selection to be the main selection.
-- @param buffer The global buffer.
function rotate_selection(buffer) end
@@ -2168,8 +2165,8 @@ function scroll_to_end(buffer) end
function scroll_to_start(buffer) end
---
--- Sets the position `buffer:search_next()` and `buffer:search_prev()` begin at
--- to the caret position.
+-- Anchors the position `buffer:search_next()` and `buffer:search_prev()` begin
+-- at to the caret position.
-- @param buffer The global buffer.
function search_anchor(buffer) end
@@ -2186,8 +2183,8 @@ function search_in_target(buffer, text) end
---
-- Searches for and selects the first occurrence of string *text* starting at
--- the search anchor using search flags *flags*, returning the position of the
--- occurrence or `-1`.
+-- the search anchor using search flags *flags*, returning the occurrence's
+-- position or `-1`.
-- Selected text is not scrolled into view.
-- @param buffer The global buffer.
-- @param flags The search flags to use. See `buffer.search_flags`.
@@ -2198,8 +2195,8 @@ function search_next(buffer, flags, text) end
---
-- Searches for and selects the last occurrence of string *text* before the
--- search anchor using search flags *flags*, returning the position of the
--- occurrence or `-1`.
+-- search anchor using search flags *flags*, returning the occurrence's position
+-- or `-1`.
-- @param buffer The global buffer.
-- @param flags The search flags to use. See `buffer.search_flags`.
-- @param text The text to search for.
@@ -2235,15 +2232,15 @@ function set_chars_default(buffer) end
function set_empty_selection(buffer, pos) end
---
--- Overrides the default color of the fold margin with *color*, in "0xBBGGRR"
--- format, if *use_setting* is `true`.
+-- Overrides the fold margin's default color with *color*, in "0xBBGGRR" format,
+-- if *use_setting* is `true`.
-- @param buffer The global buffer.
-- @param use_setting Whether or not to use *color*.
-- @param color The color in "0xBBGGRR" format.
function set_fold_margin_colour(buffer, use_setting, color) end
---
--- Overrides the default highlight color of the fold margin with *color*, in
+-- Overrides the fold margin's default highlight color with *color*, in
-- "0xBBGGRR" format, if *use_setting* is `true`.
-- @param buffer The global buffer.
-- @param use_setting Whether or not to use *color*.
@@ -2272,7 +2269,7 @@ function set_hotspot_active_fore(buffer, use_setting, color) end
function set_save_point(buffer) end
---
--- Selects the buffer's text between positions *start_pos* and *end_pos*,
+-- Selects the range of text between positions *start_pos* and *end_pos*,
-- scrolling the selected text into view.
-- @param buffer The global buffer.
-- @param start_pos The start position of the range of text in *buffer* to
@@ -2283,7 +2280,7 @@ function set_save_point(buffer) end
function set_sel(buffer, start_pos, end_pos) end
---
--- Overrides the default background color of the selection with *color*, in
+-- Overrides the selection's default background color with *color*, in
-- "0xBBGGRR" format, if *use_setting* is `true`.
-- @param buffer The global buffer.
-- @param use_setting Whether or not to use *color*.
@@ -2291,7 +2288,7 @@ function set_sel(buffer, start_pos, end_pos) end
function set_sel_back(buffer, use_setting, color) end
---
--- Overrides the default foreground color of the selection with *color*, in
+-- Overrides the selection's default foreground color with *color*, in
-- "0xBBGGRR" format, if *use_setting* is `true`.
-- @param buffer The global buffer.
-- @param use_setting Whether or not to use *color*.
@@ -2299,7 +2296,7 @@ function set_sel_back(buffer, use_setting, color) end
function set_sel_fore(buffer, use_setting, color) end
---
--- Selects the buffer's text between positions *start_pos* to *end_pos*,
+-- Selects the range of text between positions *start_pos* to *end_pos*,
-- removing all other selections.
-- @param buffer The global buffer.
-- @param end_pos The caret position of the range of text to select in *buffer*.
@@ -2308,7 +2305,7 @@ function set_sel_fore(buffer, use_setting, color) end
function set_selection(buffer, end_pos, start_pos) end
---
--- Sets the style of the next *length* characters, from the current styling
+-- Assigns the style of the next *length* characters, from the current styling
-- position, to style number *style*, in the range from `0` to `255`, and
-- increments the styling position by *length*.
-- @param buffer The global buffer.
@@ -2377,7 +2374,7 @@ function set_y_caret_policy(buffer, caret_policy, caret_slop) end
function show_lines(buffer, start_line, end_line) end
---
--- Begin styling at position *position* with styling bit-mask *styling_mask*.
+-- Begins styling at position *position* with styling bit-mask *styling_mask*.
-- *styling_mask* specifies which style bits can be set with
-- `buffer:set_styling()`.
-- @param buffer The global buffer.
@@ -2410,8 +2407,7 @@ function stuttered_page_up(buffer) end
function stuttered_page_up_extend(buffer) end
---
--- Sets all styles to have the same properties as
--- `buffer.STYLE_DEFAULT`.
+-- Reverts all styles to have the same properties as `buffer.STYLE_DEFAULT`.
-- @param buffer The global buffer.
function style_clear_all(buffer) end
@@ -2421,7 +2417,7 @@ function style_clear_all(buffer) end
function style_reset_default(buffer) end
---
--- Swaps the beginning and end positions of the main selection.
+-- Swaps the main selection's beginning and end positions.
-- @param buffer The global buffer.
function swap_main_anchor_caret(buffer) end
@@ -2432,8 +2428,8 @@ function swap_main_anchor_caret(buffer) end
function tab(buffer) end
---
--- Sets the beginning and end positions of the target range to be the beginning
--- and end positions of the main selection.
+-- Defines the target range's beginning and end positions as the beginning and
+-- end positions of the main selection, respectively.
-- @param buffer The global buffer.
function target_from_selection(buffer) end
@@ -2551,8 +2547,8 @@ function visible_from_doc_line(buffer, line) end
---
-- Returns the position of the end of the word at position *pos*.
-- `buffer.word_chars` contains word characters. If *pos* has a non-word
--- character to its right and *only_word_chars* is `false`, returns the position
--- of the first word character.
+-- character to its right and *only_word_chars* is `false`, returns the first
+-- word character's position.
-- @param buffer The global buffer.
-- @param pos The position in *buffer* of the word.
-- @param only_word_chars If `true`, stops searching at the first non-word
@@ -2645,8 +2641,8 @@ function word_right_extend(buffer) end
---
-- Returns the position of the beginning of the word at position *pos*.
-- `buffer.word_chars` contains word characters. If *pos* has a non-word
--- character to its left and *only_word_chars* is `false`, returns the position
--- of the last word character.
+-- character to its left and *only_word_chars* is `false`, returns the last word
+-- character's position.
-- @param buffer The global buffer.
-- @param pos The position in *buffer* of the word.
-- @param only_word_chars If `true`, stops searching at the first non-word
@@ -2701,15 +2697,15 @@ function delete(buffer) end
function new() end
---
--- Returns the buffer's text between positions *start_pos* and *end_pos*.
+-- Returns the range of text between positions *start_pos* and *end_pos*.
-- @param buffer The global buffer.
-- @param start_pos The start position of the range of text to get in *buffer*.
-- @param end_pos The end position of the range of text to get in *buffer*.
function text_range(buffer, start_pos, end_pos) end
---
--- Returns the name of the lexer used by the buffer, or the name of the lexer
--- under the caret in a multiple-language lexer if *current* is `true`.
+-- Returns the buffer's lexer name, or the name of the lexer under the caret in
+-- a multiple-language lexer if *current* is `true`.
-- @param buffer The global buffer.
-- @param current Whether or not to get the lexer at the current caret position
-- in multi-language lexers. The default is `false` and returns the parent
@@ -2717,8 +2713,8 @@ function text_range(buffer, start_pos, end_pos) end
function get_lexer(buffer, current) end
---
--- Sets the name of the lexer used by the buffer to *lang* or the auto-detected
--- language and then loads the appropriate language module if the module exists.
+-- Changes the buffer's lexer name to *lang* or the auto-detected language and
+-- then loads the appropriate language module if the module exists.
-- @param buffer The global buffer.
-- @param lang Optional string language name to set. If `nil`, attempts to
-- auto-detect the buffer's language.
diff --git a/core/.ui.dialogs.luadoc b/core/.ui.dialogs.luadoc
index dc3e99e8..67c36b2f 100644
--- a/core/.ui.dialogs.luadoc
+++ b/core/.ui.dialogs.luadoc
@@ -7,7 +7,7 @@ module('ui.dialogs')
---
-- Prompts the user with a generic message box dialog defined by dialog options
--- table *options*, returning the index of the selected button or, if
+-- table *options*, returning the selected button's index or, if
-- *options*.`string_output` is `true`, the selected button's label.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
@@ -29,8 +29,8 @@ module('ui.dialogs')
-- * `string_output`: Return the selected button's label or the dialog's exit
-- status instead of the button's index or the exit code. The default value
-- is `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -44,7 +44,7 @@ function msgbox(options) end
---
-- Prompts the user with a generic message box dialog defined by dialog options
-- table *options* and with localized "Ok" and "Cancel" buttons, returning the
--- index of the selected button or, if *options*.`string_output` is `true`, the
+-- selected button's index or, if *options*.`string_output` is `true`, the
-- selected button's label.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
@@ -63,8 +63,8 @@ function msgbox(options) end
-- * `string_output`: Return the selected button's label or the dialog's exit
-- status instead of the button's index or the exit code. The default value
-- is `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -75,8 +75,8 @@ function ok_msgbox(options) end
---
-- Prompts the user with a generic message box dialog defined by dialog options
-- table *options* and with localized "Yes", "No", and "Cancel" buttons,
--- returning the index of the selected button or, if *options*.`string_output`
--- is `true`, the selected button's label.
+-- returning the selected button's index or, if *options*.`string_output` is
+-- `true`, the selected button's label.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
-- @param options Table of key-value option pairs for the message box.
@@ -94,8 +94,8 @@ function ok_msgbox(options) end
-- * `string_output`: Return the selected button's label or the dialog's exit
-- status instead of the button's index or the exit code. The default value
-- is `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -105,9 +105,9 @@ function yesno_msgbox(options) end
---
-- Prompts the user with a one-line input box dialog defined by dialog options
--- table *options*, returning the index of the selected button along with the
--- input text or, if *options*.`string_output` is `true`, the selected button's
--- label along with the input text.
+-- table *options*, returning the selected button's index along with the input
+-- text or, if *options*.`string_output` is `true`, the selected button's label
+-- along with the input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
-- @param options Table of key-value option pairs for the input box.
@@ -123,8 +123,8 @@ function yesno_msgbox(options) end
-- * `string_output`: Return the selected button's label or the dialog's exit
-- status instead of the button's index or the exit code. The default value
-- is `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -137,7 +137,7 @@ function inputbox(options) end
---
-- Prompts the user with a one-line input box dialog defined by dialog options
-- table *options* and with localized "Ok" and "Cancel" buttons, returning the
--- index of the selected button along with the input text or, if
+-- selected button's index along with the input text or, if
-- *options*.`string_output` is `true`, the selected button's label along with
-- the input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
@@ -152,20 +152,20 @@ function inputbox(options) end
-- * `string_output`: Return the selected button's label or the dialog's exit
-- status instead of the button's index or the exit code. The default value
-- is `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
-- a button before timing out. Dialogs do not time out by default.
-- @return selected button or exit code, input text
-function standard_inputbux(options) end
+function standard_inputbox(options) end
---
-- Prompts the user with a one-line masked input box dialog defined by dialog
--- options table *options*, returning the index of the selected button along
--- with the input text or, if *options*.`string_output` is `true`, the selected
--- button's label along with the input text.
+-- options table *options*, returning the selected button's index along with the
+-- input text or, if *options*.`string_output` is `true`, the selected button's
+-- label along with the input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
-- dialog, returns `-1` or `"delete"`.
-- @param options Table of key-value option pairs for the input box.
@@ -181,8 +181,8 @@ function standard_inputbux(options) end
-- * `string_output`: Return the selected button's label or the dialog's exit
-- status instead of the button's index or the exit code. The default value
-- is `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -193,7 +193,7 @@ function secure_inputbox(options) end
---
-- Prompts the user with a one-line masked input box dialog defined by dialog
-- options table *options* and with localized "Ok" and "Cancel" buttons,
--- returning the index of the selected button along with the input text or, if
+-- returning the selected button's index along with the input text or, if
-- *options*.`string_output` is `true`, the selected button's label along with
-- the input text.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
@@ -208,8 +208,8 @@ function secure_inputbox(options) end
-- * `string_output`: Return the selected button's label or the dialog's exit
-- status instead of the button's index or the exit code. The default value
-- is `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -256,8 +256,8 @@ function filesave(options) end
---
-- Prompts the user with a multiple-line textbox dialog defined by dialog
--- options table *options*, returning the index of the selected button along
--- with the textbox text if *options*.`editable` is `true` or, if
+-- options table *options*, returning the selected button's index along with the
+-- textbox text if *options*.`editable` is `true` or, if
-- *options*.`string_output` is `true`, the selected button's label along with
-- the textbox text if *options*.`editable` is also `true`.
-- If the dialog timed out, returns `0` or `"timeout"`. If the user canceled the
@@ -287,8 +287,8 @@ function filesave(options) end
-- * `string_output`: Return the selected button's label or the dialog's exit
-- status instead of the button's index or the exit code. The default value
-- is `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -300,13 +300,13 @@ function textbox(options) end
---
-- Prompts the user with a drop down item selection dialog defined by dialog
--- options table *options*, returning the index of the selected button along
--- with the index of the selected item or, if *options*.`string_output` is
--- `true`, the selected button's label along with the selected item's text.
--- If *options*.`exit_onchange` closed the dialog, returns `4` along with either
--- the index of the selected item or the selected item's text. If the dialog
--- timed out, returns `0` or `"timeout"`. If the user canceled the dialog,
--- returns `-1` or `"delete"`.
+-- options table *options*, returning the selected button's index along with the
+-- index of the selected item or, if *options*.`string_output` is `true`, the
+-- selected button's label along with the selected item's text.
+-- If *options*.`exit_onchange` caused the dialog to close, returns `4` along
+-- with either the selected item's index or text. If the dialog timed out,
+-- returns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or
+-- `"delete"`.
-- @param options Table of key-value option pairs for the drop down dialog.
--
-- * `title`: The dialog's title text.
@@ -325,8 +325,8 @@ function textbox(options) end
-- status along with the selected item's text instead of the button's index
-- or the exit code along with the item's index. The default value is
-- `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -339,13 +339,13 @@ function dropdown(options) end
---
-- Prompts the user with a drop down item selection dialog defined by dialog
-- options table *options* and with localized "Ok" and "Cancel" buttons,
--- returning the index of the selected button along with the index of the
--- selected item or, if *options*.`string_output` is `true`, the selected
--- button's label along with the selected item's text.
--- If *options*.`exit_onchange` closed the dialog, returns `4` along with either
--- the index of the selected item or the selected item's text. If the dialog
--- timed out, returns `0` or `"timeout"`. If the user canceled the dialog,
--- returns `-1` or `"delete"`.
+-- returning the selected button's index along with the selected item's index
+-- or, if *options*.`string_output` is `true`, the selected button's label along
+-- with the selected item's text.
+-- If *options*.`exit_onchange` caused the dialog to close, returns `4` along
+-- with either the selected item's index or text. If the dialog timed out,
+-- returns `0` or `"timeout"`. If the user canceled the dialog, returns `-1` or
+-- `"delete"`.
-- @param options Table of key-value option pairs for the drop down dialog.
--
-- * `title`: The dialog's title text.
@@ -361,8 +361,8 @@ function dropdown(options) end
-- status along with the selected item's text instead of the button's index
-- or the exit code along with the item's index. The default value is
-- `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
@@ -372,8 +372,8 @@ function standard_dropdown(options) end
---
-- Prompts the user with a filtered list item selection dialog defined by dialog
--- options table *options*, returning the index of the selected button along
--- with the index(es) of the selected item(s) (depending on whether or not
+-- options table *options*, returning the selected button's index along with the
+-- index(es) of the selected item(s) (depending on whether or not
-- *options*.`select_multiple` is `true`) or, if *options*.`string_output` is
-- `true`, the selected button's label along with the selected item's or items'
-- text.
@@ -403,8 +403,8 @@ function standard_dropdown(options) end
-- status along with the selected item's text instead of the button's index
-- or the exit code along with the item's index. The default value is
-- `false`.
--- * `width`: The pixel width of the dialog.
--- * `height`: The pixel height of the dialog.
+-- * `width`: The dialog's pixel width.
+-- * `height`: The dialog's pixel height.
-- * `float`: Show the dialog on top of all desktop windows. The default value
-- is `false`.
-- * `timeout`: The number of seconds the dialog waits for the user to select
diff --git a/core/.view.luadoc b/core/.view.luadoc
index d1a09450..3a86e191 100644
--- a/core/.view.luadoc
+++ b/core/.view.luadoc
@@ -5,8 +5,7 @@
---
-- A Textadept view object.
-- @field size (number)
--- The pixel position of the split resizer if this view is part of a split
--- view.
+-- The split resizer's pixel position if the view is a split one.
module('view')
---
@@ -35,9 +34,9 @@ function split(view, vertical) end
function unsplit(view) end
---
--- Goes to buffer number *n* in the view.
--- *relative* indicates whether or not *n* is an index relative to the index of
--- the current buffer in `_G._BUFFERS` instead of an absolute index.
+-- Switches to buffer number *n* in the view.
+-- *relative* indicates whether or not *n* is an index relative to the current
+-- buffer's index in `_G._BUFFERS` instead of an absolute index.
-- Emits `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events.
-- @param view The view to switch buffers in.
-- @param n A relative or absolute buffer index in `_G._BUFFERS`. An absolute
diff --git a/core/events.lua b/core/events.lua
index f4461c58..fa037842 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -44,8 +44,8 @@ local M = {}
-- [`buffer:auto_c_cancel()`][] before returning from the event handler.
-- Arguments:
--
--- * _`text`_: The text of the selection.
--- * _`position`_: The position of the beginning of the autocompleted word.
+-- * _`text`_: The selection's text.
+-- * _`position`_: The autocompleted word's beginning position.
-- @field BUFFER_AFTER_SWITCH (string)
-- Emitted right after switching to another buffer.
-- Emitted by [`view:goto_buffer()`][].
@@ -65,7 +65,7 @@ local M = {}
-- * _`position`_: `1` if the up arrow was clicked, 2 if the down arrow was
-- clicked, and 0 otherwise.
-- @field CHAR_ADDED (string)
--- Emitted after adding a text character to the buffer.
+-- Emitted after the user types a text character into the buffer.
-- Arguments:
--
-- * _`byte`_: The text character's byte.
@@ -122,7 +122,7 @@ local M = {}
-- set.
-- Arguments:
--
--- * _`position`_: The position clicked.
+-- * _`position`_: The clicked text's position.
-- * _`modifiers`_: A bit-mask of any modifier keys used: `buffer.MOD_CTRL`,
-- `buffer.MOD_SHIFT`, `buffer.MOD_ALT`, and `buffer.MOD_META`.
-- Note: If you set `buffer.rectangular_selection_modifier` to
@@ -133,7 +133,7 @@ local M = {}
-- attribute set.
-- Arguments:
--
--- * _`position`_: The position double-clicked.
+-- * _`position`_: The double-clicked text's position.
-- * _`modifiers`_: A bit-mask of any modifier keys used: `buffer.MOD_CTRL`,
-- `buffer.MOD_SHIFT`, `buffer.MOD_ALT`, and `buffer.MOD_META`.
-- Note: If you set `buffer.rectangular_selection_modifier` to
@@ -144,12 +144,12 @@ local M = {}
-- style with the hotspot attribute set.
-- Arguments:
--
--- * _`position`_: The position unclicked.
+-- * _`position`_: The clicked text's position.
-- @field INDICATOR_CLICK (string)
-- Emitted when clicking the mouse on text that has an indicator present.
-- Arguments:
--
--- * _`position`_: The position of the clicked text.
+-- * _`position`_: The clicked text's position.
-- * _`modifiers`_: A bit-mask of any modifier keys used: `buffer.MOD_CTRL`,
-- `buffer.MOD_SHIFT`, `buffer.MOD_ALT`, and `buffer.MOD_META`.
-- Note: If you set `buffer.rectangular_selection_modifier` to
@@ -160,7 +160,7 @@ local M = {}
-- indicator present.
-- Arguments:
--
--- * _`position`_: The position of the clicked text.
+-- * _`position`_: The clicked text's position.
-- @field INITIALIZED (string)
-- Emitted after Textadept finishes initializing.
-- @field KEYPRESS (string)
@@ -178,8 +178,7 @@ local M = {}
-- Arguments:
--
-- * _`margin`_: The margin number clicked.
--- * _`position`_: The position of the start of the line whose margin was
--- clicked.
+-- * _`position`_: The position of the start of the clicked margin's line.
-- * _`modifiers`_: A bit-mask of any modifier keys used: `buffer.MOD_CTRL`,
-- `buffer.MOD_SHIFT`, `buffer.MOD_ALT`, and `buffer.MOD_META`.
-- Note: If you set `buffer.rectangular_selection_modifier` to
@@ -229,7 +228,7 @@ local M = {}
-- Arguments:
--
-- * _`list_type`_: The *list_type* from [`buffer:user_list_show()`][].
--- * _`text`_: The text of the selection.
+-- * _`text`_: The selection's text.
-- * _`position`_: The position the list was displayed at.
-- @field VIEW_NEW (string)
-- Emitted after creating a new view.
diff --git a/core/file_io.lua b/core/file_io.lua
index b68247ad..ad8f677f 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -91,7 +91,7 @@ io.boms = {
io.encodings = {'UTF-8', 'ASCII', 'ISO-8859-1', 'MacRoman'}
---
--- Opens *filenames*, a string filename, table of filenames, or user-selected
+-- Opens *filenames*, a string filename or table of provided or user-selected
-- filenames.
-- Emits a `FILE_OPENED` event.
-- @param filenames Optional string filename or table of filenames to open. If
@@ -326,7 +326,7 @@ events_connect(events.FILE_OPENED, function(filename)
end)
---
--- Prompts the user to open a recently opened file.
+-- Prompts the user to select a recently opened file to reopen.
-- @see recent_files
-- @name open_recent_file
function io.open_recent_file()
@@ -342,8 +342,8 @@ function io.open_recent_file()
end
---
--- Quickly open files from *paths*, a string directory path or table of
--- directory paths, using a filtered list dialog.
+-- Prompts the user to select files to open from *paths*, a string directory
+-- path or table of directory paths, using a filtered list dialog.
-- Files shown in the dialog do not match any pattern in string or table
-- *filter*, and, unless *exclude_FILTER* is `true`, `lfs.FILTER` as well. A
-- filter table contains Lua patterns that match filenames to exclude, an
diff --git a/core/init.lua b/core/init.lua
index b0458f0e..374689b7 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -33,7 +33,7 @@ if jit then module, package.searchers, bit32 = nil, package.loaders, bit end
-- machines *~/* is the value of "$HOME", typically */home/username/* and
-- */Users/username/* respectively.
-- @field _CHARSET (string)
--- The character encoding of the filesystem.
+-- The filesystem's character encoding.
-- This is used when [working with files](io.html).
-- @field WIN32 (bool)
-- Whether or not Textadept is running on Windows.
diff --git a/core/keys.lua b/core/keys.lua
index 2278d247..5f168028 100644
--- a/core/keys.lua
+++ b/core/keys.lua
@@ -16,13 +16,13 @@ local M = {}
-- part of what is called a "key chain", to be discussed below. When searching
-- for a command to run based on a key sequence, Textadept considers key
-- bindings in the current key mode to have priority. If no key mode is active,
--- key bindings in the current lexer have priority, followed by the ones in the
+-- language-specific key bindings have priority, followed by the ones in the
-- global table. This means if there are two commands with the same key
--- sequence, Textadept runs the one specific to the current lexer. However, if
--- the command returns the boolean value `false`, Textadept also runs the
--- lower-priority command. (This is useful for language modules to override
--- commands like Adeptsense autocompletion, but fall back to word autocompletion
--- if the first command fails.)
+-- sequence, Textadept runs the language-specific one. However, if the command
+-- returns the boolean value `false`, Textadept also runs the lower-priority
+-- command. (This is useful for language modules to override commands like
+-- Adeptsense autocompletion, but fall back to word autocompletion if the first
+-- command fails.)
--
-- ## Key Sequences
--
diff --git a/core/ui.lua b/core/ui.lua
index c726629e..67a8a661 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -6,19 +6,19 @@ local ui = ui
---
-- Utilities for interacting with Textadept's user interface.
-- @field title (string, Write-only)
--- The title text of the Textadept window.
+-- The title text of Textadept's window.
-- @field context_menu
--- The editor's context menu, a [`ui.menu()`](#menu).
+-- The buffer's context menu, a [`ui.menu()`](#menu).
-- This is a low-level field. You probably want to use the higher-level
-- `textadept.menu.set_contextmenu()`.
-- @field clipboard_text (string, Read-only)
-- The text on the clipboard.
-- @field statusbar_text (string, Write-only)
--- The text displayed by the statusbar.
+-- The text displayed in the statusbar.
-- @field bufstatusbar_text (string, Write-only)
--- The text displayed by the buffer statusbar.
+-- The text displayed in the buffer statusbar.
-- @field maximized (bool)
--- Whether or not the Textadept window is maximized.
+-- Whether or not Textadept's window is maximized.
module('ui')]]
local theme = package.searchpath(not CURSES and 'light' or 'term',
@@ -134,8 +134,8 @@ function ui.switch_buffer()
end
---
--- Goes to the buffer whose filename is *filename* in an existing view,
--- otherwise splitting the current view if *split* is `true` or going to the
+-- Switches to the buffer whose filename is *filename* in an existing view,
+-- otherwise splitting the current view if *split* is `true` or shifting to the
-- next or *preferred_view* view instead of staying in the current one.
-- *sloppy* indicates whether or not only the last part of *filename* is matched
-- to a buffer's `filename`.
@@ -174,8 +174,8 @@ function ui.goto_file(filename, split, preferred_view, sloppy)
end
---
--- Sets the editor theme name to *name* and optionally assigns the properties
--- contained in table *props*.
+-- Switches the editor theme to name *name* and optionally assigns the
+-- properties contained in table *props*.
-- User themes override Textadept's default themes when they have the same name.
-- If *name* contains slashes, it is assumed to be an absolute path to a theme
-- instead of a theme name.
@@ -384,7 +384,7 @@ events_connect(events.ERROR, ui.print)
local menubar
---
--- A table containing the width and height pixel values of the Textadept window.
+-- A table containing the width and height pixel values of Textadept's window.
-- @class table
-- @name size
local size
@@ -422,9 +422,9 @@ local dialog
local get_split_table
---
--- Goes to view number *n*.
--- *relative* indicates whether or not *n* is an index relative to the index of
--- the current view in `_G._VIEWS` instead of an absolute index.
+-- Shifts to view number *n*.
+-- *relative* indicates whether or not *n* is an index relative to the current
+-- view's index in `_G._VIEWS` instead of an absolute index.
-- Emits `VIEW_BEFORE_SWITCH` and `VIEW_AFTER_SWITCH` events.
-- @param n A relative or absolute view index in `_G._VIEWS`.
-- @param relative Optional flag indicating whether *n* is a relative or
diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md
index d6512cdf..c7fff2d1 100644
--- a/doc/14_Appendix.md
+++ b/doc/14_Appendix.md
@@ -122,9 +122,10 @@ non-existant graphics capabilities:
* When scrolling to the right, long lines overwrite margins.
* No marker symbols other than `MARK_CHARACTER`.
* No mouse interactions, cursor types, or hotspots.
-* Only up to 16 colors recognized: black (`0x000000`), red (`0x800000`), green
- (`0x008000`), yellow (`0x808000`), blue (`0x000080`), magenta (`0x800080`),
- cyan (`0x008080`), white (`0xC0C0C0`), light black (`0x404040`), light red
+* Only up to 16 colors recognized, regardless of how many colors the terminal
+ supports. They are: black (`0x000000`), red (`0x800000`), green (`0x008000`),
+ yellow (`0x808000`), blue (`0x000080`), magenta (`0x800080`), cyan
+ (`0x008080`), white (`0xC0C0C0`), light black (`0x404040`), light red
(`0xFF0000`), light green (`0x00FF00`), light yellow (`0xFFFF00`), light blue
(`0x0000FF`), light magenta (`0xFF00FF`), light cyan (`0x00FFFF`), and light
white (`0xFFFFFF`). Even if your terminal uses a different color map, you must
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua
index dd1b6bc2..0a51a76b 100644
--- a/modules/textadept/command_entry.lua
+++ b/modules/textadept/command_entry.lua
@@ -91,9 +91,9 @@ local env = setmetatable({}, {
})
---
--- Executes string *code* as Lua code.
--- Code is subject to an "abbreviated" environment where the contents of the
--- `buffer`, `view`, and `ui` tables are also considered as globals.
+-- Executes string *code* as Lua code subject to an "abbreviated" environment
+-- where the contents of the `buffer`, `view`, and `ui` tables are also
+-- considered as global functions and fields.
-- Prints the results of '=' expressions like in the Lua prompt.
-- @param code The Lua code to execute.
-- @name execute_lua
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index 1335b8aa..5c86130c 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -22,7 +22,7 @@ local M = {}
-- Typeover characters are defined in the [`typeover_chars`](#typeover_chars)
-- table.
-- @field AUTOINDENT (bool)
--- Match the indentation level of the previous line when inserting a new line.
+-- Match the previous line's indentation level when inserting a new line.
-- The default value is `true`.
-- @field STRIP_TRAILING_SPACES (bool)
-- Strip trailing whitespace before saving files.
@@ -512,7 +512,7 @@ end
--
-- 1. If text is selected and spans multiple lines, all text on the lines
-- containing the selection is passed as stdin. However, if the end of the
--- selection is at the beginning of a line, only the line ending characters from
+-- selection is at the beginning of a line, only the line ending delimiters from
-- the previous line are included. The rest of the line is excluded.
-- 2. If text is selected and spans a single line, only the selected text is
-- used.
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 4a9e6054..f367d5fa 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -189,7 +189,7 @@ end
-- otherwise continues an incremental search by searching for the next or
-- previous instance of string *text* depending on boolean *next*.
-- *anchor* indicates whether or not to search for *text* starting from the
--- current position instead of the position where incremental search began at.
+-- caret position instead of the position where incremental search began at.
-- Only the `match_case` find option is recognized. Normal command entry
-- functionality is unavailable until the search is finished by pressing `Esc`
-- (`⎋` on Mac OSX | `Esc` in curses).
@@ -197,7 +197,7 @@ end
-- incremental search.
-- @param next Flag indicating whether or not the search direction is forward.
-- @param anchor Optional flag indicating whether or not to start searching from
--- the current position. The default value is `false`.
+-- the caret position. The default value is `false`.
-- @name find_incremental
function M.find_incremental(text, next, anchor)
if text then find_incremental(text, next, anchor) return end
diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua
index 4099cc28..2833311a 100644
--- a/modules/textadept/menu.lua
+++ b/modules/textadept/menu.lua
@@ -297,7 +297,7 @@ end
local items, commands
---
--- Sets `ui.menubar` from *menubar*, a table of menus.
+-- Sets `ui.menubar` from menu table *menubar*.
-- Each menu is an ordered list of menu items and has a `title` key for the
-- title text. Menu items are tables containing menu text and either a function
-- to call or a table containing a function with its parameters to call when an
@@ -322,7 +322,7 @@ end
M.set_menubar(menubar)
---
--- Sets `ui.context_menu` from *menu*, an ordered list of menu items.
+-- Sets `ui.context_menu` from menu item list *menu*.
-- Menu items are tables containing menu text and either a function to call or
-- a table containing a function with its parameters to call when an item is
-- clicked. Menu items may also be sub-menus, ordered lists of menu items with
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index 32823c47..7a0d5920 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -4,7 +4,7 @@ local M = {}
--[[ This comment is for LuaDoc.
---
--- Compile and run/execute source files with Textadept.
+-- Compile and run source code files with Textadept.
-- [Language modules][] may tweak the `compile_commands`, `run_commands`, and/or
-- `error_patterns` tables for particular languages.
--
@@ -129,10 +129,10 @@ end
-- strings.
-- Command line strings may have the following macros:
--
--- + `%(filepath)`: The full path of the current file.
+-- + `%(filepath)`: The current file's full path.
-- + `%(filedir)`: The current file's directory path.
--- + `%(filename)`: The name of the file, including its extension.
--- + `%(filename_noext)`: The name of the file, excluding its extension.
+-- + `%(filename)`: The file's name, including its extension.
+-- + `%(filename_noext)`: The file's name, excluding its extension.
-- @class table
-- @name compile_commands
M.compile_commands = {actionscript='mxmlc "%(filename)"',ada='gnatmake "%(filename)"',antlr='antlr4 "%(filename)"',g='antlr3 "%(filename)"',applescript='osacompile "%(filename)" -o "%(filename_noext).scpt"',boo='booc "%(filename)"',caml='ocamlc -o "%(filename_noext)" "%(filename)"',csharp=WIN32 and 'csc "%(filename)"' or 'mcs "%(filename)"',cpp='g++ -o "%(filename_noext)" "%(filename)"',c='gcc -o "%(filename_noext)" "%(filename)"',coffeescript='coffee -c "%(filename)"',context='context --nonstopmode "%(filename)"',cuda=WIN32 and 'nvcc -o "%(filename_noext).exe" "%(filename)"' or 'nvcc -o "%(filename_noext)" "%(filename)"',dmd='dmd "%(filename)"',dot='dot -Tps "%(filename)" -o "%(filename_noext).ps"',eiffel='se c "%(filename)"',erlang='erl -compile "%(filename_noext)"',fsharp=WIN32 and 'fsc.exe "%(filename)"' or 'mono fsc.exe "%(filename)"',fortran='gfortran -o "%(filename_noext)" "%(filename)"',gap='gac -o "%(filename_noext)" "%(filename)"',go='go build "%(filename)"',groovy='groovyc "%(filename)"',haskell=WIN32 and 'ghc -o "%(filename_noext).exe" "%(filename)"' or 'ghc -o "%(filename_noext)" "%(filename)"',inform=function() return 'inform -c "'..buffer.filename:match('^(.+%.inform[/\\])Source')..'"' end,java='javac "%(filename)"',latex='pdflatex -file-line-error -halt-on-error "%(filename)"',less='lessc "%(filename)" "%(filename_noext).css"',lilypond='lilypond "%(filename)"',lisp='clisp -c "%(filename)"',litcoffee='coffee -c "%(filename)"',lua='luac -o "%(filename_noext).luac" "%(filename)"',markdown='markdown "%(filename)" > "%(filename_noext).html"',nemerle='ncc "%(filename)" -out:"%(filename_noext).exe"',nimrod='nimrod c "%(filename)"',nsis='MakeNSIS "%(filename)"',objective_c='gcc -o "%(filename_noext)" "%(filename)"',pascal='fpc "%(filename)"',perl='perl -c "%(filename)"',php='php -l "%(filename)"',prolog='gplc --no-top-level "%(filename)"',python='python -m py_compile "%(filename)"',ruby='ruby -c "%(filename)"',sass='sass "%(filename)" "%(filename_noext).css"',scala='scalac "%(filename)"',tex='pdftex -file-line-error -halt-on-error "%(filename)"',vala='valac "%(filename)"',vb=WIN32 and 'vbc "%(filename)"' or 'vbnc "%(filename)"',}
@@ -162,8 +162,8 @@ events.connect(events.COMPILE_OUTPUT, print_output)
M.run_commands = {actionscript=WIN32 and 'start "" "%(filename_noext).swf"' or OSX and 'open "file://%(filename_noext).swf"' or 'xdg-open "%(filename_noext).swf"',ada=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',applescript='osascript "%(filename)"',awk='awk -f "%(filename)"',batch='"%(filename)"',boo='booi "%(filename)"',caml='ocamlrun "%(filename_noext)"',csharp=WIN32 and '"%(filename_noext)"' or 'mono "%(filename_noext).exe"',cpp=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',chuck='chuck "%(filename)"',cmake='cmake -P "%(filename)"',coffeescript='coffee "%(filename)"',context=WIN32 and 'start "" "%(filename_noext).pdf"' or OSX and 'open "%(filename_noext).pdf"' or 'xdg-open "%(filename_noext).pdf"',cuda=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',dmd=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',eiffel="./a.out",fsharp=WIN32 and '"%(filename_noext)"' or 'mono "%(filename_noext).exe"',forth='gforth "%(filename)" -e bye',fortran=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',gnuplot='gnuplot "%(filename)"',go='go run "%(filename)"',groovy='groovy "%(filename)"',haskell=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',hypertext=WIN32 and 'start "" "%(filename)"' or OSX and 'open "file://%(filename)"' or 'xdg-open "%(filename)"',idl='idl -batch "%(filename)"',Io='io "%(filename)"',java='java "%(filename_noext)"',javascript='node "%(filename)"',latex=WIN32 and 'start "" "%(filename_noext).pdf"' or OSX and 'open "%(filename_noext).pdf"' or 'xdg-open "%(filename_noext).pdf"',less='lessc --no-color "%(filename)"',lilypond=WIN32 and 'start "" "%(filename_noext).pdf"' or OSX and 'open "%(filename_noext).pdf"' or 'xdg-open "%(filename_noext).pdf"',lisp='clisp "%(filename)"',litcoffee='coffee "%(filename)"',lua='lua -e "io.stdout:setvbuf(\'no\')" "%(filename)"',makefile=WIN32 and 'nmake -f "%(filename)"' or 'make -f "%(filename)"',markdown='markdown "%(filename)"',nemerle=WIN32 and '"%(filename_noext)"' or 'mono "%(filename_noext).exe"',nimrod=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',objective_c=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',pascal=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',perl='perl "%(filename)"',php='php "%(filename)"',pike='pike "%(filename)"',pkgbuild='makepkg -p "%(filename)"',prolog=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',python='python "%(filename)"',rstats=WIN32 and 'Rterm -f "%(filename)"' or 'R -f "%(filename)"',rebol='REBOL "%(filename)"',rexx=WIN32 and 'rexx "%(filename_noext)"' or 'regina "%(filename_noext)"',ruby='ruby "%(filename)"',sass='sass "%(filename)"',scala='scala "%(filename_noext)"',bash='bash "%(filename)"',csh='tcsh "%(filename)"',sh='sh "%(filename)"',zsh='zsh "%(filename)"',smalltalk='gst "%(filename)"',tcl='tclsh "%(filename)"',tex=WIN32 and 'start "" "%(filename_noext).pdf"' or OSX and 'open "%(filename_noext).pdf"' or 'xdg-open "%(filename_noext).pdf"',vala=WIN32 and '"%(filename_noext)"' or './"%(filename_noext)"',vb=WIN32 and '"%(filename_noext)"' or 'mono "%(filename_noext).exe"',}
---
--- Runs/executes the file based on its extension or lexer, using the command
--- from the `run_commands` table.
+-- Runs the file based on its extension or lexer, using the command from the
+-- `run_commands` table.
-- Emits a `RUN_OUTPUT` event.
-- @see run_commands
-- @see _G.events
diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua
index d470ce5a..0aa2bc23 100644
--- a/modules/textadept/session.lua
+++ b/modules/textadept/session.lua
@@ -29,8 +29,8 @@ M.SAVE_ON_QUIT = true
M.MAX_RECENT_FILES = 10
---
--- Loads Textadept session file *filename* or user-selected file, returning
--- `true` if the session file was opened and read.
+-- Loads session file *filename* or user-selected file, returning `true` if the
+-- session file was opened and read.
-- Textadept restores split views, opened buffers, cursor information, and
-- recent files.
-- @param filename Optional absolute path to the session file to load. If `nil`,
@@ -116,7 +116,7 @@ events.connect(events.ARG_NONE, function()
end)
---
--- Saves a Textadept session to file *filename* or user-selected file.
+-- Saves the session to file *filename* or user-selected file.
-- Saves split views, opened buffers, cursor information, and recent files.
-- @param filename Optional absolute path to the session file to save. If `nil`,
-- the user is prompted for one.
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua
index da6193df..0f68246e 100644
--- a/modules/textadept/snippets.lua
+++ b/modules/textadept/snippets.lua
@@ -50,10 +50,7 @@ local M = {}
-- code's return text. The code may use a temporary `selected_text` global
-- variable that contains the currently selected text. An example is
--
--- snippets['foo'] = [[
--- %2<('%1'):gsub('^.', function(c)
--- return c:upper() -- capitalize the word
--- end)>, %1(mirror) on the wall.]]
+-- snippets['add'] = '%1(1) + %2(2) = %3<%1 + %2>'
--
-- Textadept executes shell code using Lua's [`io.popen()`][] and replaces the
-- transform with the process' standard output (stdout). An example is
@@ -127,8 +124,8 @@ end
---
-- Inserts snippet text *text* or the snippet associated with the trigger behind
--- the caret as a snippet, or goes to the next placeholder of the active
--- snippet, ultimately only returning `false` if no action was taken.
+-- the caret as a snippet, or goes to the active snippet's next placeholder,
+-- ultimately only returning `false` if no action was taken.
-- @param text Optional snippet text to insert. If `nil`, attempts to insert a
-- new snippet based on the trigger, the word behind caret, and the current
-- lexer.
@@ -153,8 +150,8 @@ function M._insert(text)
end
---
--- Goes back to the previous snippet placeholder, reverting any changes from the
--- current one, but returns `false` only if no snippet is active.
+-- Jumps back to the previous snippet placeholder, reverting any changes from
+-- the current one, but returns `false` only if no snippet is active.
-- @return `false` if no snippet is active; `nil` otherwise.
-- @name _previous
function M._previous()
@@ -163,14 +160,14 @@ function M._previous()
end
---
--- Cancels insertion of the active snippet.
+-- Cancels the active snippet, removing all inserted text.
-- @name _cancel_current
function M._cancel_current()
if #snippet_stack > 0 then snippet_stack[#snippet_stack]:cancel() end
end
---
--- Prompts the user for a snippet to insert from a list of global and
+-- Prompts the user to select a snippet to insert from a list of global and
-- language-specific snippets.
-- @name _select
function M._select()