From 2ab6deaecb4576c932dd63186927e9481bf5dedc Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 5 Jan 2012 05:20:39 -0500 Subject: Rename '_m' to '_M'. --- core/._M.luadoc | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ core/._m.luadoc | 96 --------------------------------------------------------- core/init.lua | 2 +- core/keys.lua | 2 +- 4 files changed, 98 insertions(+), 98 deletions(-) create mode 100644 core/._M.luadoc delete mode 100644 core/._m.luadoc (limited to 'core') diff --git a/core/._M.luadoc b/core/._M.luadoc new file mode 100644 index 00000000..de13e3f1 --- /dev/null +++ b/core/._M.luadoc @@ -0,0 +1,96 @@ +-- Copyright 2007-2011 Mitchell mitchellcaladbolg.net. See LICENSE. +-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the +-- global _M table. + +--- +-- A table of loaded modules. +module('_M') + +-- Markdown: +-- ## Overview +-- +-- Note that while language-specific modules can only be used by files of that +-- language, they persist in Textadept's Lua state. Because of this, it is not +-- recommended to set global functions or variables and depend on them, as they +-- may be inadvertantly overwritten. Keep these inside the module. +-- +-- ## Structure +-- +-- Each module should have an `init.lua` that `require`s all submodules it +-- needs. For an example, see `modules/textadept/init.lua`. +-- +-- ## Recommended Features for Language-Specific Modules +-- +-- #### Snippets +-- +-- [Snippets](../modules/_M.textadept.snippets.html) for common code constructs. +-- +-- #### Commands +-- +-- ##### Run +-- +-- If the code can be run by an interpreter or other executable, create a [run +-- command](../modules/_M.textadept.run.html#run_command) for it as well as an +-- [error format](../modules/_M.textadept.run.html#error_detail) for the ability +-- to jump to the position in a file where the error occured. +-- +-- For example: +-- +-- _M.textadept.run.run_command.lua = 'lua %(filename)' +-- +-- ##### Compile +-- +-- If the code can be compiled by an executable, create a [compile +-- command](../modules/_M.textadept.run.html#compile_command) for it. +-- +-- For example: +-- +-- _M.textadept.run.compile_command.lua = 'luac %(filename)' +-- +-- ##### Block Comment +-- +-- Create a [comment +-- prefix](../modules/_M.textadept.editing.html#comment_string) for it so code +-- can be easily commented and uncommented. +-- +-- For example: +-- +-- _M.textadept.editing.comment_string.lua = '--' +-- +-- #### Buffer Properties +-- +-- Add a `set_buffer_properties` function with default buffer properties for +-- code like tab and indentation settings. +-- +-- For example: +-- +-- function set_buffer_properties() +-- local buffer = buffer +-- buffer.use_tabs = false +-- buffer.tab_width = 2 +-- buffer.indent = 2 +-- end +-- +-- #### Context Menu (Optional) +-- +-- Language-specific context menus, accessible by right-clicking inside the +-- view, can be defined as: +-- +-- context_menu = { +-- { 'label1', action1 }, +-- { 'label2', action2 }, +-- ... +-- } +-- +-- See `modules/textadept/menu.lua` for examples on how to define menus. +-- +-- ## Modules and Key Commands +-- +-- When assigning [key commands](../modules/_M.textadept.keys.html) to module +-- functions, do not forget to do so AFTER the function has been defined. +-- Typically key commands are placed at the end of files, like `init.lua` in +-- the `textadept` module. + +--- +-- This module contains no functions. +function no_functions() end no_functions = nil diff --git a/core/._m.luadoc b/core/._m.luadoc deleted file mode 100644 index 0a6839d3..00000000 --- a/core/._m.luadoc +++ /dev/null @@ -1,96 +0,0 @@ --- Copyright 2007-2011 Mitchell mitchellcaladbolg.net. See LICENSE. --- This is a DUMMY FILE used for making LuaDoc for built-in functions in the --- global _m table. - ---- --- A table of loaded modules. -module('_m') - --- Markdown: --- ## Overview --- --- Note that while language-specific modules can only be used by files of that --- language, they persist in Textadept's Lua state. Because of this, it is not --- recommended to set global functions or variables and depend on them, as they --- may be inadvertantly overwritten. Keep these inside the module. --- --- ## Structure --- --- Each module should have an `init.lua` that `require`s all submodules it --- needs. For an example, see `modules/textadept/init.lua`. --- --- ## Recommended Features for Language-Specific Modules --- --- #### Snippets --- --- [Snippets](../modules/_m.textadept.snippets.html) for common code constructs. --- --- #### Commands --- --- ##### Run --- --- If the code can be run by an interpreter or other executable, create a [run --- command](../modules/_m.textadept.run.html#run_command) for it as well as an --- [error format](../modules/_m.textadept.run.html#error_detail) for the ability --- to jump to the position in a file where the error occured. --- --- For example: --- --- _m.textadept.run.run_command.lua = 'lua %(filename)' --- --- ##### Compile --- --- If the code can be compiled by an executable, create a [compile --- command](../modules/_m.textadept.run.html#compile_command) for it. --- --- For example: --- --- _m.textadept.run.compile_command.lua = 'luac %(filename)' --- --- ##### Block Comment --- --- Create a [comment --- prefix](../modules/_m.textadept.editing.html#comment_string) for it so code --- can be easily commented and uncommented. --- --- For example: --- --- _m.textadept.editing.comment_string.lua = '--' --- --- #### Buffer Properties --- --- Add a `set_buffer_properties` function with default buffer properties for --- code like tab and indentation settings. --- --- For example: --- --- function set_buffer_properties() --- local buffer = buffer --- buffer.use_tabs = false --- buffer.tab_width = 2 --- buffer.indent = 2 --- end --- --- #### Context Menu (Optional) --- --- Language-specific context menus, accessible by right-clicking inside the --- view, can be defined as: --- --- context_menu = { --- { 'label1', action1 }, --- { 'label2', action2 }, --- ... --- } --- --- See `modules/textadept/menu.lua` for examples on how to define menus. --- --- ## Modules and Key Commands --- --- When assigning [key commands](../modules/_m.textadept.keys.html) to module --- functions, do not forget to do so AFTER the function has been defined. --- Typically key commands are placed at the end of files, like `init.lua` in --- the `textadept` module. - ---- --- This module contains no functions. -function no_functions() end no_functions = nil diff --git a/core/init.lua b/core/init.lua index 93746589..05af0b89 100644 --- a/core/init.lua +++ b/core/init.lua @@ -18,7 +18,7 @@ _LEXERPATH = _USERHOME..'/lexers/?.lua;'.._HOME..'/lexers' gui.set_theme() -_m = {} -- modules table +_M = {} -- modules table --[[ This comment is for LuaDoc. --- Extends Lua's _G table to provide extra functions and fields. diff --git a/core/keys.lua b/core/keys.lua index e02b0454..f4f1849a 100644 --- a/core/keys.lua +++ b/core/keys.lua @@ -36,7 +36,7 @@ module('keys')]] -- -- For key values less than 255, Lua's [`string.char()`][string_char] is used to -- determine the key's string representation. Otherwise, the --- [`KEYSYMS`](../modules/_m.textadept.keys.html#KEYSYMS) lookup table is used. +-- [`KEYSYMS`](../modules/_M.textadept.keys.html#KEYSYMS) lookup table is used. -- -- [string_char]: http://www.lua.org/manual/5.1/manual.html#pdf-string.char -- -- cgit v1.2.3