From bdccda5d155578f6564bd7b13f1d1affd48b0671 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 16 Mar 2012 16:53:53 -0400 Subject: Moved "Markdown:" comments into module LuaDoc comments. --- core/keys.lua | 47 ++++++++++++++--------------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) (limited to 'core/keys.lua') diff --git a/core/keys.lua b/core/keys.lua index 72144246..08181c49 100644 --- a/core/keys.lua +++ b/core/keys.lua @@ -5,9 +5,7 @@ local M = {} --[[ This comment is for LuaDoc. --- -- Manages key commands in Textadept. -module('keys')]] - --- Markdown: +-- -- ## Overview -- -- Key commands are defined in the global table `keys`. Each key-value pair in @@ -51,35 +49,9 @@ module('keys')]] -- -- Key commands can be chained like in Emacs using keychain sequences. By -- default, the `Esc` key (`Apple+Esc` on Mac OSX) cancels the current keychain, --- but it can be redefined by setting the `keys.CLEAR` field. Naturally, the +-- but it can be redefined by re-defining [`CLEAR`](#CLEAR). Naturally, the -- clear sequence cannot be chained. -- --- ## Settings --- --- + `CTRL` [string] --- The string representing the Control key. --- The default value is 'c'. --- + `ALT` [string] --- The string representing the Alt/option key. --- The default value is 'a'. --- + `META` [string] --- The string representing the Command key on Mac OSX. --- The default value is 'm'. --- + `SHIFT` [string] --- The string representing the Shift key. --- The default value is 's'. --- + `ADD` [string] --- The string representing used to join together a sequence of Control, Alt, --- Meta, or Shift modifier keys. --- The default value is ''. --- * `CLEAR` [string] --- The string representing the key sequence that clears the current keychain. --- The default value is 'esc' (Escape). --- * `LANGUAGE_MODULE_PREFIX` [string] --- The starting key command of the keychain reserved for language-specific --- modules. --- The default value is Ctrl/Cmd+L. --- -- ## Precedence -- -- When searching for a key command to execute in the `keys` table, key commands @@ -118,9 +90,18 @@ module('keys')]] -- -- ## Problems -- --- All Lua functions must be defined BEFORE they are reference in key commands. --- Therefore, any module containing key commands should be loaded after all --- other modules, whose functions are being referenced, have been loaded. +-- All Lua functions must be defined **before** they are reference in key +-- commands. Therefore, any module containing key commands should be loaded +-- after all other modules, whose functions are being referenced, have been +-- loaded. +-- @field CLEAR (string) +-- The string representing the key sequence that clears the current keychain. +-- The default value is `'esc'` (Escape). +-- @field LANGUAGE_MODULE_PREFIX (string) +-- The starting key command of the keychain reserved for language-specific +-- modules. +-- The default value is Ctrl/Cmd+L. +module('keys')]] local ADD = '' local CTRL, ALT, META, SHIFT = 'c'..ADD, 'a'..ADD, 'm'..ADD, 's'..ADD -- cgit v1.2.3