From 290ad666101dd2a6bff29dcfd69a6ead74f3ea40 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 31 Dec 2017 21:16:05 -0500 Subject: 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. --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'init.lua') diff --git a/init.lua b/init.lua index c3b483fb..50698d81 100644 --- a/init.lua +++ b/init.lua @@ -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 -- cgit v1.2.3