aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--FAQ.md14
-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
-rw-r--r--init.lua2
-rw-r--r--modules/textadept/keys.lua36
-rwxr-xr-xscripts/gen_plist.lua2
-rwxr-xr-xscripts/osx/textadept_osx2
-rw-r--r--src/Makefile2
-rw-r--r--src/lua.patch4
-rw-r--r--src/textadept.c6
15 files changed, 61 insertions, 71 deletions
diff --git a/FAQ.md b/FAQ.md
index d2ba8570..56fb2111 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -6,11 +6,11 @@ unzipped folders 10s of MBs in size?
**A:**
Each download contains 2 executables: a GUI version and a terminal version.
-Furthermore, the Windows and OSX packages bundle in GTK runtimes, accounting for
-some 3/4 of the total application size. (GTK is the cross-platform GUI toolkit
-Textadept uses.) Then, starting in version 10, in order to be able to run on
-older Linux systems whose libstdc++ does not support newer C++11 symbols, the
-Linux executables statically link in a newer version of libstdc++. Finally,
+Furthermore, the Windows and macOS packages bundle in GTK runtimes, accounting
+for some 3/4 of the total application size. (GTK is the cross-platform GUI
+toolkit Textadept uses.) Then, starting in version 10, in order to be able to
+run on older Linux systems whose libstdc++ does not support newer C++11 symbols,
+the Linux executables statically link in a newer version of libstdc++. Finally,
nightly builds are compiled with debug symbols enabled in order to aid debugging
of various issues.
@@ -129,7 +129,7 @@ bug reports.
- - -
**Q:**
-Pressing `^O` in the curses version on Mac OSX does not do anything. Why?
+Pressing `^O` in the curses version on macOS does not do anything. Why?
**A:**
For whatever reason, `^O` is discarded by the terminal driver. To enable it, run
@@ -139,7 +139,7 @@ For whatever reason, `^O` is discarded by the terminal driver. To enable it, run
- - -
**Q:**
-How can I get the terminal version on Mac OSX to show more than 8 colors?
+How can I get the terminal version on macOS to show more than 8 colors?
**A:**
Enable the "Use bright colors for bold text" setting in your Terminal.app
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
diff --git a/init.lua b/init.lua
index 661f281e..af3a8ee8 100644
--- a/init.lua
+++ b/init.lua
@@ -206,7 +206,7 @@ view.annotation_visible = view.ANNOTATION_BOXED
view.eol_annotation_visible = view.EOLANNOTATION_BOXED
-- Other.
-buffer.buffered_draw = not CURSES and not OSX -- Quartz buffers drawing on OSX
+buffer.buffered_draw = not CURSES and not OSX -- Quartz buffers drawing on macOS
--buffer.word_chars =
--buffer.whitespace_chars =
--buffer.punctuation_chars =
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index 70ac2187..741b3533 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -10,21 +10,21 @@ local M = {}
--
-- ## Key Bindings
--
--- Linux / Win32 | Mac OSX | Terminal | Command
--- --------------|---------|----------|--------
--- **File** | | |
--- Ctrl+N |⌘N |M-^N |New file
--- Ctrl+O |⌘O |^O |Open file
--- Ctrl+Alt+O |^⌘O |M-^O |Open recent file...
--- Ctrl+Shift+O |⌘⇧O |M-O |Reload file
--- Ctrl+S |⌘S |^S |Save file
--- Ctrl+Shift+S |⌘⇧S |M-^S |Save file as..
--- None |None |None |Save all files
--- Ctrl+W |⌘W |^W |Close file
--- Ctrl+Shift+W |⌘⇧W |M-^W |Close all files
--- None |None |None |Load session...
--- None |None |None |Save session...
--- Ctrl+Q |⌘Q |^Q |Quit
+-- Win32, Linux, BSD|macOS|Terminal|Command
+-- -----------------|-----|--------|--------
+-- **File** | | |
+-- Ctrl+N |⌘N |M-^N |New file
+-- Ctrl+O |⌘O |^O |Open file
+-- Ctrl+Alt+O |^⌘O |M-^O |Open recent file...
+-- Ctrl+Shift+O |⌘⇧O |M-O |Reload file
+-- Ctrl+S |⌘S |^S |Save file
+-- Ctrl+Shift+S |⌘⇧S |M-^S |Save file as..
+-- None |None |None |Save all files
+-- Ctrl+W |⌘W |^W |Close file
+-- Ctrl+Shift+W |⌘⇧W |M-^W |Close all files
+-- None |None |None |Load session...
+-- None |None |None |Save session...
+-- Ctrl+Q |⌘Q |^Q |Quit
-- **Edit** | | |
-- Ctrl+Z<br/>Alt+Bksp |⌘Z |^Z^(†)<br/>M-Z|Undo
-- Ctrl+Y<br/>Ctrl+Shift+Z |⌘⇧Z |^Y<br/>M-S-Z |Redo
@@ -226,7 +226,7 @@ module('textadept.keys')]]
-- Control, Alt, Shift, and 'a' = 'ctrl+alt+A'
-- Control, Shift, and '\t' = 'ctrl+shift+\t'
--
--- Mac OSX key bindings.
+-- macOS key bindings.
--
-- Unassigned keys (~ denotes keys reserved by the operating system):
-- m: C ~H I JkK ~M p ~ tT V yY _ ) ] } + ~~\n
@@ -244,7 +244,7 @@ module('textadept.keys')]]
--
-- Key bindings available depend on your implementation of curses.
--
--- For ncurses (Linux, Mac OSX, BSD):
+-- For ncurses (Linux, macOS, BSD):
-- * The only Control keys recognized are 'ctrl+a'-'ctrl+z', 'ctrl+ ',
-- 'ctrl+\\', 'ctrl+]', 'ctrl+^', and 'ctrl+_'.
-- * Control+Shift and Control+Meta+Shift keys are not recognized.
@@ -278,7 +278,7 @@ local m_indentation = m_buffer[_L['Indentation']]
local m_view = textadept.menu.menubar[_L['View']]
local m_help = textadept.menu.menubar[_L['Help']]
--- Bindings for Linux/Win32, Mac OSX, Terminal.
+-- Bindings for Linux/Win32, macOS, Terminal.
local bindings = {
-- File.
[buffer.new] = {'ctrl+n', 'cmd+n', 'ctrl+meta+n'},
diff --git a/scripts/gen_plist.lua b/scripts/gen_plist.lua
index 63f967d1..d43da45c 100755
--- a/scripts/gen_plist.lua
+++ b/scripts/gen_plist.lua
@@ -1,7 +1,7 @@
#!/usr/bin/lua
-- Copyright 2007-2020 Mitchell mitchell.att.foicica.com. See LICENSE.
--- This script generates the "Info.plist" file for the Mac OSX App bundle.
+-- This script generates the "Info.plist" file for the macOS App bundle.
local lang, exts
local languages, extensions = {}, {}
diff --git a/scripts/osx/textadept_osx b/scripts/osx/textadept_osx
index 3ab1d4ad..78a09679 100755
--- a/scripts/osx/textadept_osx
+++ b/scripts/osx/textadept_osx
@@ -15,7 +15,7 @@ export PANGO_LIBDIR="$bundle_res/lib"
export PANGO_SYSCONFDIR="$bundle_res/etc"
export CHARSETALIASDIR="$bundle_res/lib"
-# Strip out the argument added by OSX.
+# Strip out the argument added by macOS.
if [ x`echo "x$1" | sed -e "s/^x-psn_.*//"` == x ]; then shift 1; fi
# Source '~/.textadept/osx_env.sh' to set variables like $PATH when opening
diff --git a/src/Makefile b/src/Makefile
index 7600d28b..b15da680 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -35,7 +35,7 @@ ifeq (win, $(findstring win, $(MAKECMDGOALS)))
CURSES_LIBS = win32curses/lib/pdcurses.a win32curses/lib/libiconv.a
endif
else ifeq (osx, $(findstring osx, $(MAKECMDGOALS)))
- # Cross-compile for Mac OSX.
+ # Cross-compile for macOS.
CROSS = x86_64-apple-darwin9-
CFLAGS += -mdynamic-no-pic
CXXFLAGS += -mdynamic-no-pic
diff --git a/src/lua.patch b/src/lua.patch
index f9f76cfb..05a9253d 100644
--- a/src/lua.patch
+++ b/src/lua.patch
@@ -433,8 +433,8 @@ diff -r 8a23edc91533 src/luaconf.h
+static int monitoring_fds = 0;
+/**
+ * Monitors spawned fds when GTK is idle.
-+ * This is necessary because at the moment, using GLib on Mac OSX to spawn
-+ * and monitor file descriptors mostly blocks when attempting to poll those fds.
++ * This is necessary because at the moment, using GLib on macOS to spawn and
++ * monitor file descriptors mostly blocks when attempting to poll those fds.
+ */
+static int monitor_fds(void *L) {
+ struct timeval timeout = {0, 1e5}; // 0.1s
diff --git a/src/textadept.c b/src/textadept.c
index ace653ed..2d9c06a8 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -1811,7 +1811,7 @@ static bool exiting(GtkWidget *_, GdkEventAny *__, void *L) {
#if (__APPLE__ && !CURSES)
/**
- * Signal for opening files from OSX.
+ * Signal for opening files from macOS.
* Generates an 'appleevent_odoc' event for each document sent.
*/
static bool open_file(GtkosxApplication*_, char *path, void *L) {
@@ -1819,7 +1819,7 @@ static bool open_file(GtkosxApplication*_, char *path, void *L) {
}
/**
- * Signal for block terminating Textadept from OSX.
+ * Signal for block terminating Textadept from macOS.
* Generates a 'quit' event.
*/
static bool terminating(GtkosxApplication *_, void *L) {
@@ -1827,7 +1827,7 @@ static bool terminating(GtkosxApplication *_, void *L) {
}
/**
- * Signal for terminating Textadept from OSX.
+ * Signal for terminating Textadept from macOS.
* Closes the Lua state and releases resources.
* @see close_lua
*/