diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2012-09-12 11:24:11 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2012-09-12 11:24:11 -0400 |
commit | 9dc8ce16a1efc6482db6f1d5456d42958e79a06c (patch) | |
tree | e26ff636143fc74f92a6a3359a73e93194da6bc3 /core/args.lua | |
parent | 4305f32ac153b7a45a1c001da2fcd412af905168 (diff) |
Documentation overhaul.
Rewrote most of the manual and Lua API to complement each other.
Key bindings reference moved from Appendix to modules/textadept/keys.lua LuaDoc.
Diffstat (limited to 'core/args.lua')
-rw-r--r-- | core/args.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/args.lua b/core/args.lua index 687735ce..a7c56c90 100644 --- a/core/args.lua +++ b/core/args.lua @@ -9,7 +9,7 @@ local M = {} -- ## Arg Events -- -- + `'arg_none'` --- Called when no command line arguments are passed to Textadept on init. +-- Called when no command line arguments are passed to Textadept on startup. module('args')]] local arg = arg @@ -25,7 +25,7 @@ local switches = {} -- @param switch2 String switch (long version). -- @param narg The number of expected parameters for the switch. -- @param f The Lua function to run when the switch is tripped. --- @param description Description of the switch. +-- @param description Description of the switch for command line help. -- @name register function M.register(switch1, switch2, narg, f, description) local t = { f, narg, description } @@ -36,9 +36,10 @@ end -- Processes command line arguments. -- Add command line switches with `args.register()`. Any unrecognized arguments -- are treated as filepaths and opened. --- Generates an `'arg_none'` event when no args are present. +-- Emits an `'arg_none'` event when no args are present. -- @param arg Argument table. -- @see register +-- @see events -- @name process function M.process(arg) local no_args = true @@ -94,7 +95,7 @@ if not lfs.attributes(userhome) then lfs.mkdir(userhome) end if not lfs.attributes(userhome..'/init.lua') then local f = io.open(userhome..'/init.lua', 'w') if f then - f:write("require 'textadept'\n") + f:write("_M.textadept = require 'textadept'\n") f:close() end end |