diff options
-rw-r--r-- | init.lua | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -15,7 +15,6 @@ textadept = require('textadept') -- Documentation is in core/.buffer.luadoc. local function set_theme(buffer, name, props) - --[[Temporary compatibility notice for Textadept 10 alpha 3.]]if type(buffer) == 'string' then events.connect(events.INITIALIZED, function() ui.print('Textadept 10 Compatibility Notice: buffer.set_theme() should be called as buffer:set_theme(). Please update your ~/.textadept/init.lua accordingly.') end) buffer, name, props = _G.buffer, buffer, name end name = name:find('[/\\]') and name or package.searchpath(name, _USERHOME..'/themes/?.lua;'.. _HOME..'/themes/?.lua') @@ -25,7 +24,7 @@ local function set_theme(buffer, name, props) dofile(name) _G.buffer = orig_buffer for prop, value in pairs(props or {}) do buffer.property[prop] = value end - -- Force reload of all styles since the current lexer may have defined its own + -- Force reload of all styles since the current lexer may have defined its own -- styles. (The LPeg lexer has only refreshed default lexer styles.) local SETLEXERLANGUAGE = _SCINTILLA.properties.lexer_language[2] buffer:private_lexer_call(SETLEXERLANGUAGE, buffer._lexer or 'text') @@ -263,10 +262,6 @@ buffer.wrap_mode = buffer.WRAP_NONE -- Accessibility. buffer.accessibility = buffer.ACCESSIBILITY_DISABLED --- Temporary compatibility notices for Textadept 10. -function ui.set_theme(...) events.connect(events.INITIALIZED, function() ui.print('Textadept 10 Compatibility Notice: ui.set_theme() is now buffer:set_theme(). Please update your ~/.textadept/init.lua accordingly.') end) buffer:set_theme(...) end -events.connect(events.INITIALIZED, function() if lfs.attributes(_USERHOME..'/properties.lua') then ui.print('Textadept 10 Compatibility Notice: textadept/properties.lua is not read anymore. Please move its contents to ~/.textadept/init.lua.') end end) - -- Load user init file, which may also define default buffer settings. local user_init = _USERHOME..'/init.lua' if lfs.attributes(user_init) then dofile(user_init) end |