aboutsummaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-08-17 17:56:52 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2020-08-17 17:56:52 -0400
commitb3cbff3e4e80aac25f922d7fec4e198c6dde95b3 (patch)
tree603046d1d885a29b1fd3cba1c8a47eca220710e2 /core
parentf7855153d938c99d506ad363e889031e1e9420a3 (diff)
Updated some documentation and use macOS instead of Mac OSX.
Diffstat (limited to 'core')
-rw-r--r--core/._M.luadoc6
-rw-r--r--core/.buffer.luadoc4
-rw-r--r--core/.view.luadoc4
-rw-r--r--core/events.lua12
-rw-r--r--core/file_io.lua16
-rw-r--r--core/init.lua4
-rw-r--r--core/keys.lua18
7 files changed, 27 insertions, 37 deletions
diff --git a/core/._M.luadoc b/core/._M.luadoc
index e9d4bf18..afbe5779 100644
--- a/core/._M.luadoc
+++ b/core/._M.luadoc
@@ -42,7 +42,7 @@
-- files. However, it does not know all of them, and the ones that it does know
-- may not be completely accurate in all cases. Compile and run commands are
-- read from the [`textadept.run.compile_commands`]() and
--- [`textadept.run.run_commands`]() tables using the appropriate lexer name key,
+-- [`textadept.run.run_commands`]() tables using the appropriate lexer name key,
-- and thus can be defined or modified. For Lua, it would look like:
--
-- textadept.run.compile_commands.lua = 'luac "%f"'
@@ -97,7 +97,7 @@
-- Additional editing features for the language can be useful. For example, a
-- C++ module might have a feature to add a ';' to the end of the current line
-- and insert a new line. This command could be bound to the `Shift+Enter` (`⇧↩`
--- on Mac OSX | `S-Enter` in curses) key for easy access:
+-- on macOS | `S-Enter` in curses) key for easy access:
--
-- keys.cpp = {
-- ['s\n'] = function()
@@ -108,7 +108,7 @@
-- }
--
-- When defining key bindings for other commands, you may make use of a `Ctrl+L`
--- (`⌘L` on Mac OSX | `M-L` in curses) keychain. Traditionally this prefix has
+-- (`⌘L` on macOS | `M-L` in curses) keychain. Traditionally this prefix has
-- been reserved for use by language modules (although neither Textadept nor its
-- modules utilize it at the moment). Users may define this keychain for new or
-- existing modules and it will not conflict with any default key bindings.
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 8176e140..655c8820 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -14,6 +14,8 @@
-- Note that with regard to Scintilla-specific functionality, this API is a
-- _suggestion_, not a hard requirement. All of that functionality also exists
-- in [`view`](), even if undocumented.
+-- Any buffer fields set on startup (e.g. in *~/.textadept/init.lua*) will be
+-- the default, initial values for all buffers.
-- @field additional_selection_typing (bool)
-- Type into multiple selections.
-- The default value is `false`.
@@ -1830,7 +1832,7 @@ function set_encoding(buffer, encoding) end
function get_lexer(buffer, current) end
---
--- Associates string lexer name *name* or the auto-detected lexer name with the
+-- Associates string lexer name *name* or the auto-detected lexer name with the
-- buffer and then loads the appropriate language module if that module exists.
-- @param buffer A buffer.
-- @param name Optional string lexer name to set. If `nil`, attempts to
diff --git a/core/.view.luadoc b/core/.view.luadoc
index 74cd5219..0cf59048 100644
--- a/core/.view.luadoc
+++ b/core/.view.luadoc
@@ -14,6 +14,8 @@
-- Note that with regard to Scintilla-specific functionality, this API is a
-- _suggestion_, not a hard requirement. All of that functionality also exists
-- in [`buffer`](), even if undocumented.
+-- Any view fields set on startup (e.g. in *~/.textadept/init.lua*) will be the
+-- default, initial values for all views.
-- @field additional_caret_fore (number)
-- The foreground color, in "0xBBGGRR" format, of additional carets.
-- @field additional_carets_blink (bool)
@@ -464,7 +466,7 @@
-- @field rgba_image_scale (number)
-- The scale factor in percent of the RGBA image to be defined using
-- [`view.marker_define_rgba_image()`]().
--- This is useful on OSX with a retina display where each display unit is 2
+-- This is useful on macOS with a retina display where each display unit is 2
-- pixels: use a factor of `200` so that each image pixel is displayed using a
-- screen pixel. The default scale, `100`, will stretch each image pixel to
-- cover 4 screen pixels on a retina display.
diff --git a/core/events.lua b/core/events.lua
index 322ae9d3..1befd35a 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -27,7 +27,7 @@ local M = {}
-- handled it, or if you want to use the event framework to pass values.
--
-- @field APPLEEVENT_ODOC (string)
--- Emitted when Mac OSX tells Textadept to open a file.
+-- Emitted when macOS tells Textadept to open a file.
-- Arguments:
--
-- * _`uri`_: The UTF-8-encoded URI to open.
@@ -94,7 +94,7 @@ local M = {}
-- * _`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`.
--- On Mac OSX, the Command modifier key is reported as `view.MOD_CTRL` and
+-- 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
-- `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
@@ -149,7 +149,7 @@ local M = {}
-- * _`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`.
--- On Mac OSX, the Command modifier key is reported as `view.MOD_CTRL` and
+-- 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
-- `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
@@ -171,7 +171,7 @@ local M = {}
-- * _`shift`_: The "Shift" modifier key is held down.
-- * _`ctrl`_: The "Control" modifier key is held down.
-- * _`alt`_: The "Alt"/"Option" modifier key is held down.
--- * _`cmd`_: The "Command" modifier key on Mac OSX is held down.
+-- * _`cmd`_: The "Command" modifier key on macOS is held down.
-- * _`caps_lock`_: The "Caps Lock" modifier is on.
-- @field MARGIN_CLICK (string)
-- Emitted when clicking the mouse inside a sensitive margin.
@@ -181,7 +181,7 @@ local M = {}
-- * _`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`.
--- On Mac OSX, the Command modifier key is reported as `view.MOD_CTRL` and
+-- 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
-- `view.MOD_CTRL`, the "Control" modifier is reported as *both* "Control"
@@ -266,7 +266,7 @@ local M = {}
-- * _`shift`_: The "Shift" modifier key is held down.
-- * _`ctrl`_: The "Control" modifier key is held down.
-- * _`alt`_: The "Alt"/"Option" modifier key is held down.
--- * _`cmd`_: The "Command" modifier key on Mac OSX is held down.
+-- * _`cmd`_: The "Command" modifier key on macOS is held down.
-- @field UPDATE_UI (string)
-- Emitted after the view is visually updated.
-- Arguments:
diff --git a/core/file_io.lua b/core/file_io.lua
index 5d108a55..de90ec81 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -60,20 +60,6 @@ io.recent_files = {}
-- KOI8-RU, CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
-- Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
-- Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh.
--- * Semitic: ISO-8859-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}.
--- * Japanese: EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2,
--- ISO-2022-JP-1.
--- * Chinese: EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950,
--- BIG5-HKSCS, BIG5-HKSCS:2004, BIG5-HKSCS:2001, BIG5-HKSCS:1999,
--- ISO-2022-CN, ISO-2022-CN-EXT.
--- * Korean: EUC-KR, CP949, ISO-2022-KR, JOHAB.
--- * Armenian: ARMSCII-8.
--- * Georgian: Georgian-Academy, Georgian-PS.
--- * Tajik: KOI8-T.
--- * Kazakh: PT154, RK1048.
--- * Thai: ISO-8859-11, TIS-620, CP874, MacThai.
--- * Laotian: MuleLao-1, CP1133.
--- * Vietnamese: VISCII, TCVN, CP1258.
-- * Unicode: UTF-8, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, UTF-16,
-- UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF-7, C99, JAVA.
--
@@ -349,7 +335,7 @@ local vcs = {'.bzr', '.git', '.hg', '.svn', '_FOSSIL_'}
-- Returns the root directory of the project that contains filesystem path
-- *path*.
-- In order to be recognized, projects must be under version control. Recognized
--- VCSes are Bazaar, Git, Mercurial, and SVN.
+-- VCSes are Bazaar, Fossil, Git, Mercurial, and SVN.
-- @param path Optional filesystem path to a project or a file contained within
-- a project. The default value is the buffer's filename or the current
-- working directory.
diff --git a/core/init.lua b/core/init.lua
index 0097d1e9..37f94af3 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -78,7 +78,7 @@ end)
-- user-data is stored.
-- On Windows machines *~/* is the value of the "USERHOME" environment
-- variable (typically *C:\Users\username\\* or
--- *C:\Documents and Settings\username\\*). On Linux, BSD, and Mac OSX
+-- *C:\Documents and Settings\username\\*). On Linux, BSD, and macOS
-- machines *~/* is the value of "$HOME" (typically */home/username/* and
-- */Users/username/* respectively).
-- @field _CHARSET (string)
@@ -87,7 +87,7 @@ end)
-- @field WIN32 (bool)
-- Whether or not Textadept is running on Windows.
-- @field OSX (bool)
--- Whether or not Textadept is running on Mac OSX as a GUI application.
+-- Whether or not Textadept is running on macOS as a GUI application.
-- @field LINUX (bool)
-- Whether or not Textadept is running on Linux.
-- @field BSD (bool)
diff --git a/core/keys.lua b/core/keys.lua
index 59a2314f..16c2053e 100644
--- a/core/keys.lua
+++ b/core/keys.lua
@@ -11,10 +11,10 @@ local M = {}
-- Define key bindings in the global `keys` table in key-value pairs. Each pair
-- consists of either a string key sequence and its associated command, a string
-- lexer name (from the *lexers/* directory) with a table of key sequences and
--- commands, a string key mode with a table of key sequences and commands, or a
--- key sequence with a table of more sequences and commands. The latter is 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
+-- commands, a string key mode with a table of key sequences and commands, or a
+-- key sequence with a table of more sequences and commands. The latter is 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,
-- 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
@@ -28,13 +28,13 @@ local M = {}
--
-- Key sequences are strings built from an ordered combination of modifier keys
-- and the key's inserted character. Modifier keys are "Control", "Shift", and
--- "Alt" on Windows, Linux, BSD, and in curses. On Mac OSX they are "Control"
+-- "Alt" on Windows, Linux, BSD, and in curses. On macOS they are "Control"
-- (`^`), "Alt/Option" (`⌥`), "Command" (`⌘`), and "Shift" (`⇧`). These
-- modifiers have the following string representations:
--
--- Modifier | Linux / Win32 | Mac OSX | curses |
+-- Modifier | Linux / Win32 | macOS | Terminal |
-- ---------|---------------|-----------|-----------|
--- Control | `'ctrl' | `'ctrl'` | `'ctrl'` |
+-- Control | `'ctrl'` | `'ctrl'` | `'ctrl'` |
-- Alt | `'alt'` | `'alt'` | `'meta'` |
-- Command | N/A | `'cmd'` | N/A |
-- Shift | `'shift'` | `'shift'` | `'shift'` |
@@ -197,7 +197,7 @@ end
-- @param shift Whether or not the Shift modifier is pressed.
-- @param control Whether or not the Control modifier is pressed.
-- @param alt Whether or not the Alt/option modifier is pressed.
--- @param cmd Whether or not the Command modifier on Mac OSX is pressed.
+-- @param cmd Whether or not the Command modifier on macOS is pressed.
-- @param caps_lock Whether or not Caps Lock is enabled.
-- @return `true` to stop handling the key; `nil` otherwise.
local function keypress(code, shift, control, alt, cmd, caps_lock)
@@ -209,7 +209,7 @@ local function keypress(code, shift, control, alt, cmd, caps_lock)
if not key then return end
-- Since printable characters are uppercased, disable shift.
if shift and code >= 32 and code < 256 then shift = false end
- -- For composed keys on OSX, ignore alt.
+ -- For composed keys on macOS, ignore alt.
if OSX and alt and code < 256 then alt = false end
local key_seq = (control and CTRL or '') .. (alt and ALT or '') ..
(cmd and OSX and CMD or '') .. (shift and SHIFT or '') .. key