aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-07-19 17:11:15 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2009-07-19 17:11:15 -0400
commit3a8ba35148bff928929402a9234c4eb6a4cbc937 (patch)
tree7dc54fb56c198098bb0a513b531e32b53cd17f4e /core
parent20b984c56d7f7115c78ccc35c059c7e9b2384e2d (diff)
downloadtextadept-3a8ba35148bff928929402a9234c4eb6a4cbc937.tar.gz
textadept-3a8ba35148bff928929402a9234c4eb6a4cbc937.zip
Removed [Local {function,table}] documentation from being shown in LuaDoc.
Diffstat (limited to 'core')
-rw-r--r--core/events.lua4
-rw-r--r--core/ext/find.lua24
-rw-r--r--core/ext/keys.lua29
-rw-r--r--core/ext/mime_types.lua8
-rw-r--r--core/file_io.lua16
5 files changed, 26 insertions, 55 deletions
diff --git a/core/events.lua b/core/events.lua
index e990a5c6..61ebd3ea 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -295,9 +295,7 @@ add_handler('buffer_new',
if not ret then io.stderr:write(errmsg) end
end)
----
--- [Local function] Sets the title of the Textadept window to the buffer's
--- filename.
+-- Sets the title of the Textadept window to the buffer's filename.
-- @param buffer The currently focused buffer.
local function set_title(buffer)
local buffer = buffer
diff --git a/core/ext/find.lua b/core/ext/find.lua
index c68b97e3..de59c576 100644
--- a/core/ext/find.lua
+++ b/core/ext/find.lua
@@ -10,17 +10,13 @@ local MARK_FIND = 0
local MARK_FIND_COLOR = 0x4D9999
local previous_view
----
--- [Local table] Text escape sequences with their associated characters.
--- @class table
--- @name escapes
+-- Text escape sequences with their associated characters.
local escapes = {
['\\a'] = '\a', ['\\b'] = '\b', ['\\f'] = '\f', ['\\n'] = '\n',
['\\r'] = '\r', ['\\t'] = '\t', ['\\v'] = '\v', ['\\\\'] = '\\'
}
----
--- [Local function] Finds and selects text in the current buffer.
+-- Finds and selects text in the current buffer.
-- @param text The text to find.
-- @param next Flag indicating whether or not the search direction is forward.
-- @param flags Search flags. This is a number mask of 4 flags: match case (2),
@@ -156,9 +152,8 @@ local function find_(text, next, flags, nowrap, wrapped)
end
textadept.events.add_handler('find', find_)
----
--- [Local function] Finds and selects text incrementally in the current buffer
--- from a start point.
+-- Finds and selects text incrementally in the current buffer from a start
+-- point.
-- Flags other than SCFIND_MATCHCASE are ignored.
-- @param text The text to find.
local function find_incremental(text)
@@ -205,8 +200,7 @@ textadept.events.add_handler('command_entry_command',
end
end, 1) -- place before command_entry.lua's handler (if necessary)
----
--- [Local function] Replaces found text.
+-- Replaces found text.
-- 'find_' is called first, to select any found text. The selected text is then
-- replaced by the specified replacement text.
-- This function ignores 'Find in Files'.
@@ -251,8 +245,7 @@ local function replace(rtext)
end
textadept.events.add_handler('replace', replace)
----
--- [Local function] Replaces all found text.
+-- Replaces all found text.
-- If any text is selected, all found text in that selection is replaced.
-- This function ignores 'Find in Files'.
-- @param ftext The text to find.
@@ -300,9 +293,8 @@ local function replace_all(ftext, rtext, flags)
end
textadept.events.add_handler('replace_all', replace_all)
----
--- [Local function] When the user double-clicks a found file, go to the line in
--- the file the text was found at.
+-- When the user double-clicks a found file, go to the line in the file the text
+-- was found at.
-- @param pos The position of the caret.
-- @param line_num The line double-clicked.
local function goto_file(pos, line_num)
diff --git a/core/ext/keys.lua b/core/ext/keys.lua
index b6d4c6d0..5a27f36a 100644
--- a/core/ext/keys.lua
+++ b/core/ext/keys.lua
@@ -81,7 +81,7 @@ local ALT = 'a'..ADD
---
-- Global container that holds all key commands.
-- @class table
--- @name keys
+-- @name _G.keys
_G.keys = {}
-- optimize for speed
@@ -96,12 +96,9 @@ local type = _G.type
local unpack = _G.unpack
local MAC = _G.MAC
----
--- [Local table] Lookup table for key values higher than 255.
+-- Lookup table for key values higher than 255.
-- If a key value given to 'keypress' is higher than 255, this table is used to
-- return a string representation of the key if it exists.
--- @class table
--- @name KEYSYMS
local KEYSYMS = { -- from <gdk/gdkkeysyms.h>
[65056] = '\t', -- backtab; will be 'shift'ed
[65288] = '\b',
@@ -123,9 +120,7 @@ local KEYSYMS = { -- from <gdk/gdkkeysyms.h>
[65478] = 'f9', [65479] = 'f10', [65480] = 'f11', [65481] = 'f12',
}
---- [Local table] The current key sequence.
--- @class table
--- @name keychain
+-- The current key sequence.
local keychain = {}
-- local functions
@@ -138,8 +133,7 @@ function clear_key_sequence()
textadept.statusbar_text = ''
end
----
--- [Local function] Handles Textadept keypresses.
+-- Handles Textadept keypresses.
-- It is called every time a key is pressed, and based on lexer and scope,
-- executes a command. The command is looked up in the global 'keys' key
-- command table.
@@ -219,28 +213,23 @@ local function keypress(code, shift, control, alt)
end
textadept.events.add_handler('keypress', keypress, 1)
----
--- [Local function] Tries to get a key command based on the lexer and current
--- scope.
+-- Tries to get a key command based on the lexer and current scope.
try_get_cmd1 = function(keys, lexer, scope)
return try_get_cmd(keys[lexer][scope])
end
----
--- [Local function] Tries to get a key command based on the lexer.
+-- Tries to get a key command based on the lexer.
try_get_cmd2 = function(keys, lexer)
return try_get_cmd(keys[lexer])
end
----
--- [Local function] Tries to get a global key command.
+-- Tries to get a global key command.
try_get_cmd3 = function(keys)
return try_get_cmd(keys)
end
----
--- [Local function] Helper function that gets commands associated with the
--- current keychain from 'keys'.
+-- Helper function that gets commands associated with the current keychain from
+-- 'keys'.
-- If the current item in the keychain is part of a chain, throw an error value
-- of -1. This way, pcall will return false and -1, where the -1 can easily and
-- efficiently be checked rather than using a string error message.
diff --git a/core/ext/mime_types.lua b/core/ext/mime_types.lua
index f411ab89..e6412884 100644
--- a/core/ext/mime_types.lua
+++ b/core/ext/mime_types.lua
@@ -44,7 +44,7 @@ if f then
end
---
--- [Local function] Replacement for buffer:set_lexer_language().
+-- Replacement for buffer:set_lexer_language().
-- Sets a buffer._lexer field so it can be restored without querying the
-- mime-types tables. Also if the user manually sets the lexer, it should be
-- restored.
@@ -58,8 +58,7 @@ end
textadept.events.add_handler('buffer_new',
function() buffer.set_lexer = set_lexer end)
----
--- [Local function] Performs actions suitable for a new buffer.
+-- Performs actions suitable for a new buffer.
-- Sets the buffer's lexer language and loads the language module.
local function handle_new()
local lexer
@@ -97,8 +96,7 @@ local function handle_new()
end
end
----
--- [Local function] Sets the buffer's lexer based on filename, shebang words, or
+-- Sets the buffer's lexer based on filename, shebang words, or
-- first line pattern.
local function restore_lexer()
buffer:set_lexer_language(buffer._lexer or 'container')
diff --git a/core/file_io.lua b/core/file_io.lua
index 56f3777c..aedecbd3 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -32,8 +32,7 @@ boms = {
['UTF-32LE'] = string.char(255, 254, 0, 0)
}
----
--- [Local function] Attempt to detect the encoding of the given text.
+-- Attempt to detect the encoding of the given text.
-- @param text Text to determine encoding from.
-- @return encoding string for textadept.iconv() (unless 'binary', indicating a
-- binary file), byte-order mark (BOM) string or nil. If encoding string is
@@ -57,10 +56,7 @@ local function detect_encoding(text)
return nil
end
----
--- [Local table] List of encodings to try to decode files as after UTF-8.
--- @class table
--- @name try_encodings
+-- List of encodings to try to decode files as after UTF-8.
local try_encodings = {
'UTF-8',
'ASCII',
@@ -68,8 +64,7 @@ local try_encodings = {
'MacRoman'
}
----
--- [Local function] Opens a file or goes to its already open buffer.
+-- Opens a file or goes to its already open buffer.
-- @param utf8_filename The absolute path to the file to open. Must be UTF-8
-- encoded.
local function open_helper(utf8_filename)
@@ -338,9 +333,8 @@ function read_api_file(filename, word_chars)
return api
end
----
--- [Local function] Prompts the user to reload the current file if it has been
--- modified outside of Textadept.
+-- Prompts the user to reload the current file if it has been modified outside
+-- of Textadept.
local function update_modified_file()
if not buffer.filename then return end
local utf8_filename = buffer.filename