aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/file_types.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2016-06-15 08:51:48 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2016-06-15 08:51:48 -0400
commitc90910baf4f9c81711b31697aedf40d359491228 (patch)
treec16d9a1679eb35c237929ae49d0e854a984a9da9 /modules/textadept/file_types.lua
parent7f7cff76d97afb41dc075d29d63f8bb32548f055 (diff)
downloadtextadept-c90910baf4f9c81711b31697aedf40d359491228.tar.gz
textadept-c90910baf4f9c81711b31697aedf40d359491228.zip
Do not auto-load `post_init.lua` files in language modules anymore.
Additional language module functionality should be manually loaded by the user.
Diffstat (limited to 'modules/textadept/file_types.lua')
-rw-r--r--modules/textadept/file_types.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/textadept/file_types.lua b/modules/textadept/file_types.lua
index fd61e2e2..9d1f4042 100644
--- a/modules/textadept/file_types.lua
+++ b/modules/textadept/file_types.lua
@@ -68,11 +68,7 @@ local function set_lexer(buffer, lang)
buffer:private_lexer_call(SETDIRECTPOINTER, buffer.direct_pointer)
buffer:private_lexer_call(SETLEXERLANGUAGE, lang)
buffer._lexer = lang
- if package.searchpath(lang, package.path) then
- _M[lang] = require(lang)
- local post_init = lang..'.post_init'
- if package.searchpath(post_init, package.path) then require(post_init) end
- end
+ if package.searchpath(lang, package.path) then _M[lang] = require(lang) end
if buffer ~= ui.command_entry then events.emit(events.LEXER_LOADED, lang) end
local last_line = buffer.first_visible_line + buffer.lines_on_screen
buffer:colourise(0, buffer:position_from_line(last_line + 1))