aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-11 22:43:59 -0400
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2020-10-11 22:43:59 -0400
commitff7f869ae0a02535dcc7f44a65dd3ea2fed87d01 (patch)
tree2457467679904d4be7d1322e0bfcfc416368d080 /docs
parent4f49182b3f4359829449aca2b3b8ca9b6a73180f (diff)
Updated LuaDoc.
Diffstat (limited to 'docs')
-rw-r--r--docs/api.md44
-rw-r--r--docs/changelog.md16
-rw-r--r--docs/manual.md2
3 files changed, 32 insertions, 30 deletions
diff --git a/docs/api.md b/docs/api.md
index 941c0b11..b601efad 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -557,19 +557,19 @@ Emitted when no command line arguments are passed to Textadept on startup.
<a id="args.register"></a>
#### `args.register`(*short, long, narg, f, description*)
-Registers a command line switch with short and long versions *short* and
-*long*, respectively. *narg* is the number of arguments the switch accepts,
-*f* is the function called when the switch is tripped, and *description* is
-the switch's description when displaying help.
+Registers a command line option with short and long versions *short* and
+*long*, respectively. *narg* is the number of arguments the option accepts,
+*f* is the function called when the option is set, and *description* is
+the option's description when displaying help.
Parameters:
-* *`short`*: The string short version of the switch.
-* *`long`*: The string long version of the switch.
-* *`narg`*: The number of expected parameters for the switch.
-* *`f`*: The Lua function to run when the switch is tripped. It is passed
- *narg* string arguments.
-* *`description`*: The string description of the switch for command line
+* *`short`*: The string short version of the option.
+* *`long`*: The string long version of the option.
+* *`narg`*: The number of expected parameters for the option.
+* *`f`*: The Lua function to run when the option is set. It is passed *narg*
+ string arguments.
+* *`description`*: The string description of the option for command line
help.
@@ -1860,8 +1860,8 @@ Parameters:
<a id="buffer.copy_range"></a>
#### `buffer.copy_range`(*buffer, start\_pos, end\_pos*)
-Copies the range of text between positions *start_pos* and *end_pos* to the
-clipboard.
+Copies to the clipboard the range of text between positions *start_pos* and
+*end_pos*.
Parameters:
@@ -3125,6 +3125,7 @@ Parameters:
#### `buffer.save`(*buffer*)
Saves the buffer to its file.
+If the buffer does not have a file, the user is prompted for one.
Emits `FILE_BEFORE_SAVE` and `FILE_AFTER_SAVE` events.
Parameters:
@@ -3266,7 +3267,7 @@ Parameters:
<a id="buffer.set_encoding"></a>
#### `buffer.set_encoding`(*buffer, encoding*)
-Converts the current buffer's contents to encoding *encoding*.
+Converts the buffer's contents to encoding *encoding*.
Parameters:
@@ -3943,8 +3944,8 @@ Emitted after double-clicking the mouse button.
* _`position`_: The position double-clicked.
* _`line`_: The line number of the position double-clicked.
- * _`modifiers`_: A bit-mask of any modifier keys used: `view.MOD_CTRL`,
- `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
+ * _`modifiers`_: A bit-mask of any modifier keys held down:
+ `view.MOD_CTRL`, `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
On macOS, the Command modifier key is reported as `view.MOD_CTRL` and
Ctrl is `view.MOD_META`.
Note: If you set `view.rectangular_selection_modifier` to
@@ -4010,8 +4011,8 @@ Emitted when clicking the mouse on text that has an indicator present.
Arguments:
* _`position`_: The clicked text's position.
- * _`modifiers`_: A bit-mask of any modifier keys used: `view.MOD_CTRL`,
- `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
+ * _`modifiers`_: A bit-mask of any modifier keys held down:
+ `view.MOD_CTRL`, `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
On macOS, the Command modifier key is reported as `view.MOD_CTRL` and
Ctrl is `view.MOD_META`.
Note: If you set `view.rectangular_selection_modifier` to
@@ -4054,8 +4055,8 @@ Emitted when clicking the mouse inside a sensitive margin.
* _`margin`_: The margin number clicked.
* _`position`_: The beginning position of the clicked margin's line.
- * _`modifiers`_: A bit-mask of any modifier keys used: `view.MOD_CTRL`,
- `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
+ * _`modifiers`_: A bit-mask of any modifier keys held down:
+ `view.MOD_CTRL`, `view.MOD_SHIFT`, `view.MOD_ALT`, and `view.MOD_META`.
On macOS, the Command modifier key is reported as `view.MOD_CTRL` and
Ctrl is `view.MOD_META`.
Note: If you set `view.rectangular_selection_modifier` to
@@ -6416,6 +6417,7 @@ Extends Lua's `string` library to provide character set conversions.
Converts string *text* from encoding *old* to encoding *new* using GNU
libiconv, returning the string result.
+Raises an error if the encoding conversion failed.
Valid encodings are [GNU libiconv's encodings][] and include:
* European: ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, KOI8-R, KOI8-U,
@@ -10040,8 +10042,8 @@ Color the background of the line that contains the caret a different color.
<a id="view.caret_line_visible_always"></a>
#### `view.caret_line_visible_always` (bool)
-Always show the caret line, even when the window is not in focus.
- The default value is `false`, showing the line only when the window is in
+Always show the caret line, even when the view is not in focus.
+ The default value is `false`, showing the line only when the view is in
focus.
<a id="view.caret_period"></a>
diff --git a/docs/changelog.md b/docs/changelog.md
index ac3dfb59..4d640b03 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -116,7 +116,7 @@ Bugfixes:
* Fixed toggling of Find & Replace Pane visibility with `ui.find.focus()`.
* Fixed potential hangs with `os.spawn()` in the terminal version.
-* Fixed `--line` command line switch.
+* Fixed `--line` command line option.
* Fixed `ui.dialogs.optionselect()`'s `text` option.
* Call `os.spawn()` exit callback after `proc:wait()`.
* Fixed an instance of buffer selection data not being saved to a session.
@@ -496,7 +496,7 @@ Changes:
* `textadept.editing.highlight_word()` does not select the word by default
anymore.
* Changed [file filter][] format to be more flat and intuitive.
-* Added `-l` and `--line` command line switches to jump to a buffer line.
+* Added `-l` and `--line` command line options to jump to a buffer line.
* Updated to [PDCurses][] 3.6 for the Windows terminal version.
[`textadept.editing.show_documentation()`]: api.html#textadept.editing.show_documentation
@@ -1280,7 +1280,7 @@ Changes:
Bugfixes:
* Ensure `events.BUFFER_AFTER_SWITCH` is fired before `events.BUFFER_DELETED`.
-* Prevent command line help switches from exiting an open instance of Textadept.
+* Prevent command line help options from exiting an open instance of Textadept.
Changes:
@@ -2075,13 +2075,13 @@ Bugfixes:
Changes:
-* Added [command line switches][] for loading sessions on startup.
-* Added [command line switches][] for running Lua code on startup.
+* Added [command line options][] for loading sessions on startup.
+* Added [command line options][] for running Lua code on startup.
* Updated AWK lexer.
* Updated to [Scintilla][] 3.2.5.
* Updated to [LuaJIT][] 2.0.1.
-[command line switches]: manual.html#command-line-parameters
+[command line options]: manual.html#command-line-parameters
[Scintilla]: https://scintilla.org
[LuaJIT]: https://luajit.org
@@ -2219,7 +2219,7 @@ Changes:
Bugfixes:
-* Disabled `--help` switch to ncurses version due to terminal output mangling.
+* Disabled `--help` option to ncurses version due to terminal output mangling.
* ncurses replace entry can now be focused.
* Fixed ncurses memory leaks.
* Fixed multiple selection in Mac OSX.
@@ -3170,7 +3170,7 @@ Changes:
* Added Dot and JSON lexers.
* Search `_USERHOME` in addition to `_HOME` for themes.
-* Added command line switch for not loading/saving session.
+* Added command line option for not loading/saving session.
* Modified key bindings to be more key-layout agnostic.
* Added `reset_before` and `reset_after` events while `textadept.reset()` is
being run.
diff --git a/docs/manual.md b/docs/manual.md
index c06b2d05..4fce4653 100644
--- a/docs/manual.md
+++ b/docs/manual.md
@@ -263,7 +263,7 @@ XFCE, etc. button or menu launcher. Textadept's *src/textadept.desktop* and
Textadept accepts a variety of command line arguments, which are listed in the
table below.
-Switch |Arguments|Description
+Option |Arguments|Description
-------------------|:-------:|-----------
`-e`, `--execute` | 1 |Run the given Lua code
`-f`, `--force` | 0 |Forces unique instance