aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2007-08-09 03:45:47 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2007-08-09 03:45:47 -0400
commitb708fa97b490c351f237d22397b8b562d7fb9950 (patch)
tree24a9e569d3c82f61ce1c0e274c99f33438aa80a1 /modules
parenta0ae12838a95c88be4ea1ca83af905a25563faff (diff)
Added new LuaDoc, updated existing LuaDoc to be more consistent.
Diffstat (limited to 'modules')
-rw-r--r--modules/lua/commands.lua6
-rw-r--r--modules/textadept/editing.lua16
-rw-r--r--modules/textadept/keys.lua3
-rw-r--r--modules/textadept/snippets.lua19
4 files changed, 23 insertions, 21 deletions
diff --git a/modules/lua/commands.lua b/modules/lua/commands.lua
index 8cf25c87..1f6d25a5 100644
--- a/modules/lua/commands.lua
+++ b/modules/lua/commands.lua
@@ -15,7 +15,7 @@ local control_structure_patterns = {
}
---
--- Try to autocomplete Lua's 'end' keyword for control structures like 'if',
+-- Tries to autocomplete Lua's 'end' keyword for control structures like 'if',
-- 'while', 'for', etc.
-- @see control_structure_patterns
function try_to_autocomplete_end()
@@ -38,8 +38,8 @@ function try_to_autocomplete_end()
end
---
--- Determine the Lua file being 'require'd, and search through package.path for
--- that file and open it in Textadept.
+-- Determines the Lua file being 'require'd, searches through package.path for
+-- that file, and opens it in Textadept.
function goto_required()
local buffer = buffer
local line = buffer:get_line( buffer:line_from_position(buffer.current_pos) )
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index b9a59a58..241385cc 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -117,10 +117,12 @@ end
-- function name, and each value is a table of tables. Each of those tables
-- represents a function. It has 2 indexes: parameters and a description.
-- This enables call tips for 'overloaded' functions. Even if there is just
--- one function, it must be enclosed in a table.
--- @param start Boolean indicating whether to start a call tip or not. If the
--- user clicks an arrow, you should call show_call_tip again with this value
--- being false to display the next function.
+-- one function, it must be enclosed in a table. You can get an API table
+-- from a file via textadept.io.read_api_file().
+-- @param start Flag indicating whether or not to start a call tip. If the user
+-- clicks an arrow, you should call show_call_tip again with this value being
+-- false to display the next function.
+-- @see textadept.io.read_api_file
function show_call_tip(api, start)
local buffer = buffer
local funcs
@@ -165,7 +167,7 @@ textadept.handlers.add_function_to_handler('call_tip_click',
end)
---
--- Comment or uncomments out blocks of code with a given comment string.
+-- Block comments or uncomments code with a given comment string.
-- @param comment The comment string inserted or removed from the beginning of
-- each line in the selection.
function block_comment(comment)
@@ -291,7 +293,7 @@ function smart_paste(action)
end
---
--- Selects the current word under the caret and if action indicates, delete it.
+-- Selects the current word under the caret and if action indicates, deletes it.
-- @param action Optional action to perform with selected word. If 'delete', it
-- is deleted.
function current_word(action)
@@ -319,7 +321,7 @@ function transpose_chars()
buffer:char_right()
end
buffer:insert_text( -1, string.char(char) )
- editor:end_undo_action()
+ buffer:end_undo_action()
buffer:goto_pos(caret)
end
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index 5ef0f8be..0fea59c4 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -152,7 +152,8 @@ try_get_cmd3 = function(keys, key_seq)
end
---
--- [Local function] Helper function to get commands with the current keychain.
+-- [Local function] Helper function that gets commands associated with the
+-- current keychain.
-- 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/modules/textadept/snippets.lua b/modules/textadept/snippets.lua
index e8b01700..5b7e3c09 100644
--- a/modules/textadept/snippets.lua
+++ b/modules/textadept/snippets.lua
@@ -164,8 +164,8 @@ function insert(snippet_arg)
end
---
--- [Local function] Mirror or transform most recently modified field in the
--- current snippet and move on to the next field.
+-- [Local function] Mirrors or transforms the most recently modified field in
+-- the current snippet and moves on to the next field.
next_snippet_item = function()
if not snippet.index then return end
local buffer = buffer
@@ -318,7 +318,7 @@ function cancel_current()
end
---
--- List available snippet triggers as an autocompletion list.
+-- Lists available snippet triggers as an autocompletion list.
-- Global snippets and snippets in the current lexer and scope are used.
function list()
local buffer = buffer
@@ -348,7 +348,7 @@ function list()
end
---
--- Show the scope/style at the current caret position as a calltip.
+-- Shows the scope/style at the current caret position as a call tip.
function show_scope()
if not SCOPES_ENABLED then print('Scopes disabled') return end
local buffer = buffer
@@ -372,7 +372,7 @@ snippet_text = function()
end
---
--- [Local function] Replace escaped snippet characters with their octal
+-- [Local function] Replaces escaped snippet characters with their octal
-- equivalents.
escape = function(text)
return text:gsub('\\([$/}`])',
@@ -380,7 +380,7 @@ escape = function(text)
end
---
--- [Local function] Replace octal snippet characters with their escaped
+-- [Local function] Replaces octal snippet characters with their escaped
-- equivalents.
unescape = function(text)
return text:gsub('\\(%d%d%d)',
@@ -388,13 +388,13 @@ unescape = function(text)
end
---
--- [Local function] Remove escaping forward-slashes from escaped snippet
+-- [Local function] Removes escaping forward-slashes from escaped snippet
-- characters.
-- At this point, they are no longer necessary.
remove_escapes = function(text) return text:gsub('\\([$/}`])', '%1') end
---
--- [Local function] When snippets are inserted, match their indentation level
+-- [Local function] When snippets are inserted, matches their indentation level
-- with their surroundings.
match_indention = function(ref_line, num_lines)
if num_lines == 0 then return end
@@ -423,8 +423,7 @@ join_lines = function()
end
---
--- [Local function] Called for printing debug text if DEBUG flag
--- is set.
+-- [Local function] Prints debug text if the DEBUG flag is set.
-- @param text Debug text to print.
_DEBUG = function(text) if DEBUG then print('---\n'..text) end end