diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/._M.luadoc | 8 | ||||
-rw-r--r-- | core/.buffer.luadoc | 8 | ||||
-rw-r--r-- | core/keys.lua | 12 | ||||
-rw-r--r-- | core/ui.lua | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/core/._M.luadoc b/core/._M.luadoc index 20ea1c01..e9d4bf18 100644 --- a/core/._M.luadoc +++ b/core/._M.luadoc @@ -42,8 +42,8 @@ -- 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 key, and --- thus can be defined or modified. For Lua, it would look like: +-- [`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"' -- textadept.run.run_commands.lua = 'lua "%f"' @@ -64,8 +64,8 @@ -- `events.LEXER_LOADED` to change this and any other language-specific editor -- properties. For example: -- --- events.connect(events.LEXER_LOADED, function(lexer) --- if lexer ~= 'python' then return end +-- events.connect(events.LEXER_LOADED, function(name) +-- if name ~= 'python' then return end -- buffer.tab_width = 4 -- buffer.use_tabs = false -- view.view_ws = view.WS_VISIBLEALWAYS diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc index 93ed88d0..8176e140 100644 --- a/core/.buffer.luadoc +++ b/core/.buffer.luadoc @@ -1830,13 +1830,13 @@ function set_encoding(buffer, encoding) end function get_lexer(buffer, current) end --- --- Associates lexer name *lexer* or the auto-detected lexer name with the buffer --- and then loads the appropriate language module if that module exists. +-- 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 lexer Optional string lexer name to set. If `nil`, attempts to +-- @param name Optional string lexer name to set. If `nil`, attempts to -- auto-detect the buffer's lexer. -- @usage buffer:set_lexer('lexer_name') -function set_lexer(buffer, lexer) end +function set_lexer(buffer, name) end -- Unused Fields. -- * accessibility diff --git a/core/keys.lua b/core/keys.lua index d805b4f1..59a2314f 100644 --- a/core/keys.lua +++ b/core/keys.lua @@ -10,12 +10,12 @@ 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 language (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 the current key mode to have priority. If no key mode is active, +-- 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 +-- 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 -- sequence, Textadept runs the language-specific one. However, if the command diff --git a/core/ui.lua b/core/ui.lua index a9c4618e..b971236f 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -331,13 +331,13 @@ events_connect(events.UPDATE_UI, function(updated) local pos = buffer.selection_n_caret[buffer.main_selection] local line, max = buffer:line_from_position(pos), buffer.line_count local col = buffer.column[pos] - local lexer = buffer:get_lexer() + local lang = buffer:get_lexer() local eol = buffer.eol_mode == buffer.EOL_CRLF and _L['CRLF'] or _L['LF'] local tabs = string.format( '%s %d', buffer.use_tabs and _L['Tabs:'] or _L['Spaces:'], buffer.tab_width) local enc = buffer.encoding or '' ui.buffer_statusbar_text = string.format( - text, _L['Line:'], line, max, _L['Col:'], col, lexer, eol, tabs, enc) + text, _L['Line:'], line, max, _L['Col:'], col, lang, eol, tabs, enc) end) -- Save buffer properties. |