diff options
author | 2007-08-15 16:36:19 -0400 | |
---|---|---|
committer | 2007-08-15 16:36:19 -0400 | |
commit | cc8bc0b210d5716d970717e86216a6b059eecf05 (patch) | |
tree | ce5674f4695da038208517f13920246bd9e9372d /core/ext | |
parent | f332c1ccccc666e908eea56592b139ef685a99fd (diff) | |
download | textadept-cc8bc0b210d5716d970717e86216a6b059eecf05.tar.gz textadept-cc8bc0b210d5716d970717e86216a6b059eecf05.zip |
Renamed handlers module to events, updated everything to reflect changes.
Diffstat (limited to 'core/ext')
-rw-r--r-- | core/ext/mime_types.lua | 12 | ||||
-rw-r--r-- | core/ext/pm/buffer_browser.lua | 12 | ||||
-rw-r--r-- | core/ext/pm/ctags_browser.lua | 10 | ||||
-rw-r--r-- | core/ext/pm/macro_browser.lua | 6 |
4 files changed, 20 insertions, 20 deletions
diff --git a/core/ext/mime_types.lua b/core/ext/mime_types.lua index ec4ef808..912faf00 100644 --- a/core/ext/mime_types.lua +++ b/core/ext/mime_types.lua @@ -94,7 +94,7 @@ local function load_language_module_from_filename(filename) if ret then _m[lang].set_buffer_properties() elseif not ret and not err:match("^module '"..lang.."' not found:") then - textadept.handlers.error(err) + textadept.events.error(err) end end end @@ -119,8 +119,8 @@ local function handle_switch() end end -local handlers = textadept.handlers -handlers.add_handler_function('file_opened', handle_new) -handlers.add_handler_function('file_saved_as', handle_new) -handlers.add_handler_function('buffer_switch', handle_switch) -handlers.add_handler_function('view_new', handle_switch) +local events = textadept.events +events.add_handler('file_opened', handle_new) +events.add_handler('file_saved_as', handle_new) +events.add_handler('buffer_switch', handle_switch) +events.add_handler('view_new', handle_switch) diff --git a/core/ext/pm/buffer_browser.lua b/core/ext/pm/buffer_browser.lua index 1c2fb33c..47cc6de6 100644 --- a/core/ext/pm/buffer_browser.lua +++ b/core/ext/pm/buffer_browser.lua @@ -46,12 +46,12 @@ function perform_menu_action(menu_item, selected_item) textadept.pm.activate() end -local add_handler_function = textadept.handlers.add_handler_function +local add_handler = textadept.events.add_handler local function update_view() if matches(textadept.pm.entry_text) then textadept.pm.activate() end end -add_handler_function('file_opened', update_view) -add_handler_function('buffer_new', update_view) -add_handler_function('buffer_deleted', update_view) -add_handler_function('save_point_reached', update_view) -add_handler_function('save_point_left', update_view) +add_handler('file_opened', update_view) +add_handler('buffer_new', update_view) +add_handler('buffer_deleted', update_view) +add_handler('save_point_reached', update_view) +add_handler('save_point_left', update_view) diff --git a/core/ext/pm/ctags_browser.lua b/core/ext/pm/ctags_browser.lua index 842dce9e..5166b423 100644 --- a/core/ext/pm/ctags_browser.lua +++ b/core/ext/pm/ctags_browser.lua @@ -230,7 +230,7 @@ function perform_menu_action(menu_item, selected_item) end -local add_handler_function = textadept.handlers.add_handler_function +local add_handler = textadept.events.add_handler local function update_view() if matches(textadept.pm.entry_text) then if buffer.filename then @@ -240,7 +240,7 @@ local function update_view() end end end -add_handler_function('file_opened', update_view) -add_handler_function('buffer_deleted', update_view) -add_handler_function('buffer_switch', update_view) -add_handler_function('save_point_reached', update_view) +add_handler('file_opened', update_view) +add_handler('buffer_deleted', update_view) +add_handler('buffer_switch', update_view) +add_handler('save_point_reached', update_view) diff --git a/core/ext/pm/macro_browser.lua b/core/ext/pm/macro_browser.lua index 3fc38aca..de8af373 100644 --- a/core/ext/pm/macro_browser.lua +++ b/core/ext/pm/macro_browser.lua @@ -35,9 +35,9 @@ function perform_menu_action(menu_item, selected_item) textadept.pm.activate() end -local add_handler_function = textadept.handlers.add_handler_function +local add_handler = textadept.events.add_handler local function update_view() if matches(textadept.pm.entry_text) then textadept.pm.activate() end end -add_handler_function('macro_saved', update_view) -add_handler_function('macro_deleted', update_view) +add_handler('macro_saved', update_view) +add_handler('macro_deleted', update_view) |