diff options
author | 2017-12-31 21:16:05 -0500 | |
---|---|---|
committer | 2017-12-31 21:16:05 -0500 | |
commit | 290ad666101dd2a6bff29dcfd69a6ead74f3ea40 (patch) | |
tree | 076800c82509f0a663cb74dcbc39eafd7e1eaff6 /init.lua | |
parent | 070e851b0d02b64cf5eaa1fd97872026b5167555 (diff) | |
download | textadept-290ad666101dd2a6bff29dcfd69a6ead74f3ea40.tar.gz textadept-290ad666101dd2a6bff29dcfd69a6ead74f3ea40.zip |
Added temporary compatibility notices when upgrading to Textadept 10.
These notices are only for changes that are likely to affect users like theme
settings and ~/textadept/properties.lua.
These notices should be removed later.
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -252,6 +252,10 @@ 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.dialogs.ok_msgbox{title='Textadept 10 Compatibility Notice',informative_text='ui.set_theme() is now buffer.set_theme().\nPlease update your ~/.textadept/init.lua accordingly.',no_cancel=true} end) buffer.set_theme(...) end +events.connect(events.INITIALIZED, function() if lfs.attributes(_USERHOME..'/properties.lua') then ui.dialogs.ok_msgbox{title='Textadept 10 Compatibility Notice',informative_text='~/.textadept/properties.lua is not read anymore.\nPlease move its contents to ~/.textadept/init.lua.',no_cancel=true} 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 |