aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--core/._M.luadoc23
-rw-r--r--core/.buffer.luadoc3
-rw-r--r--core/init.lua4
-rw-r--r--core/keys.lua10
-rw-r--r--doc/02_Installation.md20
-rw-r--r--doc/04_WorkingWithFiles.md6
-rw-r--r--doc/06_AdeptEditing.md12
-rw-r--r--doc/07_Modules.md76
-rw-r--r--doc/08_Preferences.md53
-rw-r--r--doc/09_Themes.md2
-rw-r--r--doc/11_Scripting.md4
-rw-r--r--doc/14_Appendix.md4
-rw-r--r--modules/textadept/adeptsense.lua18
-rw-r--r--modules/textadept/mime_types.lua8
-rw-r--r--modules/textadept/run.lua16
16 files changed, 127 insertions, 136 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 44c988a1..aef71fee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1648,8 +1648,8 @@ Changes:
* Added BSD support.
* Removed kill-ring from editing module.
-* [Run][] and [compile][] commands are in language-specific modules.
-* [Block comment][] strings are in language-specific modules now.
+* [Run][] and [compile][] commands are in language modules.
+* [Block comment][] strings are in language modules now.
* Remove "Untitled" buffer when necessary.
* Moved "Search" menu into "Tools" menu to prevent `Alt+S` key conflict.
* Rewrote lexers implementation.
diff --git a/core/._M.luadoc b/core/._M.luadoc
index 9eb70f64..fada7185 100644
--- a/core/._M.luadoc
+++ b/core/._M.luadoc
@@ -12,18 +12,17 @@
-- script. However, the script may load additional Lua files present in the
-- directory. (For an example, see *modules/textadept/init.lua*.)
--
--- Loaded modules, regardless of whether they are generic or language-specific,
--- persist in Textadept's Lua State; Textadept never unloads them. Therefore,
--- modules should define functions or variables within the module itself, not
--- globally.
---
--- ### Language-Specific
---
--- To fully take advantage of Textadept's features, language-specific modules
--- should have at a minimum: a block comment string, run and/or compile
--- commands, an event handler for setting buffer properties like indentation,
--- and if possible, an Adeptsense. Optional features are extra snippets and
--- commands and a context menu.
+-- Loaded modules, even language modules, persist in Textadept's Lua State;
+-- Textadept never unloads them. Therefore, modules should define functions or
+-- variables within the module itself, not globally.
+--
+-- ### Language Modules
+--
+-- To fully take advantage of Textadept's features, language modules should have
+-- at a minimum: a block comment string, run and/or compile commands, an event
+-- handler for setting buffer properties like indentation, and if possible, an
+-- Adeptsense. Optional features are extra snippets and commands and a context
+-- menu.
--
-- #### Block Comment
--
diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc
index 2b925504..3f39956c 100644
--- a/core/.buffer.luadoc
+++ b/core/.buffer.luadoc
@@ -2928,8 +2928,7 @@ 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-specific module if the
--- module exists.
+-- 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/init.lua b/core/init.lua
index 04c3dce7..8ce4d16b 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -101,8 +101,8 @@ local quit
---
-- Resets the Lua state by reloading all initialization scripts.
--- Language-specific modules for opened files are NOT reloaded. Re-opening the
--- files that use them will reload those modules instead.
+-- Language modules for opened files are NOT reloaded. Re-opening the files that
+-- use them will reload those modules instead.
-- This function is useful for modifying user scripts (such as
-- *~/.textadept/init.lua* and *~/.textadept/modules/textadept/keys.lua*) on
-- the fly without having to restart Textadept. `arg` is set to `nil` when
diff --git a/core/keys.lua b/core/keys.lua
index f7c2026e..50ad2948 100644
--- a/core/keys.lua
+++ b/core/keys.lua
@@ -20,9 +20,9 @@ local M = {}
-- 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-specific modules to
--- override commands like Adeptsense autocompletion, but fall back to word
--- autocompletion if the first command fails.)
+-- 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
--
@@ -95,7 +95,7 @@ local M = {}
-- ## Key Chains
--
-- Key chains are a powerful concept. They allow you to assign multiple key
--- bindings to one key sequence. Language-specific modules
+-- bindings to one key sequence. Language modules
-- [use key chains](#LANGUAGE_MODULE_PREFIX) for their functions. By default,
-- the `Esc` (`⎋` on Mac OSX | `Esc` in curses) key cancels a key chain, but you
-- can redefine it via [`CLEAR`](#CLEAR). An example key chain looks like:
@@ -111,7 +111,7 @@ local M = {}
-- The default value is `'esc'` for the `Esc` (`⎋` on Mac OSX | `Esc` in
-- curses) key.
-- @field LANGUAGE_MODULE_PREFIX (string)
--- The starting key of the key chain reserved for language-specific modules.
+-- The starting key of the key chain reserved for language modules.
-- The default value is `'cl'` on platforms other than Mac OSX, `'ml'`
-- otherwise. Equivalent to `Ctrl+L` (`⌘L` on Mac OSX | `M-L` in curses).
-- @field MODE (string)
diff --git a/doc/02_Installation.md b/doc/02_Installation.md
index c098ca63..353d0b81 100644
--- a/doc/02_Installation.md
+++ b/doc/02_Installation.md
@@ -50,12 +50,12 @@ appropriate package for your platform. For the Windows and Mac OSX packages, the
bundled GTK+ runtime accounts for more than 3/4 of the download and unpackaged
application sizes. Textadept itself is much smaller.
-You also have the option of downloading an official set of
-[language-specific modules][] from the download page. Textadept itself includes
-C/C++ and Lua language modules by default.
+You also have the option of downloading an official set of [language modules][]
+from the download page. Textadept itself includes C/C++ and Lua language modules
+by default.
[download page]: http://foicica.com/textadept/download
-[language-specific modules]: 07_Modules.html#Language-Specific
+[language modules]: 07_Modules.html#Language.Modules
## Installation
@@ -66,8 +66,8 @@ privileges.
Unpack the archive anywhere.
-If you downloaded the set of language-specific modules, unpack it where you
-unpacked the Textadept archive. The modules are located in the
+If you downloaded the set of language modules, unpack it where you unpacked the
+Textadept archive. The modules are located in the
*/path/to/textadept_x.x/modules/* directory.
### Mac OSX
@@ -77,7 +77,7 @@ Unpack the archive and move *Textadept.app* to your user or system
contains an optional *ta* script for launching Textadept from the command line
that you can put in a directory in your "$PATH" (e.g. */usr/local/bin/*).
-If you downloaded the set of language-specific modules, unpack it, right-click
+If you downloaded the set of language modules, unpack it, right-click
*Textadept.app*, select "Show Package Contents", navigate to
*Contents/Resources/modules/*, and move the unpacked modules there.
@@ -85,9 +85,9 @@ If you downloaded the set of language-specific modules, unpack it, right-click
Unpack the archive anywhere.
-If you downloaded the set of language-specific modules, unpack it where you
-unpacked the Textadept archive. The modules are located in the
-*textadept_x.x\modules\\* directory.
+If you downloaded the set of language modules, unpack it where you unpacked the
+Textadept archive. The modules are located in the *textadept_x.x\modules\\*
+directory.
## Running
diff --git a/doc/04_WorkingWithFiles.md b/doc/04_WorkingWithFiles.md
index 764b9c0b..c8fc43c5 100644
--- a/doc/04_WorkingWithFiles.md
+++ b/doc/04_WorkingWithFiles.md
@@ -37,8 +37,8 @@ settings in the buffer status statusbar.
#### Indentation
-Usually, [language-specific modules][] or [user settings][] dictate the
-buffer's indentation setting. By default, indentation is 2 spaces. Pressing
+Usually, [language modules][] or [user settings][] dictate the buffer's
+indentation setting. By default, indentation is 2 spaces. Pressing
`Ctrl+Alt+Shift+T` (`^⇧T` on Mac OSX | `M-T` or `M-S-T` in curses) manually
toggles between using tabs and spaces, although this only affects future
indentation. Existing indentation remains unchanged. `Ctrl+Alt+I` (`^I` | `M-I`)
@@ -46,7 +46,7 @@ performs the conversion. (If the buffer uses tabs, all indenting spaces convert
to tabs. If the buffer uses spaces, all indenting tabs convert to spaces.)
Similarly, the "Buffer -> Indentation" menu manually sets indentation size.
-[language-specific modules]: 07_Modules.html#Buffer.Properties
+[language modules]: 07_Modules.html#Buffer.Properties
[user settings]: 08_Preferences.html#Buffer.Properties
#### Line Endings
diff --git a/doc/06_AdeptEditing.md b/doc/06_AdeptEditing.md
index 764693c7..68b0dbd4 100644
--- a/doc/06_AdeptEditing.md
+++ b/doc/06_AdeptEditing.md
@@ -251,8 +251,8 @@ and display API documentation. Pressing `Ctrl+Space` (`⌥⎋` on Mac OSX | `^Sp
in curses) completes the current symbol and `Ctrl+H` (`^H` | `M-H` or `M-S-H`)
shows any known documentation on the current symbol. Note: In order for this
feature to work, the language you are working with must have an [Adeptsense][]
-defined. [Language-specific modules][] usually [define Adeptsenses][]. All of
-the [official][] Textadept language-specific modules have Adeptsenses.
+defined. [Language modules][] usually [define Adeptsenses][]. All of the
+[official][] Textadept language modules have Adeptsenses.
![Adeptsense Lua](images/adeptsense_lua.png)
    
@@ -260,7 +260,7 @@ the [official][] Textadept language-specific modules have Adeptsenses.
![Adeptsense Doc](images/adeptsense_doc.png)
-[Language-specific modules]: 07_Modules.html#Language-Specific
+[Language modules]: 07_Modules.html#Language.Modules
[Adeptsense]: api/_M.textadept.adeptsense.html
[define Adeptsenses]: api/_M.html#Adeptsense
[official]: http://foicica.com/hg
@@ -279,9 +279,9 @@ followed by the `Tab` (`⇥` | `Tab`) key. Subsequent presses of `Tab` (`⇥` |
`Tab`) cause the caret to enter placeholders in sequential order, `Shift+Tab`
(`⇧⇥` | `S-Tab`) goes back to the previous placeholder, and `Ctrl+Shift+K`
(`⌥⇧⇥` | `M-S-K`) cancels the current snippet. Textadept supports nested
-snippets, snippets inserted from within another snippet. Language-specific
-modules usually define their [own set][] of snippets, but your
-[snippet preferences][] can define some too.
+snippets, snippets inserted from within another snippet. Language modules
+usually define their [own set][] of snippets, but your [snippet preferences][]
+can define some too.
![Snippet](images/snippet.png)
    
diff --git a/doc/07_Modules.md b/doc/07_Modules.md
index 297a0ba5..02b6bf0c 100644
--- a/doc/07_Modules.md
+++ b/doc/07_Modules.md
@@ -1,46 +1,40 @@
# Modules
-Most of Textadept's functionality comes from Lua modules. Essentially there are
-two classes of module: generic and language-specific. A generic module provides
-features for all programming languages while a language-specific module provides
-features for a specific programming language.
+Most of Textadept's functionality comes from Lua modules loaded on startup. An
+example is the [textadept module][] which implements most of Textadept's
+functionality (find & replace, key bindings, menus, snippets, etc.) See the
+[preferences][] page for instructions on how to load your own modules on
+startup.
-## Generic
-
-Generic modules have a broad scope and are usually available for programming in
-all languages or writing plain-text. An example is the [textadept module][]
-which implements most of Textadept's functionality (find & replace, key
-bindings, menus, snippets, etc.). In general, Textadept should load these kinds
-of modules on startup. See the [preferences][] page for instructions on how to
-do this.
+Textadept also recognizes a special kind of module: a language module. Language
+modules provide functionality specific their respective programming languages.
[textadept module]: api/_M.textadept.html
[preferences]: 08_Preferences.html#Loading.Modules
-## Language-Specific
+## Language Modules
-Language-specific modules have a scope limited to a single programming language.
-The module's name matches the language's lexer in the *lexers/* directory.
-Textadept automatically loads the module when editing source code in that
-particular language. In addition to the source code editing features discussed
-previously, these kinds of modules typically also define shell commands for
-running and compiling code, indentation settings, custom key bindings, and
-perhaps a custom context menu. The manual discusses these features below.
+Language modules have a scope limited to a single programming language. The
+module's name matches the language's lexer in the *lexers/* directory. Textadept
+automatically loads the module when editing source code in that particular
+language. In addition to the source code editing features discussed previously,
+these kinds of modules typically also define shell commands for running and
+compiling code, indentation settings, custom key bindings, and perhaps a custom
+context menu. The manual discusses these features below.
### Compile and Run
-Most language-specific modules specify commands that compile and/or run the code
-in the current file. Pressing `Ctrl+Shift+R` (`⌘⇧R` on Mac OSX | `M-^R` in
-curses) executes the command for compiling code and `Ctrl+R` (`⌘R` | `^R`)
-executes the command for running code. A new buffer shows the output from the
-command and marks any recognized errors. Pressing `Ctrl+Alt+E` (`^⌘E` | `M-X`)
-attempts to jump to the source of the next recognized error and
-`Ctrl+Alt+Shift+E` (`^⌘⇧E` | `M-S-X`) attempts to jump to the previous one.
-Double-clicking on errors also jumps to their sources. Note: In order for these
-features to work, the language you are working with must have its compile and
-run commands and error format defined. If the language-specific module does not
-exist or does not [define][] commands or an error format, you can do so
-[manually][] in your [user-init file][].
+Most language modules specify commands that compile and/or run the code in the
+current file. Pressing `Ctrl+Shift+R` (`⌘⇧R` on Mac OSX | `M-^R` in curses)
+executes the command for compiling code and `Ctrl+R` (`⌘R` | `^R`) executes the
+command for running code. A new buffer shows the output from the command and
+marks any recognized errors. Pressing `Ctrl+Alt+E` (`^⌘E` | `M-X`) attempts to
+jump to the source of the next recognized error and `Ctrl+Alt+Shift+E` (`^⌘⇧E` |
+`M-S-X`) attempts to jump to the previous one. Double-clicking on errors also
+jumps to their sources. Note: In order for these features to work, the language
+you are working with must have its compile and run commands and error format
+defined. If the language module does not exist or does not [define][] commands
+or an error format, you can do so [manually][] in your [user-init file][].
![Runtime Error](images/runerror.png)
@@ -51,27 +45,27 @@ exist or does not [define][] commands or an error format, you can do so
### Buffer Properties
Some programming languages have style guidelines for indentation and/or line
-endings which differ from Textadept's defaults. In this case, language-specific
-modules [set][] these preferences. You can do so manually with your
+endings which differ from Textadept's defaults. In this case, language modules
+[set][] these preferences. You can do so manually with your
[language module preferences][].
[set]: api/_M.html#Buffer.Properties
-[language module preferences]: 08_Preferences.html#Language-Specific
+[language module preferences]: 08_Preferences.html#Language
### Key Bindings
-Most language-specific modules assign a set of key bindings to
-[custom commands][]. The module's [LuaDoc][] or code lists which key bindings
-map to which commands. The `Ctrl+L` (`⌘L` on Mac OSX | `M-L` in curses) key
-chain prefix typically houses them.
+Most language modules assign a set of key bindings to [custom commands][]. The
+module's [LuaDoc][] or code lists which key bindings map to which commands. The
+`Ctrl+L` (`⌘L` on Mac OSX | `M-L` in curses) key chain prefix typically houses
+them.
[custom commands]: api/_M.html#Commands
[LuaDoc]: api/index.html
### Context Menu
-Some language-specific modules add extra actions to the context menu.
-Right-click inside the view to bring up this menu.
+Some language modules add extra actions to the context menu. Right-click inside
+the view to bring up this menu.
## Getting Modules
diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md
index 463c66c2..75ed019b 100644
--- a/doc/08_Preferences.md
+++ b/doc/08_Preferences.md
@@ -17,21 +17,21 @@ code.
Try to refrain from modifying the default modules that come with Textadept, even
if you just want to change an option in a generic module, modify the buffer
-settings for a language-specific module, edit file types, or add a small bit of
-custom code. Upgrading Textadept to a new version may overwrite those changes.
-Instead you have two options: load your own module instead of the default one,
-or run your custom module code after the default module loads. For the most
-part, use the second option because it is simpler and more compatible with
-future releases. The manual discusses both options below in the context of
-generic and language-specific modules.
+settings for a language module, edit file types, or add a small bit of custom
+code. Upgrading Textadept to a new version may overwrite those changes. Instead
+you have two options: load your own module instead of the default one, or run
+your custom module code after the default module loads. For the most part, use
+the second option because it is simpler and more compatible with future
+releases. The manual discusses both options below in the context of generic and
+language modules.
#### Generic
Many of Textadept's generic modules have configurable settings changeable from
*~/.textadept/init.lua* after Textadept loads the module. The module's
[LuaDoc][] lists these settings. For example, to disable character autopairing
-with typeover and stripping whitespace on save, add the following to your
-*~/.textadept/init.lua*:
+with typeover and stripping trailing whitespace on save, add the following to
+your *~/.textadept/init.lua*:
_M.textadept.editing.AUTOPAIR = false
_M.textadept.editing.TYPEOVER_CHARS = false
@@ -57,20 +57,20 @@ rather than its own.
[LuaDoc]: api/index.html
-#### Language-Specific
+#### Language
-Similar to generic modules, putting your own language-specific module in
+Similar to generic modules, putting your own language module in
*~/.textadept/modules/* causes Textadept to load that module for editing the
language's code instead of the default one in *modules/* (if the latter exists).
-For example, copying the default Lua language-specific module from
-*modules/lua/* to *~/.textadept/modules/* results in Textadept loading that
-module for editing Lua code in place of its own. However, if you make custom
-changes to that module and upgrade Textadept later, the module may no longer be
-compatible. Rather than potentially wasting time merging changes, run custom
-code independent of a module in the module's *post_init.lua* file. In this case,
-instead of copying the `lua` module and creating an
-`events.LANGUAGE_MODULE_LOADED` event handler to use tabs, simply put the event
-handler in *~/.textadept/modules/lua/post_init.lua*:
+For example, copying the default Lua language module from *modules/lua/* to
+*~/.textadept/modules/* results in Textadept loading that module for editing Lua
+code in place of its own. However, if you make custom changes to that module and
+upgrade Textadept later, the module may no longer be compatible. Rather than
+potentially wasting time merging changes, run custom code independent of a
+module in the module's *post_init.lua* file. In this case, instead of copying
+the `lua` module and creating an `events.LANGUAGE_MODULE_LOADED` event handler
+to use tabs, simply put the event handler in
+*~/.textadept/modules/lua/post_init.lua*:
events.connect(events.LANGUAGE_MODULE_LOADED, function(lang)
if lang == 'lua' then buffer.use_tabs = true end
@@ -97,11 +97,10 @@ After creating or downloading a generic module called `foo` that you want to
load along with the default modules, simply add the following to your
*~/.textadept/init.lua*:
- _M.foo = require 'foo'
+ _M.foo = require('foo')
-Textadept automatically loads language-specific modules when opening a source
-file of that language, so simply installing the language-specific module is
-sufficient.
+Textadept automatically loads language modules when opening a source file of
+that language, so simply installing the language module is sufficient.
### Key Bindings
@@ -145,18 +144,18 @@ split view. Any settings there override Textadept's default *properties.lua*
settings. For example, to use tabs rather than spaces and have a tab size of 4
spaces by default, your *~/.textadept/properties.lua* would contain:
- buffer.tab_width = 4
buffer.use_tabs = true
+ buffer.tab_width = 4
(Remember that in order to have per-filetype properties, you need to have a
-[language-specific module][].)
+[language module][].)
Textadept's *properties.lua* is a good reference to see available properties to
set. It also has many commented out properties that you can copy to your
*~/.textadept/properties.lua* and uncomment to turn on or change the value of.
Use [Adeptsense][] to view a property's documentation or read the [LuaDoc][].
-[language-specific module]: 07_Modules.html#Buffer.Properties
+[language module]: 07_Modules.html#Buffer.Properties
[Adeptsense]: 06_AdeptEditing.html#Adeptsense
[LuaDoc]: api/buffer.html
diff --git a/doc/09_Themes.md b/doc/09_Themes.md
index eb069795..5777d896 100644
--- a/doc/09_Themes.md
+++ b/doc/09_Themes.md
@@ -72,7 +72,7 @@ managing more changes is probably easier with the latter.
[`gui.set_theme()`]: api/gui.html#set_theme
-### Language-Specific
+### Language
Textadept also allows you to customize themes per-language through the
`events.LANGUAGE_MODULE_LOADED` event. For example, changing the color of
diff --git a/doc/11_Scripting.md b/doc/11_Scripting.md
index 44a71db0..c0c68b59 100644
--- a/doc/11_Scripting.md
+++ b/doc/11_Scripting.md
@@ -84,8 +84,8 @@ them.
### Modules
-*modules/* contains generic and language-specific modules for editing text and
-source code.
+*modules/* contains generic and language modules for editing text and source
+code.
### Themes
diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md
index 944fb9d6..a3f21a08 100644
--- a/doc/14_Appendix.md
+++ b/doc/14_Appendix.md
@@ -267,11 +267,11 @@ Notes:
refrain from setting properties like `buffer.sel_eol_filled` which belong in
a [*properties.lua*][] file.
6. The separate *buffer.lua* is gone. Use [*properties.lua*][] or a
- [language-specific module][].
+ [language module][].
[customizing themes]: 09_Themes.html#Customizing.Themes
[*properties.lua*]: 08_Preferences.html#Buffer.Properties
-[language-specific module]: 07_Modules.html#Buffer.Properties
+[language module]: 07_Modules.html#Buffer.Properties
##### Theme Preference
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index a8b24202..283e7576 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -34,17 +34,17 @@ local M = {}
--
-- ## Adeptsense Basics
--
--- Adeptsenses exist per-language so [language-specific modules][] typically
--- define them. Before attempting to write an Adeptsense, first determine if the
--- module for your language has an Adeptsense. Textadept's official language
--- modules have Adeptsenses and are good reference sources. If your language is
--- similar to any of Textadept's, you may be able to copy and modify that
--- language's Adeptsense, saving some time and effort.
+-- Adeptsenses exist per-language so [language modules][] typically define them.
+-- Before attempting to write an Adeptsense, first determine if the module for
+-- your language has an Adeptsense. Textadept's official language modules have
+-- Adeptsenses and are good reference sources. If your language is similar to
+-- any of Textadept's, you may be able to copy and modify that language's
+-- Adeptsense, saving some time and effort.
--
--- [language-specific modules]: _M.html#Language-Specific.Modules
+-- [language modules]: _M.html#Language.Modules
--
--- Creating a new instance of an Adeptsense from within a language-specific
--- module is easy. Just replace the '?' with the name of your language:
+-- Creating a new instance of an Adeptsense from within a language module is
+-- easy. Just replace the '?' with the name of your language:
--
-- M.sense = _M.textadept.adeptsense.new('?')
--
diff --git a/modules/textadept/mime_types.lua b/modules/textadept/mime_types.lua
index 19b5fcbc..4f6aa3a6 100644
--- a/modules/textadept/mime_types.lua
+++ b/modules/textadept/mime_types.lua
@@ -6,9 +6,9 @@ local M = {}
---
-- Handles file type detection for Textadept.
-- @field _G.events.LANGUAGE_MODULE_LOADED (string)
--- Emitted after loading a language-specific module.
--- This is useful for overriding a language-specific module's key bindings
--- or other properties since the module is not loaded when Textadept starts.
+-- Emitted after loading a language module.
+-- This is useful for overriding a language module's key bindings or other
+-- properties since the module is not loaded when Textadept starts.
-- Arguments:
--
-- * *`lang`*: The language lexer name.
@@ -84,7 +84,7 @@ local function set_lexer(buffer, lang)
if not lang then lang = 'text' end
end
- -- Set the lexer and load its language-specific module.
+ -- Set the lexer and load its language module.
buffer._lexer = lang
buffer:private_lexer_call(SETDIRECTPOINTER, buffer.direct_pointer)
buffer:private_lexer_call(SETLEXERLANGUAGE, lang)
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index a5b1ce67..0e9913ed 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -5,11 +5,11 @@ local M = {}
--[[ This comment is for LuaDoc.
---
-- Compile and run/execute source files with Textadept.
--- Typically, [language-specific modules][] populate the `compile_command`,
+-- Typically, [language modules][] populate the `compile_command`,
-- `run_command`, and `error_detail` tables for a particular language's file
-- extension.
--
--- [language-specific modules]: _M.html#Compile.and.Run
+-- [language modules]: _M.html#Compile.and.Run
-- @field ERROR_COLOR (string)
-- The name of the color in the current theme to mark a line containing a
-- recognized run or compile error.
@@ -123,9 +123,9 @@ end
-- + `%(filename)`: The name of the file, including its extension.
-- + `%(filename_noext)`: The name of the file, excluding its extension.
--
--- This table is typically populated by [language-specific modules][].
+-- This table is typically populated by [language modules][].
--
--- [language-specific modules]: _M.html#Compile.and.Run
+-- [language modules]: _M.html#Compile.and.Run
-- @class table
-- @name compile_command
M.compile_command = {}
@@ -150,9 +150,9 @@ events.connect(events.COMPILE_OUTPUT, print_output)
-- + `%(filename)`: The name of the file, including its extension.
-- + `%(filename_noext)`: The name of the file, excluding its extension.
--
--- This table is typically populated by [language-specific modules][].
+-- This table is typically populated by [language modules][].
--
--- [language-specific modules]: _M.html#Compile.and.Run
+-- [language modules]: _M.html#Compile.and.Run
-- @class table
-- @name run_command
M.run_command = {}
@@ -184,9 +184,9 @@ events.connect(events.RUN_OUTPUT, print_output)
--
-- When an error message is double-clicked, the user is taken to the point of
-- error.
--- This table is usually populated by [language-specific modules][].
+-- This table is usually populated by [language modules][].
--
--- [language-specific modules]: _M.html#Compile.and.Run
+-- [language modules]: _M.html#Compile.and.Run
-- @class table
-- @name error_detail
M.error_detail = {}